[Python-Dev] draft PEP: virtual environments (original) (raw)
Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Nov 1 09:15:40 CET 2011
- Previous message: [Python-Dev] draft PEP: virtual environments
- Next message: [Python-Dev] cpython (3.2): adjust braces a bit
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Martin v. Löwis <martin v.loewis.de> writes:
I'm not sure how many scripts you are talking about, and how long they are. Assuming there are free, and assuming they are short, I'd not make them separate source files again, but put them into string literals instead:
scripts = { _'start':'''_ #!/bin/sh echo start ''', _'stop':'''_ #!/bin/sh echo stop ''' }}} Then, your installscripts would take a dictionary filename:script contents. That's just as easily extensible.
True, but while the default scripts are not too long, third party scripts might be not amenable to this treatment. Plus, there can be binary executables in there too: at the moment, the pysetup3 script on Windows is shipped as a stub executable pysetup3.exe and a script pysetup3-script.py (since we can't rely on the PEP 397 launcher being available, this is the only way of being sure that the correct Python gets to run the script).
I've changed the implementation now to use a directory tree, and the API takes the absolute pathname of the directory containing the scripts.
Regards,
Vinay Sajip
- Previous message: [Python-Dev] draft PEP: virtual environments
- Next message: [Python-Dev] cpython (3.2): adjust braces a bit
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]