#!/usr/bin/make -f export DH_VERBOSE = 1 include /usr/share/dpkg/pkg-info.mk include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/buildflags.mk include /usr/share/rustc/architecture.mk export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE export CARGO=/usr/share/cargo/bin/cargo export CARGO_HOME=$(shell pwd)/debian/cargo_home export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow export PYBUILD_NAME=cryptography export PYBUILD_TEST_PYTEST=1 export PYBUILD_TEST_ARGS={dir}/tests/ export PYBUILD_BEFORE_TEST=cp -R {dir}/src/${PYBUILD_NAME}.egg-info {build_dir} export PYBUILD_AFTER_TEST=rm -r {build_dir}/.hypothesis %: dh $@ --buildsystem=pybuild override_dh_auto_clean: dh_auto_clean rm -rf src/rust/target rm -rf debian/cargo_registry override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) PYTHONPATH=./src python3 -m sphinx -b html -N docs/ \ $(CURDIR)/debian/python-cryptography-doc/usr/share/doc/python-cryptography-doc/html dh_sphinxdoc endif override_dh_auto_configure: $(CARGO) prepare-debian debian/cargo_registry --link-from-system mkdir -p src/rust/target/release ln -sf ../$(DEB_HOST_RUST_TYPE)/release/libcryptography_rust.so src/rust/target/release/libcryptography_rust.so rm -f src/rust/Cargo.lock dh_auto_configure override_dh_dwz: dh_dwz --no-dwz-multifile override_dh_python3: # We patch it out of .dist-info to avoid pkg_resources complaining (#1026537) dh_python3 --depends=cffi