diff options
author | rgommers <ralf.gommers@googlemail.com> | 2010-08-20 10:48:41 +0000 |
---|---|---|
committer | rgommers <ralf.gommers@googlemail.com> | 2010-08-20 10:48:41 +0000 |
commit | 24eb850158bfe431607a18b88bca7c379db8c4d3 (patch) | |
tree | bbfbd7b6e8d0f2e62617cffcd590fa7ad8579b3b /setupegg.py | |
parent | e777aafcf83e188419cec2b28fe7c1686a32ece0 (diff) | |
download | numpy-24eb850158bfe431607a18b88bca7c379db8c4d3.tar.gz |
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.
Diffstat (limited to 'setupegg.py')
-rwxr-xr-x | setupegg.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/setupegg.py b/setupegg.py index 31e8b3aed..3ed1e0b0b 100755 --- a/setupegg.py +++ b/setupegg.py @@ -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') |