summaryrefslogtreecommitdiff
path: root/pavement.py
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@googlemail.com>2011-03-24 16:30:06 +0100
committerRalf Gommers <ralf.gommers@googlemail.com>2011-03-27 11:33:36 +0200
commit87e12c1dfc90fae5d0a2576add0c1879df815740 (patch)
tree343d5c3f39f8b45d867ee502df0f14af85c3155d /pavement.py
parent7d436cc8994f9efbc51289fdf6c8c520b92e179c (diff)
downloadnumpy-87e12c1dfc90fae5d0a2576add0c1879df815740.tar.gz
BUG: Py3K: fix setup.py to work from a released tarball.
This was first fixed in commit 0131218 (but that broke the paver script), and broken again in commit 13212a5d. Should now work in both cases.
Diffstat (limited to 'pavement.py')
-rw-r--r--pavement.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/pavement.py b/pavement.py
index ff0eabc74..c5a52b455 100644
--- a/pavement.py
+++ b/pavement.py
@@ -77,7 +77,18 @@ from paver.easy import \
sys.path.insert(0, os.path.dirname(__file__))
try:
setup_py = __import__("setup")
- FULLVERSION = setup_py.FULLVERSION
+ FULLVERSION = setup_py.VERSION
+ # This is duplicated from setup.py
+ if os.path.exists('.git'):
+ GIT_REVISION = setup_py.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
+ else:
+ GIT_REVISION = "Unknown"
+
+ if not setup_py.ISRELEASED:
+ FULLVERSION += '.dev-' + GIT_REVISION[:7]
finally:
sys.path.pop(0)
@@ -474,6 +485,7 @@ def dmg(options):
ref = os.path.join(options.doc.destdir_pdf, "reference.pdf")
user = os.path.join(options.doc.destdir_pdf, "userguide.pdf")
if (not os.path.exists(ref)) or (not os.path.exists(user)):
+ import warnings
warnings.warn("Docs need to be built first! Can't find them.")
# Build the mpkg package