#1108532 python-django-import-export: please make the build reproducible

#1108532#5
Date:
2025-06-30 17:21:31 UTC
From:
To:
Hi,

Whilst working on the Reproducible Builds effort [0], we noticed that
python-django-import-export could not be built reproducibly.

This is because the testsuite generates files with nondetermistic
filenames under a django-import-export directory, which then gets
installed to under dist-packages in the binary package.

Patch attached that deletes these after the rest run.

 [0] https://reproducible-builds.org/


Regards,

#1108532#10
Date:
2026-05-30 02:50:56 UTC
From:
To:
...

This is still an issue, according to both reproduce.debian.net:

https://reproduce.debian.net/excuses.html?source_name=python-django-import-export

and tests.reproducible-builds.org:

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/python-django-import-export.html

Was able to confirm that the patch still fixes the issue.

I would like to perform an NMU applying this in next couple weeks,
please let me know if there are any outstanding concerns.

live well,
  vagrant

#1108532#15
Date:
2026-07-15 22:33:38 UTC
From:
To:
I have uploaded an NMU to DELAYED/10 with the following changes:

diff -Nru python-django-import-export-4.3.5/debian/changelog python-django-import-export-4.3.5/debian/changelog
--- python-django-import-export-4.3.5/debian/changelog	2025-06-27 19:08:00.000000000 -0700
+++ python-django-import-export-4.3.5/debian/changelog	2026-07-15 15:25:02.000000000 -0700
@@ -1,3 +1,13 @@
+python-django-import-export (4.3.5-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Chris Lamb ]
+  * Delete files after running test suite for reproducible build.
+    (Closes: #1108532)
+
+ -- Vagrant Cascadian <vagrant@reproducible-builds.org>  Wed, 15 Jul 2026 15:25:02 -0700
+
 python-django-import-export (4.3.5-2) unstable; urgency=medium

   * debian/rules: provide correct PYBUILD_NAME
diff -Nru python-django-import-export-4.3.5/debian/rules python-django-import-export-4.3.5/debian/rules
--- python-django-import-export-4.3.5/debian/rules	2025-06-27 19:08:00.000000000 -0700
+++ python-django-import-export-4.3.5/debian/rules	2026-07-15 15:25:02.000000000 -0700
@@ -4,6 +4,7 @@
 export PYBUILD_NAME=django-import-export
 export SETUPTOOLS_SCM_PRETEND_VERSION=$(DEB_VERSION_UPSTREAM)
 export DJANGO_SETTINGS_MODULE=tests.settings
+export PYBUILD_AFTER_TEST=rm -rfv {build_dir}/django-import-export/*

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


live well,
  vagrant