Contents
PyAMF requires Python 2.4 or newer. Python 3.0 isn't supported.
Pretty simple:
pip install pyamf
To use PyAMF with Python 2.4, the following software packages must be installed. You don't need these packages if you're using Python 2.5 or newer!
The easy_install
command will automatically install them for you, as
described above, but you can also choose to download and install the packages
manually.
- ElementTree 1.2.6 or newer
- uuid 1.30 or newer
:doc:`community/download` and unpack the PyAMF archive of your choice:
tar zxfv PyAMF-<version>.tar.gz cd PyAMF-<version>
Run the Python-typical setup at the top of the source directory from a command-prompt:
python setup.py install
This will byte-compile the Python source code and install it in the
site-packages
directory of your Python installation.
Note: to disable the installation of the C-extension, supply the
--disable-ext
option:
python setup.py install --disable-ext
Packaged as python-pyamf:
apt-get install python-pyamf
Note: you might need root permissions or equivalent for this step.
PyAMF integrates with the following optional third-party Python libraries:
- wsgiref 0.1.2 or newer (included in Python 2.5 and newer)
- cElementTree 1.0.5 or newer (included in Python 2.5 and newer)
- lxml 2.2 or newer
- SQLAlchemy 0.4 or newer
- Twisted 2.5 or newer
- Django 0.97 or newer
- Google App Engine 1.0 or newer
- Elixir 0.7.1 or newer
To run the PyAMF unit tests the following software packages
must be installed. The easy_install
command will automatically
install them for you, as described above, but you can also choose to
download and install the packages manually.
- unittest2 (included in Python 2.7 and newer)
You can run the unit tests using setuptools like this:
python setup.py test
Other libraries for unit testing are also supported, including:
To modify the cPyAMF extension you need:
- Cython 0.13 or newer
And run the command below on the .pyx
files to create the
.c
file, which contains the C source for the cPyAMF
extension module:
cython amf3.pyx
To find out about other advanced installation options, run:
easy_install --help
Also see Installing Python Modules for detailed information.
To install PyAMF to a custom location:
easy_install --prefix=/path/to/installdir
To build the main documentation you need:
- Sphinx 1.0 or newer
- sphinxcontrib.epydoc 0.4 or newer
- a :doc:`copy <community/download>` of the PyAMF source distribution
Unix users run the command below in the doc
directory to create the
HTML version of the PyAMF documentation:
make html
Windows users can run the make.bat file instead:
make.bat
This will generate the HTML documentation in the doc/build/html
folder. This documentation is identical to the content on the main PyAMF
website.
Note: if you don't have the make tool installed then you can invoke
Sphinx from the doc
directory directly like this:
sphinx-build -b html . build
To build the API documentation you need:
- Epydoc 3.0 or newer
- a :doc:`copy <community/download>` of the PyAMF source distribution
Run the command below in the root directory to create the HTML version of the PyAMF API documentation:
epydoc --config=setup.cfg
This will generate the HTML documentation in the doc/build/api
folder.