[Checkins] SVN: zc.buildout/trunk/ Avoid environment variables with a dot in them
Alexandru Plugaru
alexandru.plugaru at gmail.com
Mon Mar 14 14:18:04 EDT 2011
Log message for revision 120916:
Avoid environment variables with a dot in them
Changed:
U zc.buildout/trunk/DEVELOPERS.txt
U zc.buildout/trunk/src/zc/buildout/testing.py
-=-
Modified: zc.buildout/trunk/DEVELOPERS.txt
===================================================================
--- zc.buildout/trunk/DEVELOPERS.txt 2011-03-14 17:42:25 UTC (rev 120915)
+++ zc.buildout/trunk/DEVELOPERS.txt 2011-03-14 18:18:03 UTC (rev 120916)
@@ -12,10 +12,14 @@
+1 for testing:
-- You should have specific python versions at specific locations or
- PYTHONx.x environment variables pointing to those
+- You should have specific python executable versions at specific locations or
+ PYTHONxy environment variables pointing to those
See zc.buildout testing.py, def find_python(version)
- The way to start the tests for Python 2.5 for instance would be::
+ If you use python2.5 to test then the test runner will look for
+ python2.6 in your path. If you use any other python version it will look for
+ python2.5 in your path or it will look for the PYTHON25 environment variable.
+
+ To start the tests with Python 2.7 for instance would be::
- $ env PYTHON2.5=/path/to/python2.5 bin/test
+ $ env PYTHON25=/path/to/bin/python2.5 bin/test
Modified: zc.buildout/trunk/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/testing.py 2011-03-14 17:42:25 UTC (rev 120915)
+++ zc.buildout/trunk/src/zc/buildout/testing.py 2011-03-14 18:18:03 UTC (rev 120916)
@@ -160,11 +160,13 @@
'--single-version-externally-managed')
def find_python(version):
- e = os.environ.get('PYTHON%s' % version)
+ env_friendly_version = ''.join(version.split('.'))
+
+ e = os.environ.get('PYTHON%s' % env_friendly_version)
if e is not None:
return e
if is_win32:
- e = '\Python%s%s\python.exe' % tuple(version.split('.'))
+ e = '\Python%s\python.exe' % env_friendly_version
if os.path.exists(e):
return e
else:
More information about the checkins
mailing list