Amazon Ion Python
An implementation of Amazon Ion for Python.
This package is designed to work with Python 2.6+ and Python 3.3+
This repository contains a git submodule
ion-tests, which holds test data used by
ion-python's unit tests.
The easiest way to clone the
ion-python repository and initialize its
submodule is to run the following command.
$ git clone --recursive https://github.com/amzn/ion-python.git ion-python
Alternatively, the submodule may be initialized independently from the clone by running the following commands.
$ git submodule init $ git submodule update
It is recommended to use
virtualenv to create a clean environment to build/test Ion Python.
$ virtualenv venv ... $ . venv/bin/activate $ pip install -r requirements.txt $ pip install -e .
You can also run the tests through
$ python setup.py test
Install relevant versions of Python:
$ for V in 2.6.9 2.7.15 3.3.7 3.4.8 3.5.5 3.6.5 pypy2.7-6.0.0 pypy3.5-6.0.0; do pyenv install $V; done
Note that on Mac OS X, you may need to change the
$ for V in 2.6.9 2.7.15 3.3.7 3.4.8 3.5.5 3.6.5 pypy2.7-6.0.0 pypy3.5-6.0.0; do CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install $V; done
Once you have these installations, add them as a local
$ pyenv local 2.6.9 2.7.15 3.3.7 3.4.8 3.5.5 3.6.5 pypy2.7-6.0.0 pypy3.5-6.0.0
At the time of this writing, on Mac OS X, you may have problems with
On this platform, it is probably easier to have
pypy not managed by
pyenv and install
and use it directly from
Assuming you have
pyenv properly set up (making sure
pyenv init is evaluated into your shell),
you can now run
# Run tox for all versions of python which executes py.test. $ tox # Run tox for just Python 2.7 and 3.5. $ tox -e py27,py35 # Run tox for a specific version and run py.test with high verbosity $ tox -e py27 -- py.test -vv # Run tox for a specific version and just the virtual env REPL. $ tox -e py27 -- python
The following build, deployment, or release tasks are required:
- Add support for code coverage reporting.
- Publish coverage to something like Coverage.io
- Improve documentation around setup/development/contribution/getting started.
- Consider using something like PyPy.js to build an interactive shell for playing with Ion python and provide a client-side Ion playground.