diff options
author | David Cournapeau <cournape@gmail.com> | 2009-05-16 09:46:10 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2009-05-16 09:46:10 +0000 |
commit | 653653af44cb60a2d2840c4a1ce56fea6d5904b2 (patch) | |
tree | 133e5d1a0d2db05f556a544d42e1baf7f1b9eeb1 /setupscons.py | |
parent | e090679430cb3be55c27d07dfac62f08c0f4ac78 (diff) | |
download | numpy-653653af44cb60a2d2840c4a1ce56fea6d5904b2.tar.gz |
Fix setupscons.py so that the version.py is correctly generated.
Diffstat (limited to 'setupscons.py')
-rwxr-xr-x | setupscons.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/setupscons.py b/setupscons.py index 802f4f907..890d4795d 100755 --- a/setupscons.py +++ b/setupscons.py @@ -38,6 +38,14 @@ Operating System :: MacOS # update it when the contents of directories change. if os.path.exists('MANIFEST'): os.remove('MANIFEST') +sys.path.insert(0, os.path.dirname(__file__)) +try: + setup_py = __import__("setup") + FULLVERSION = setup_py.FULLVERSION + write_version_py = setup_py.write_version_py +finally: + sys.path.pop(0) + # This is a bit hackish: we are setting a global variable so that the main # numpy __init__ can detect if it is being loaded by the setup routine, to # avoid attempting to load components that aren't built yet. While ugly, it's @@ -84,6 +92,10 @@ def setup_package(): os.chdir(local_path) sys.path.insert(0,local_path) + # Rewrite the version file everytime + if os.path.exists('numpy/version.py'): os.remove('numpy/version.py') + write_version_py() + try: setup( name = 'numpy', |