Skip to content

Commit b159fc1

Browse files
committed
ENH: more targetting cleaning of cythonized sources
1 parent 9094e83 commit b159fc1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

debian/rules

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ EXCLUDE_MORETESTS :=
2020
: # Explicit build system to avoid use of all-in-1 Makefile
2121
dh $@ --buildsystem=python_distutils
2222

23-
cythonize:
24-
find pandas/src -iname *.c -delete
23+
clean_generated:
24+
grep -l -e 'Generated by Cython' pandas/src/*.c | xargs -r rm -f
25+
26+
cythonize: clean_generated
2527
python setup.py cython
2628
cp pandas/src/*.c debian/cythonized-files
2729
echo "$(UVER)" >| debian/cythonized-files/VERSION
@@ -32,11 +34,10 @@ override_dh_auto_configure:
3234
cp -rp debian/cythonized-files/*.c pandas/src/; } || :
3335
dh_auto_configure
3436

35-
override_dh_clean:
37+
override_dh_clean: clean_generated
3638
: # Make sure that cythonized sources are up-to-date
3739
[ "$(UVER)" = "`cat debian/cythonized-files/VERSION`" ]
3840
rm -rf build doc/_build *-stamp # pandas.egg-info pandas/datasets/__config__.py
39-
grep -l -e 'Generated by Cython' pandas/src/*.c | xargs -r rm -f
4041
dh_clean
4142
: # prune auto-generated version.py -- will be generated during build again
4243
rm -f pandas/version.py

0 commit comments

Comments
 (0)