Source: pyxnat
Version: 1.6.3-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: nocheck
X-Debbugs-Cc: [email protected]
Hi,
Whilst working on the Reproducible Builds effort [0], we noticed that
pyxnat could not be built reproducibly.
This was because it ships a different binary package depending
on whether the tests are run or not. This was caused by the testsuite
not cleaning up some generated files that ended up in the .deb (but
only if the testsuite was run.)
Patch attached that removes these files after running the tests
via PYBUILD_AFTER_TEST.
[0] https://reproducible-builds.org/
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` [email protected] / chris-lamb.co.uk
`-
--- a/debian/rules 2025-11-19 12:31:52.852291446 -0800
--- b/debian/rules 2025-11-19 12:42:59.042678127 -0800
@@ -18,6 +18,14 @@
; rm -f {build_dir}/pyxnat/tests/user_and_project_management_test.py \
; rm -f {build_dir}/pyxnat/tests/xpath_test.py
+export PYBUILD_AFTER_TEST=set -e \
+ ; rm {build_dir}/pyxnat/tests/central.cfg \
+ ; rm {build_dir}/pyxnat/tests/sess.xml \
+ ; rm {build_dir}/pyxnat/tests/results.csv \
+ ; rm {build_dir}/pyxnat/tests/hello_again.txt \
+ ; rm {build_dir}/pyxnat/tests/hello_dir.zip \
+ ; rm {build_dir}/pyxnat/tests/hello_xnat.txt
+
export PYXNAT_SKIP_NETWORK_TESTS=yes
PYBUILD_TEST_ARGS_python3=-k-Xtest_close_jsession -k-Xtest_001_sessionmirror