Date: Monday, October 19, 2020 @ 13:04:27
  Author: diabonas
Revision: 727103

upgpkg: diffoscope 160-2: improve reproducibility

Use PYTHONHASHSEED=0 to make the generated bytecode files reproducible and
PYTHONDONTWRITEBYTECODE=1 to avoid writing bytecode files for the tests
altogether (so that it does not matter if the package is reproduced with the
test suite enabled or not).

Modified:
  diffoscope/trunk/PKGBUILD

----------+
 PKGBUILD |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2020-10-19 13:01:35 UTC (rev 727102)
+++ PKGBUILD    2020-10-19 13:04:27 UTC (rev 727103)
@@ -2,7 +2,7 @@
 
 pkgname=diffoscope
 pkgver=160
-pkgrel=1
+pkgrel=2
 pkgdesc='Tool for in-depth comparison of files, archives, and directories'
 url='https://diffoscope.org/'
 arch=('x86_64')
@@ -83,7 +83,7 @@
 
 check() {
   cd ${pkgname}-${pkgver}
-  PYTHONPATH=".:${PYTHONPATH}" py.test \
+  PYTHONPATH=".:${PYTHONPATH}" PYTHONDONTWRITEBYTECODE=1 py.test \
     -k 'not test_ppu and not test_superblock and not test_wasm' # unsquashfs 
output differs from fixture.
     # ppu bug https://salsa.debian.org/reproducible-builds/diffoscope/issues/9
 }
@@ -90,6 +90,7 @@
 
 package() {
   cd ${pkgname}-${pkgver}
+  export PYTHONHASHSEED=0
   python setup.py install --skip-build -O1 --root="${pkgdir}"
   install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
   install -Dm 644 doc/diffoscope.1 -t "${pkgdir}/usr/share/man/man1"

Reply via email to