diff options
author | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-04-17 16:04:11 +0200 |
---|---|---|
committer | Ralf Gommers <ralf.gommers@googlemail.com> | 2011-04-20 22:19:55 +0200 |
commit | cd6d53ffc62562e3627b991a376512a4c1b78e1a (patch) | |
tree | 3d5a08451d234bda6802b21d7fd5609783a2cbdb /setup.py | |
parent | f98ffb560c54a804036dbdb04d21090c22853dc1 (diff) | |
download | numpy-cd6d53ffc62562e3627b991a376512a4c1b78e1a.tar.gz |
BLD: raise a clearer warning in case of building without cleaning up first.
Occurs only on Python 3.x when a version.py file is already present, due to
copying the whole tree into build/pyk3/.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -114,7 +114,12 @@ if not release: GIT_REVISION = git_version() elif os.path.exists('numpy/version.py'): # must be a source distribution, use existing version file - from numpy.version import git_revision as GIT_REVISION + try: + from numpy.version import git_revision as GIT_REVISION + except ImportError: + raise ImportError("Unable to import git_revision. Try removing " \ + "numpy/version.py and the build directory " \ + "before building.") else: GIT_REVISION = "Unknown" |