#!/usr/bin/make -f export PYBUILD_NAME=cassandra export DEB_BUILD_MAINT_OPTIONS = hardening=+all # In case there's something wrong during cython generation, you may want to enable this #export CASS_DRIVER_NO_CYTHON=1 include /usr/share/dpkg/buildopts.mk # Enable parallel build ifeq ($(DEB_BUILD_OPTION_PARALLEL),) export CASS_DRIVER_BUILD_CONCURRENCY=0 else export CASS_DRIVER_BUILD_CONCURRENCY=$(DEB_BUILD_OPTION_PARALLEL) endif %: ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) dh $@ --with sphinxdoc --buildsystem=pybuild else dh $@ --buildsystem=pybuild endif execute_after_dh_auto_clean: rm -rf build/ cassandra_driver.egg-info/ # Do not delete cmurmur3.c because we don't have proper Python extension # so it cannot be regenerated with cython find cassandra -maxdepth 1 -type f -name '*.c' ! -name 'cmurmur3.c' -delete execute_after_dh_auto_build: ifeq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ build/html endif override_dh_auto_test: ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),) rm tests/integration -rf 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 ifeq ($(DEB_HOST_ARCH_ENDIAN),little) dh_auto_test -- --test-args "-k 'not test_timer_cancellation'" else -dh_auto_test endif endif execute_after_dh_auto_install: rm -rf debian/python*-dbg/usr/lib/python*/dist-packages/cassandra/numpyFlags.h