Spring Python is easy to install. It comes with two installable tar balls. One is the core library itself. The other is a set of samples you can optionally install to help get a better understanding of Spring Python. As it is written in pure Python, the installed files are the source code as well, so you can see how Spring Python works.
This installation section does NOT show how to install all the parts needed to develop patches for the Spring Python project. For more information on setting up a developer's environment, please join the Spring Python mailing list at http://lists.springsource.com/listmanager/listinfo/springpython-users where you can ask about current development requirements.
Installing Spring Python currently requires Python 2.4, 2.5, or 2.6. It can also be run on Jython 2.5. At the time of this writing, it hasn't been extended to support Python 3 due to lack of backwards compatibility and immaturity. However, as Python 3 gains acceptance in the user community, Spring Python will move to support it as well.
Spring Python makes it easier to integrate with certain 3rd party libraries. Installation of those 3rd party libraries is not covered in this book. For example, to write queries against an Oracle database, you need to install the cxora package.
The binaries are hosted as tar balls by SpringSource, in the community section. They are non-OS specific and should work on any platform.
springpython-<release>.tar.gz
to get the core library setup.py
$ python setup.py install
$ python
>>> import springpython
>>> dir()
['__builtins__', '__doc__', '__name__', 'springpython']
Spring Python can be installed from source code like many other open source projects. The code is hosted on a subversion repository. The following steps will help you download the code and install it on your machine:
$ svn checkout https://src.springframework.org/svn/ se-springpython-py/trunk/springpython springpython
This will create a local directory springpython
containing the latest changes.
build.py
is located. This script serves as the key tool to build, package, and test Spring Python. Type the following command to generate an installable Spring Python package:$ ./build.py -package
target/artifacts
, the directory containing the newly generated tar balls. springpython-<release>.tar.gz
, and go to the directory containing setup.py
and type the following command to install Spring Python:$ python
>>> import springpython
>>> dir()
['__builtins__', '__doc__', '__name__', 'springpython']
$ svn update /path/for/springpython
build.py, target/artifacts
, and setup.py
.You can also visually inspect the code using SpringSource's Fisheye viewer at https://fisheye.springframework.org/browse/ se-springpython-py. This provides a way to view the code, change sets, and change logs as well.