Skip to content

Commit d8d2fbf

Browse files
committed
debian/rules - Generate pandas/version.py if not present out of debian/changelog upstream version information (versioneer wouldn't know since relies on git)
1 parent 055b7a3 commit d8d2fbf

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

debian/changelog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ pandas (0.17.0~rc1+git92-gc6bcc99-1) unstable; urgency=medium
44
- Started to trigger failures of test_constructor_compound_dtypes and
55
test_invalid_index_types -- disabled those for now, see
66
https://github.com/pydata/pandas/issues/11169
7+
* debian/rules
8+
- Generate pandas/version.py if not present out of debian/changelog
9+
upstream version information (versioneer wouldn't know since relies on
10+
git)
711

812
-- Yaroslav Halchenko <[email protected]> Tue, 22 Sep 2015 10:35:36 -0400
913

debian/rules

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ PY3VERS = $(shell py3versions -vr)
1818
PY3VER = $(shell py3versions -vd)
1919

2020
UVER := $(shell LC_ALL=C dpkg-parsechangelog | awk '/^Version:/{print $$2;}' | sed -e 's,-[^-]*$$,,g')
21+
UVER_SHORT := $(shell echo $(UVER) | sed -e 's,[~],,g' -e 's,+git.*,,g')
2122

2223
MIN_CYTHONVER = 0.20.2
2324

@@ -75,9 +76,14 @@ override_dh_clean: clean_generated
7576
: # prune auto-generated version.py -- will be generated during build again
7677
rm -f pandas/version.py
7778

78-
override_dh_auto_build:
79+
version_py:
80+
[ -e pandas/version.py ] || \
81+
echo -e "version = '$(UVER)'\nshort_version = '$(UVER_SHORT)'" > pandas/version.py
82+
83+
override_dh_auto_build: version_py
7984
# Override default build operation which --force's re-cythonization
8085
# on elderly ubuntus
86+
# Just build the version.py file
8187
:
8288

8389
override_dh_auto_install: ${PYVERS:%=python-install%} ${PY3VERS:%=python-install%} ${PYVERS:%=python-test%} ${PY3VERS:%=python-test%}

0 commit comments

Comments
 (0)