Install Voluptuous with Python 2.5

Instructions for installing Voluptuous in a Python 2.5 environment.

What is Voluptuous?

Moved to JSON validation using Voluptuous in Python.

Task

I can't install it on 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#

It can't be helped because it is not originally supported.

Countermeasures

Install past versions of Voluptuous

It was bad. At the moment (2016/1), the latest version of voluptuous-0.8.8 does not support Python 2.5, I thought that it was supported in the past version, but it was not compatible with Python 2.5 at the time of the first commit.

Make a patch for Python 2.5

I've created a patch that makes voluptuous work with Python 2.5. https://gist.github.com/thombashi/5be8a602df933851d2fd1af73cb1bb0e

Apply this 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#

I was able to install it.

Well, I want to graduate from Python 2.5.

Recommended Posts

Install Voluptuous with Python 2.5
Install python with pyenv
Install Python environment with Anaconda
install python
Install external libraries with Python
Install Python 2.7.9 and Python 3.4.x with pip.
I can't install python3 with pyenv-vertualenv
Install Python from source with Ansible
Install the Python plugin with Netbeans 8.0.2
Unable to install Python with pyenv
Install python with mac vs code
[Python Windows] pip install with Python version
FizzBuzz with Python3
Scraping with Python
Statistics with python
Scraping with Python
Python with Go
Twilio with Python
Install Python locally
Play with 2016-Python
Tested with Python
Install NAOqi python
with syntax (Python)
Install Python Control
Bingo with python
Zundokokiyoshi with python
CentOS8 --Install --Python3
Excel with Python
Microcomputer with Python
Cast with python
Install Python as a Framework with pyenv
scipy stumbles with pip install on python 2.7.8
How to install python3 with docker centos
Serial communication with Python
Zip, unzip with python
Django 1.11 started with Python3.6
Primality test with Python
Python with eclipse + PyDev.
Socket communication with Python
Data analysis with python 2
Scraping with Python (preparation)
Install python on WSL
Try scraping with Python.
Learning Python with ChemTHEATER 03
Sequential search with Python
"Object-oriented" learning with python
Run Python with VBA
Handling yaml with python
Solve AtCoder 167 with python
Serial communication with python
[Python] Use JSON with Python
Learning Python with ChemTHEATER 05-1
How to install Python
Install Python on Pidora.
Learn Python with ChemTHEATER
1.1 Getting Started with Python
Binarization with OpenCV / Python
3. 3. AI programming with Python
Kernel Method with Python
Non-blocking with Python + uWSGI
Scraping with Python + PhantomJS