Skip to main content

zc.buildout recipe for creating a virtual Python installation

Project description

This is a zc.buildout recipe for setting up a virtual Python installation inside a buildout. This gives you a writable Python environment isolated from other buildouts and from its parent Python installation.

Using a virtual Python avoids the need to compile Python from source and allows you to use packages installed into the parent Python installation. Depending on your situation, these features may be considered helpful or harmful. The recipe provides mechanism and leaves choosing policy up to you.

The idea and implementation of the virtual Python recipe are based on the virtual-python.py script advertised on Phillip J. Eby’s EasyInstall page, which is in turn based on a script by Ian Bicking.

This recipe appears to be reliable, but the feature set is basically determined by the author’s immediate needs. Don’t hesitate to send questions, bug reports, suggestions, or patches to <thomas@thomas-lotze.de>.

Options

A buildout part created by this recipe exports an executable option so it may be used as a part defining a Python installation in a buildout, i.e. a buildout section’s python option may reference it.

Configuration options:
executable-name:

Basename of the virtual Python installation’s interpreter executable.

real-python:

Filesystem path to the interpreter executable of the Python installation that should be used as the parent Python.

site-packages:

Boolean switch, whether to make the parent Python’s site-packages library directory available to the virtual Python.

extra-paths:

Extra library paths to make available to the virtual Python.

headers:

Boolean switch, whether to make the parent Python’s C header files available in the virtual Python installation.

Exported options:
location:

Location of the buildout part containing the virtual Python installation. This is the same as the virtual Python’s sys.prefix.

executable:

Filesystem path to the interpreter executable of the virtual Python installation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tl.buildout_virtual_python-0.1.2.tar.gz (5.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page