| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
export PYBUILD_NAME=cassandra |
| 4 |
|
| 5 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 6 |
|
| 7 |
# In case there's something wrong during cython generation, you may want to enable this |
| 8 |
#export CASS_DRIVER_NO_CYTHON=1 |
| 9 |
|
| 10 |
include /usr/share/dpkg/buildopts.mk |
| 11 |
# Enable parallel build |
| 12 |
ifeq ($(DEB_BUILD_OPTION_PARALLEL),) |
| 13 |
export CASS_DRIVER_BUILD_CONCURRENCY=0 |
| 14 |
else |
| 15 |
export CASS_DRIVER_BUILD_CONCURRENCY=$(DEB_BUILD_OPTION_PARALLEL) |
| 16 |
endif |
| 17 |
|
| 18 |
%: |
| 19 |
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) |
| 20 |
dh $@ --with sphinxdoc --buildsystem=pybuild |
| 21 |
else |
| 22 |
dh $@ --buildsystem=pybuild |
| 23 |
endif |
| 24 |
|
| 25 |
execute_after_dh_auto_clean: |
| 26 |
rm -rf build/ cassandra_driver.egg-info/ |
| 27 |
# Do not delete cmurmur3.c because we don't have proper Python extension |
| 28 |
# so it cannot be regenerated with cython |
| 29 |
find cassandra -maxdepth 1 -type f -name '*.c' ! -name 'cmurmur3.c' -delete |
| 30 |
|
| 31 |
execute_after_dh_auto_build: |
| 32 |
ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) |
| 33 |
PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html |
| 34 |
endif |
| 35 |
|
| 36 |
override_dh_auto_test: |
| 37 |
ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),) |
| 38 |
rm tests/integration -rf |
| 39 |
rm tests/stress_tests/test_multi_inserts.py tests/stress_tests/test_load.py tests/unit/io/test_eventletreactor.py tests/unit/cython/test_utils.py tests/unit/cython/test_bytesio.py |
| 40 |
ifeq ($(DEB_HOST_ARCH_ENDIAN),little) |
| 41 |
dh_auto_test -- --test-args "-k 'not test_timer_cancellation'" |
| 42 |
else |
| 43 |
-dh_auto_test |
| 44 |
endif |
| 45 |
endif |
| 46 |
|
| 47 |
execute_after_dh_auto_install: |
| 48 |
rm -rf debian/python*-dbg/usr/lib/python*/dist-packages/cassandra/numpyFlags.h |