[Numpy-svn] r8655 - trunk

numpy-svn@scip... numpy-svn@scip...
Fri Aug 20 05:48:41 CDT 2010


Author: rgommers
Date: 2010-08-20 05:48:41 -0500 (Fri, 20 Aug 2010)
New Revision: 8655

Modified:
   trunk/setupegg.py
Log:
3K: 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: trunk/setupegg.py
===================================================================
--- trunk/setupegg.py	2010-08-18 01:26:02 UTC (rev 8654)
+++ trunk/setupegg.py	2010-08-20 10:48:41 UTC (rev 8655)
@@ -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