| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/architecture.mk |
| 4 |
|
| 5 |
export DEB_BUILD_MAINT_OPTIONS=hardening=+all |
| 6 |
export PYBUILD_NAME=backports.zstd |
| 7 |
|
| 8 |
# Use Debian's zstd library |
| 9 |
export PYBUILD_BUILD_ARGS = --config-setting="--build-option=--system-zstd" |
| 10 |
|
| 11 |
# These test requires installation to system before testing |
| 12 |
DISABLE_TESTS = |
| 13 |
DISABLE_TESTS += not test_bad_use |
| 14 |
DISABLE_TESTS += and not test_create_command |
| 15 |
DISABLE_TESTS += and not test_create_command_compressed |
| 16 |
DISABLE_TESTS += and not test_create_command_dot_started_filename |
| 17 |
DISABLE_TESTS += and not test_create_command_dotless_filename |
| 18 |
DISABLE_TESTS += and not test_extract_command |
| 19 |
DISABLE_TESTS += and not test_extract_command_different_directory |
| 20 |
DISABLE_TESTS += and not test_extract_command_invalid_file |
| 21 |
DISABLE_TESTS += and not test_list_command_invalid_file |
| 22 |
DISABLE_TESTS += and not test_test_command |
| 23 |
DISABLE_TESTS += and not test_test_command_invalid_file |
| 24 |
|
| 25 |
# Ignore test failure on Hurd |
| 26 |
ifeq ($(DEB_HOST_ARCH_OS),hurd) |
| 27 |
DISABLE_TESTS += and not test_realpath_limit_attack |
| 28 |
endif |
| 29 |
|
| 30 |
export PYBUILD_TEST_ARGS = -k "$(DISABLE_TESTS)" |
| 31 |
|
| 32 |
# Module does not build successfully with Python 3.14 (segfaults during tests) |
| 33 |
export PYBUILD_DISABLE=python3.14 |
| 34 |
|
| 35 |
%: |
| 36 |
dh $@ --buildsystem=pybuild |
| 37 |
|
| 38 |
# We need the package to be installable with Python 3.14 and so removing the |
| 39 |
# versioned restrictions against 3.14 (python3 << 3.14) is needed. For |
| 40 |
# Python 3.14, packages wanting zstd should be using it from stdlib not this |
| 41 |
# package |
| 42 |
execute_after_dh_python3: |
| 43 |
sed -i s/3.14/3.15/ debian/python3-backports.zstd.substvars |