Re: [Distutils] early preview of pythonv
Hi, please have a look into my little project: http://pyvm.sf.net It does exactly this integration (and build integration and run time testing) on several different linux distros. It works stright out of the svn py27 trunk but the work flow can be implemented for 3.x. Regards, Antonio On Wed 16/03/11 13:00, "Jim Fulton" jim@zope.com wrote:
On Wed, Mar 16, 2011 at 4:31 AM, Carl Meyer <carl@oddbird .net> wrote: Hello all,
Here at PyCon we've had some discussion about
building a virtualenv-alike into Python core for Python 3.3. The goal is to improve on virtualenv by providing something that does what virtualenv does without requiring a copied Python binary, symlinked/copied parts of the standard library, or a forked site.py.
(I'm not entirely sure that distutils-sig is the
right venue for discussing this, but it's the closest I know of and was recommended by others in our conversations here; if there's a better place please let me know; maybe python-ideas? The patch as is stands does affect sysconfig.py, which is used more by distutils than anything else.)
The idea we discussed is to add to Python's built-in site.py the ability to set paths up for a virtual environment, triggered by certain environment variables. Then, for convenience, there'll be a small executable which can be placed in the "bin/" directory of a virtual environment and knows how to set up these environment variables and then exec() the system Python binary.
Larry Hastings had already created this wrapper executable at last year's PyCon, and tonight I made the necessary modifications to site.py and sysconfig.py to support it on the Python side. The early prototype is now working well (at least on Linux; I think it ought to work on OS X, and should work partially on Windows as well), and I'd welcome review and comment: https://bitbucket.org/carljm/cpythonv Look in Tools/pythonv/README.rst for instructions.
This is an early prototype and will certainly require refinement (not to mention most likely a PEP, at some point). Please try it out and let me know if it works for you!
Carl,
Thanks for posting this. I'm very hopeful that buildout can use this same mechanism to get the isolation it needs. I would really appreciate it if buildout users who care about this would test it with buildout. In particular, I know of 2 basic use cases:
- Get complete isolation from local additions relative to the standard Python distribution.
- Have the ability to cherry pick some local additions while having isolation from the rest. (Gary and Ubuntu, I'm looking at you.)
Please, let's make sure this mechanism is enough. To raise the stakes a bit, when this mechanism is available, presumably in Python 3.3, I plan to use it exclusively to provide isolation in buildout.
Jim
-- Jim Fulton http://www.linkedin.com/in/jimfulton
Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Am 16.03.11 08:38, schrieb a.cavallo@cavallinux.eu:
Hi,
please have a look into my little project:
This redirects me to http://cclimited.webfactional.com/ Not sure whether it's the right page, if it is, I'm completely lost as to what this is all about. On the "Main" page, it apparently says nowhere what this actually *does*, only that multiple RPM files of it are available which pass their tests. The tutorial page offers me to learn "OBS", which apparently is the OpenSuSE build server, which appears to be unrelated to Python. Just my 0.02€. Regards, Martin
On 16 Mar 2011, at 12:47, Martin v. Löwis wrote:
Am 16.03.11 08:38, schrieb a.cavallo@cavallinux.eu:
Hi,
please have a look into my little project:
This redirects me to
http://cclimited.webfactional.com/
Not sure whether it's the right page, if it is, I'm completely lost as to what this is all about.
I do this in my spare time, I put some documentation from time to time.
On the "Main" page, it apparently says nowhere what this actually *does*, only that multiple RPM files of it are available which pass their tests.
The files are python interpreters build from subversion. There's a small runtime tests providing a minimal check the interpreter is not missing libraries, it was build and installed properly etc....
The tutorial page offers me to learn "OBS", which apparently is the OpenSuSE build server, which appears to be unrelated to Python.
It's a build server a generic service to build packages automatically.
Just my 0.02€.
Thank you, I'll see if I can put some are time into writing a better description, Regards, Antonio
participants (3)
-
"Martin v. Löwis" -
a.cavallo@cavallinux.eu -
Antonio Cavallo