Instructions pour l'installation de Voluptuous dans un environnement Python 2.5.
Déplacé vers Validation JSON à l'aide de Voluptuous en Python.
Impossible d'installer sur Python 2.5.
# tar xvf voluptuous-0.8.8.tar.gz
voluptuous-0.8.8/
voluptuous-0.8.8/.gitignore
voluptuous-0.8.8/.travis.yml
voluptuous-0.8.8/COPYING
voluptuous-0.8.8/MANIFEST.in
voluptuous-0.8.8/README.md
voluptuous-0.8.8/setup.cfg
voluptuous-0.8.8/setup.py
voluptuous-0.8.8/tests.md
voluptuous-0.8.8/tests.py
voluptuous-0.8.8/tox.ini
voluptuous-0.8.8/voluptuous.py
# cd voluptuous-0.8.8
voluptuous-0.8.8# python setup.py install
setup.py:15: Warning: 'with' will become a reserved keyword in Python 2.6
File "setup.py", line 15
with open('README.rst', 'w') as f:
^
SyntaxError: invalid syntax
voluptuous-0.8.8#
Cela ne peut pas être aidé car il n'est pas pris en charge à l'origine.
C'était mauvais. Pour le moment (2016/1), la dernière version de voluptuous-0.8.8 ne prend pas en charge Python 2.5, Je pensais qu'il était pris en charge dans la version précédente, mais il n'était pas compatible avec Python 2.5 au moment du premier commit.
J'ai créé un patch pour faire un travail voluptueux avec Python 2.5. https://gist.github.com/thombashi/5be8a602df933851d2fd1af73cb1bb0e
Appliquer ce patch
# patch -p1 < voluptuous_python25.patch
patching file voluptuous-0.8.8/setup.py
patching file voluptuous-0.8.8/voluptuous.py
#
Installation
# cd voluptuous-0.8.8
voluptuous-0.8.8# python setup.py install
WARNING: Could not locate pandoc, using Markdown long_description.
running install
running bdist_egg
running egg_info
writing requirements to voluptuous.egg-info/requires.txt
writing voluptuous.egg-info/PKG-INFO
writing top-level names to voluptuous.egg-info/top_level.txt
writing dependency_links to voluptuous.egg-info/dependency_links.txt
reading manifest file 'voluptuous.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'voluptuous.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_py
copying voluptuous.py -> build/lib
creating build/bdist.linux-i686/egg
copying build/lib/voluptuous.py -> build/bdist.linux-i686/egg
byte-compiling build/bdist.linux-i686/egg/voluptuous.py to voluptuous.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
copying voluptuous.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying voluptuous.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying voluptuous.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying voluptuous.egg-info/requires.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying voluptuous.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/voluptuous-0.8.8-py2.5.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing voluptuous-0.8.8-py2.5.egg
Removing /usr/lib/python2.5/site-packages/voluptuous-0.8.8-py2.5.egg
Copying voluptuous-0.8.8-py2.5.egg to /usr/lib/python2.5/site-packages
voluptuous 0.8.8 is already the active version in easy-install.pth
Installed /usr/lib/python2.5/site-packages/voluptuous-0.8.8-py2.5.egg
Processing dependencies for voluptuous==0.8.8
Searching for setuptools==0.6c8
Best match: setuptools 0.6c8
setuptools 0.6c8 is already the active version in easy-install.pth
Installing easy_install script to /usr/bin
Installing easy_install-2.5 script to /usr/bin
Installing easy_install-2.4 script to /usr/bin
Using /usr/lib/python2.5/site-packages
Finished processing dependencies for voluptuous==0.8.8
voluptuous-0.8.8#
J'ai pu l'installer.
Eh bien, je veux être diplômé de Python 2.5.
Recommended Posts