Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
4 export PYBUILD_NAME=cbor2
5
6 export CBOR2_BUILD_C_EXTENSION=1
7
8 export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' | head -n 1)
9
10 %:
11 dh $@ --with python3,sphinxdoc --buildsystem=pybuild
12
13
14 # Upstream's rust/Cargo.lock pins exact versions and checksums of the crates
15 # fetched from crates.io. We build offline against the crates packaged in
16 # Debian (see cargo.toml.patch), whose versions do not necessarily match, so
17 # drop the lock file and let cargo resolve against /usr/share/cargo/registry.
18 override_dh_auto_configure:
19 rm -f rust/Cargo.lock
20 dh_auto_configure
21
22 override_dh_auto_build: export http_proxy=127.0.0.1:9
23 override_dh_auto_build: export https_proxy=127.0.0.1:9
24 override_dh_auto_build:
25 dh_auto_build
26 LANGUAGE='en_US:en' LC_ALL=C PYTHONPATH=. python3 -m sphinx -N -bhtml \
27 docs/ build/html
28
29 override_dh_auto_test:
30 dh_auto_test -- --test-pytest
31 find -name .coverage -delete
32
33 override_dh_auto_clean:
34 dh_auto_clean
35 rm -f python/cbor2.egg-info/SOURCES.txt
36 rm -rf rust/target