File: rules

package info (click to toggle)
py7zr 0.11.3%2Bdfsg-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,740 kB
  • sloc: python: 6,786; makefile: 198; ansic: 35
file content (28 lines) | stat: -rwxr-xr-x 1,661 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /usr/bin/make -f

export PYBUILD_NAME=py7zr

%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_clean:
	PYBUILD_SYSTEM=custom PYBUILD_CLEAN_ARGS="{interpreter} debian/setup.py clean" dh_auto_clean

override_dh_auto_install:
	PYBUILD_SYSTEM=custom PYBUILD_INSTALL_ARGS="{interpreter} debian/setup.py install --root={destdir} --install-layout=deb" dh_auto_install

override_dh_auto_test:
	# test_compress_* require tests/data/lib, which we removed due to missing copyright
	# test_concurrent_futures tries to access internet
	# test_bcj_* uses binary files removed dues to missing copyright
	# test_cli, test_archive_already_exist, test_volume_creation_wrong_volume_unit uses importlib_metadata which requires an egg-info dir, which we cant build (bdist_egg) because setuptools_scm cant detect a version
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="PYTHONPATH=$(CURDIR) {interpreter} -m pytest tests/ -k 'not test_compress_arm64 and not test_compress_ppc and not test_compress_ia64 and not test_compress_sparc and not test_compress_armt and not test_concurrent_futures and not test_bcj_encode and not test_bcj_decode and not test_cli_no_subcommand and not test_cli_info and not test_archive_already_exist and not test_volume_creation_wrong_volume_unit'" dh_auto_test

override_dh_auto_build-indep:
	dh_auto_build -i
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	cd docs && \
	PYTHONPATH=$(CURDIR) http_proxy='http://127.0.0.1:9/' https_proxy='https://127.0.0.1:9/' \
	sphinx-build -N -E -T -b html . $(CURDIR)/.pybuild/docs/html/ #debian/python-py7zr-doc/usr/share/doc/python-py7zr-doc
	rm -rf $(CURDIR)/.pybuild/docs/html/.doctrees
endif