Skip to content

Commit b5d2a0a

Browse files
committed
Added a stamp file with upstream version to assure up-to-dateness of the generated files
1 parent 3eb9db0 commit b5d2a0a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

debian/changelog

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
pandas (0.7.0~rc1+git183-gcc2a8a7-1) UNRELEASED; urgency=low
22

33
* Testing fresh upstream snapshot prior release
4-
* Updated pre-cythoned .c files for older Debian/Ubuntu releases
4+
* Updated pre-cythoned .c files for older Debian/Ubuntu releases.
5+
Added a stamp file with upstream version to assure up-to-dateness
6+
of the generated files
57
* Dropped all exclusions of unittests and patches -- shouldn't be necessary
68
any longer
79
* Build only for requested versions (not all supported) of Python

debian/cythonized-files/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.7.0~rc1+git183-gcc2a8a7

debian/rules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ PACKAGE_ROOT_DIR = debian/${PACKAGE_NAME}
77
PYVERS = $(shell pyversions -vr)
88
PYVER = $(shell pyversions -vd)
99

10+
UVER := $(shell LC_ALL=C dpkg-parsechangelog | awk '/^Version:/{print $$2;}' | sed -e 's,-[^-]*$$,,g')
1011
CYTHONVER := $(shell dpkg -l cython | awk '/^ii/{print $$3;}' || echo 0)
1112
MPLVER := $(shell dpkg -l python-matplotlib | awk '/^ii/{print $$3;}' || echo 0)
1213

@@ -23,6 +24,7 @@ cythonize:
2324
find pandas/src -iname *.c -delete
2425
python setup.py cython
2526
cp pandas/src/*.c debian/cythonized-files
27+
echo "$(UVER)" >| debian/cythonized-files/VERSION
2628

2729
override_dh_auto_configure:
2830
dpkg --compare-versions $(CYTHONVER) lt $(MIN_CYTHONVER) && { \
@@ -31,6 +33,8 @@ override_dh_auto_configure:
3133
dh_auto_configure
3234

3335
override_dh_clean:
36+
: # Make sure that cythonized sources are up-to-date
37+
[ "$(UVER)" = "`cat debian/cythonized-files/VERSION`" ]
3438
rm -rf build doc/_build *-stamp # pandas.egg-info pandas/datasets/__config__.py
3539
grep -l -e 'Generated by Cython' pandas/src/*.c | xargs -r rm -f
3640
dh_clean

0 commit comments

Comments
 (0)