Changeset: 0f393b47f877 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f393b47f877
Modified Files:
testing/Mtest.py.in
Branch: Aug2011
Log Message:
Mtest: Deal with Ubuntu's dist-packages.
Ubuntu uses both dist-packages and site-packages. Add both to
sys.path so that we can find all our Python modules.
diffs (16 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -121,7 +121,11 @@ except ImportError:
if os.name != "nt" and os.uname()[0] + os.uname()[2][:1] == "Darwin9"
and sys.version[:5] == "2.5.1":
p =
_configure(os.path.join('@QXprefix@',distutils.sysconfig.get_python_lib(0,1,""),'site-packages'))
else:
- p =
_configure(os.path.join('@QXprefix@',distutils.sysconfig.get_python_lib(0,0,"")))
+ p = distutils.sysconfig.get_python_lib(0, 0, '')
+ if p.endswith('dist-packages'):
+ # Ubuntu
+ sys.path.insert(0, _configure(os.path.join('QXprefix@',
p.replace('dist-packages', 'site-packages'))))
+ p = _configure(os.path.join('@QXprefix@', p))
sys.path.insert(0, p)
import MonetDBtesting.subprocess26 as subprocess
if os.environ.has_key('PYTHONPATH'):
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list