Skip to main content

relocatable python virtual environment

Project description

package inspired a lot by ian bicking’s virtualenv but created in fashion that it can be relocated freely through the filesystem, renamed, backuped, …

second nice feature is, that you can customize your python environment via {{ENV}}/pythonrc.py in any curious way you want.

works with python3, pypy

install

you can install this package from pypi:

pip install RVirtualEnv

# or
easy_install RVirtualEnv

# or just clone this repository
git clone http://github.com/kvbik/rvirtualenv

you should definitely try development version

to create new virtual environment just call:

rvirtualenv ~/PYENV1

# or directly from this repo

./rvirtualenv.py ~/PYENV2

usage

to enable environment, do:

# on unix
export PYTHONPATH=~/PYENV1:$PYTHONPATH

# on windows
set PYTHONPATH=c:\PYENV1;%PYTHONPATH%

after that, you can call any python command (eg: pip or easy_install, ipython, …) and it will have access to your virtual environment.

if you don’t want to mess up with environment, just call our wrapper:

# on unix
~/PYENV1/bin/python [any [params]]

# on win
c:\PYENV1\bin\python.bat [any [params]]

it should work with mod-wsgi python-path option as well, and you can enable it in runtime via site.addsitedir(venv_directory).

tests

if you are interested in testing this package, it should support many standard ways of running tests. nose is used for test discovery.

you can run any of these commands:

  • python setup.py test

  • nosetests

  • ./tests/test_all.py

in the setup.py case you just have to wait a little, until setuptools_dummy are downloaded, because it is a build dependency.

package was tested on:

  • archlinux with python 3.2

  • archlinux with python 2.7

  • macosx 10.6 python 2.6

  • ms windows with python 2.6

  • ubuntu 10.04 python 2.6

  • debian lenny with python 2.5

  • debian etch with python 2.4

but there is no build environment yet.

why

main reasons why this package came into existence:

  • it does not copy python binary

  • it does not symlink core python libraries

  • you can just set up PYTHONPATH env variable and you can use any system-wide command (eg: easy_install, pip)

  • you can tune pythonrc.py file to your needs in any curious ways (useful for debugging/testing)

todo

it does not have all the features, that ian’s virtualenv has, because i don’t know, which one of them are important..

probably no-site-packages is important and it can be simulated by patching your pythonrc.py file right now.

boot scripts even ian does not like very much and i think there should be some init scripts only or installation of some package should be called.

development

see http://github.com/kvbik/rvirtualenv

changelog

0.3.0

  • python3 support - it really works, tests are passing

  • support for virtualenv wrapper (via: source PY/bin/activate)

  • inherit one virtualenv to another

  • bin/activate works, also on windows and relocatable

  • complete rewrite of venv

  • custom install command so you can define your own layout

  • proper functionality on macos and ubuntu

0.2.x

  • installing extensions into virtual environment works

  • not released, but merged to 0.3

0.2.3

  • fixing problems with relative path when creating virtualenv

  • more compatibility with pip and uninstalling system packages (sys.real_prefix)

  • tests passing with distribute (aka setuptools fork)

0.2.2

initial versions (<=0.2.2)

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

RVirtualEnv-0.3.0.tar.gz (204.5 kB view details)

Uploaded Source

File details

Details for the file RVirtualEnv-0.3.0.tar.gz.

File metadata

  • Download URL: RVirtualEnv-0.3.0.tar.gz
  • Upload date:
  • Size: 204.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for RVirtualEnv-0.3.0.tar.gz
Algorithm Hash digest
SHA256 80a7cb715d640ed326ec9f63b3db2e09b4299550678029414885ba523efac3e3
MD5 725b733590e214da1020b62759fc7393
BLAKE2b-256 b9422a8fd38e4a087f3f6a4d296216ffce434b675578a4ae7d9e57330de5a3a2

See more details on using hashes here.

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