[Distutils] pythonv, take two

Carl Meyer carl at oddbird.net
Thu Mar 17 03:33:31 CET 2011


Hi all,

I've pushed this symlink/copy binary approach to the "pythonv2" branch
at http://bitbucket.org/carljm/cpythonv. I was a bit shocked at how easy
it turned out to be: just a few lines in site.py and the same changes to
sysconfig.py as previously. No changes in C code needed at all. It was
so easy I'm wondering what I must have missed, but everything seems to
work well. Please try it and tell me what I missed!

To try it out, create a directory somewhere with a bin/ subdirectory,
symlink or copy (it works either way) the python3 binary from an install
of the pythonv2 branch into bin/, and create lib/python3.3/site-packages
in the virtualenv. Create "pythonv.conf" in the root of the virtualenv -
it can be empty if you want full isolation; if you want the system
site-packages too you can add a [pythonv] section with
"include-system-site=True" (it's a ConfigParser-style file). Start up
your binary and check sys.path. You can download distribute and "python
setup.py install" that into your virtualenv and then easy_install more
stuff into your env.

At this point, unless the lack of LD_LIBRARY_PATH is actually a blocker,
I can't see any reason not to go with this approach instead.

Carl


More information about the Distutils-SIG mailing list