Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6 export FLIT_NO_NETWORK=True
7 export FLIT_ROOT_INSTALL=1
8 include /usr/share/dpkg/pkg-info.mk
9
10 %:
11 dh $@ --buildsystem=pybuild
12
13 override_dh_auto_clean:
14 set -e; \
15 if [ -e _removed ]; then \
16 mv _removed/vendor flit_core/flit_core/; \
17 rmdir _removed; \
18 fi
19 dh_auto_clean --name flit
20 dh_auto_clean -d flit_core --name flit_core
21
22 override_dh_auto_configure:
23 set -e; \
24 if [ -e flit_core/flit_core/vendor ]; then \
25 mkdir -p _removed; \
26 mv flit_core/flit_core/vendor _removed/; \
27 fi
28 pybuild --configure --name flit
29 pybuild --configure -d flit_core --name flit_core
30
31 override_dh_auto_build:
32 pybuild --build --name flit
33 pybuild --build -d flit_core --name flit_core
34
35 override_dh_auto_install:
36 pybuild --install --dest-dir debian/python3-flit --name flit
37 pybuild --install --dest-dir debian/python3-flit -d flit_core --name flit_core
38 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
39 sphinx-build -W -b man -D extensions='sphinx.ext.ifconfig,sphinxcontrib_github_alt' -D man_show_urls=1 doc/ debian/
40 endif
41 mkdir -p debian/flit/usr/bin/
42 mv debian/python3-flit/usr/bin/* debian/flit/usr/bin/
43 rmdir debian/python3-flit/usr/bin/
44
45 execute_after_dh_python3:
46 mv debian/flit.substvars debian/swap.substvars
47 mv debian/python3-flit.substvars debian/flit.substvars
48 mv debian/swap.substvars debian/python3-flit.substvars
49
50 override_dh_auto_test:
51 pybuild --test -d flit_core --name flit_core --test-pytest \
52 --before-test="cp -R {dir}/../README.rst {dir}/../LICENSE {dir}/tests_core {build_dir}" \
53 --after-test="rm -rf {build_dir}/README.rst {build_dir}/LICENSE {build_dir}/tests_core"