Anweisungen zum Installieren von Voluptuous in einer Python 2.5-Umgebung.
Verschoben zu JSON-Validierung mit Voluptuous in Python.
Kann nicht auf Python 2.5 installiert werden.
# 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#
Es kann nicht geholfen werden, da es ursprünglich nicht unterstützt wird.
ich hab es nicht ausgearbeitet. Derzeit (2016/1) unterstützt die neueste Version von voluptuous-0.8.8 Python 2.5 nicht. Ich dachte, dass es in der früheren Version unterstützt wurde, aber es war zum Zeitpunkt des ersten Commits nicht mit Python 2.5 kompatibel.
Ich habe einen Patch erstellt, um die Arbeit mit Python 2.5 zu erleichtern. https://gist.github.com/thombashi/5be8a602df933851d2fd1af73cb1bb0e
Wenden Sie diesen Patch an
# 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#
Ich konnte es installieren.
Nun, ich möchte Python 2.5 abschließen.
Recommended Posts