[Numpy-svn] r8668 - branches/1.5.x
numpy-svn at scipy.org
numpy-svn at scipy.org
Wed Aug 25 08:40:23 EDT 2010
Author: rgommers
Date: 2010-08-25 07:40:23 -0500 (Wed, 25 Aug 2010)
New Revision: 8668
Modified:
branches/1.5.x/setupegg.py
Log:
3K: (backport of r8655) make setupegg.py work through imp.
Necessary because execfile() has disappeared in py3k. None of this works with
bdist_mpkg at the moment, but that's a separate problem.
Modified: branches/1.5.x/setupegg.py
===================================================================
--- branches/1.5.x/setupegg.py 2010-08-25 12:35:05 UTC (rev 8667)
+++ branches/1.5.x/setupegg.py 2010-08-25 12:40:23 UTC (rev 8668)
@@ -1,7 +1,24 @@
#!/usr/bin/env python
"""
A setup.py script to use setuptools, which gives egg goodness, etc.
+
+This is used to build installers for OS X through bdist_mpkg.
+
+Notes
+-----
+Using ``python setupegg.py install`` directly results in file permissions being
+set wrong, with nose refusing to run any tests. To run the tests anyway, use::
+
+ >>> np.test(extra_argv=['--exe'])
+
"""
+import sys
from setuptools import setup
-execfile('setup.py')
+
+if sys.version_info[0] >= 3:
+ import imp
+ setupfile = imp.load_source('setupfile', 'setup.py')
+ setupfile.setup_package()
+else:
+ execfile('setup.py')
More information about the Numpy-svn
mailing list