Commit 8f1a8c9a authored by alex_plugaru's avatar alex_plugaru

Avoid environment variables with a dot in them

git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@120916 62d5b8a3-27da-0310-9561-8e5933582275
parent 2a69d9ac
...@@ -12,10 +12,14 @@ When you're developing buildout itself, you need to know two things: ...@@ -12,10 +12,14 @@ When you're developing buildout itself, you need to know two things:
+1 for testing: +1 for testing:
- You should have specific python versions at specific locations or - You should have specific python executable versions at specific locations or
PYTHONx.x environment variables pointing to those PYTHONxy environment variables pointing to those
See zc.buildout testing.py, def find_python(version) 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
...@@ -160,11 +160,13 @@ def sys_install(setup, dest): ...@@ -160,11 +160,13 @@ def sys_install(setup, dest):
'--single-version-externally-managed') '--single-version-externally-managed')
def find_python(version): 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: if e is not None:
return e return e
if is_win32: 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): if os.path.exists(e):
return e return e
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment