[arch-commits] Commit in python-django-appconf/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Wed Jul 15 21:01:45 UTC 2020


    Date: Wednesday, July 15, 2020 @ 21:01:45
  Author: dvzrv
Revision: 664003

upgpkg: python-django-appconf 1.0.4-2: Rebuilding for reproducibility.

Exporting PYTHONHASHSEED so .pyc files stay reproducible.
Removing prepopulated __pycache__ directory before build() and after check() as it makes the package non-reproducible.

Modified:
  python-django-appconf/trunk/PKGBUILD

----------+
 PKGBUILD |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-15 21:01:08 UTC (rev 664002)
+++ PKGBUILD	2020-07-15 21:01:45 UTC (rev 664003)
@@ -3,7 +3,7 @@
 _name=django-appconf
 pkgname=python-django-appconf
 pkgver=1.0.4
-pkgrel=1
+pkgrel=2
 pkgdesc="An app to handle configuration defaults of packaged Django apps gracefully"
 arch=('any')
 url="https://github.com/django-compressor/django-appconf"
@@ -13,9 +13,14 @@
 checkdepends=('python-coverage' 'python-pytest')
 source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
 sha512sums=('0d0a206d43d4c6d7f3dbe5fb6423f5f012dae42bae7459f3ee06501f9c126e73f69a30da5c34c84014e582a7b42f253ebd37ece8b8477963cb5d2357ca095639')
+b2sums=('21af3c3913aafe6a7670256bb10e80d0ac286fdeea646f91e8696470be3c1dcfb0b6d04e626f80784de02693583bf0b7a16da658175f8a1d81200a5c837831ee')
 
 prepare() {
   mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+  cd "$pkgname-$pkgver"
+  # removing pre-populated __pycache__ directory
+  # https://github.com/django-compressor/django-appconf/issues/72
+  rm -rf tests/__pycache__
 }
 
 build() {
@@ -27,14 +32,15 @@
   cd "$pkgname-$pkgver"
   export PYTHONPATH="${PWD}:build:${PYTHONPATH}"
   DJANGO_SETTINGS_MODULE=tests.test_settings coverage run /usr/bin/django-admin.py test -v2 tests
+  rm -rf tests/__pycache__
 }
 
 package() {
   cd "$pkgname-$pkgver"
+  export PYTHONHASHSEED=0
   python setup.py install --skip-build \
-    --optimize=1 \
-    --prefix=/usr \
-    --root="${pkgdir}"
+                          --optimize=1 \
+                          --root="${pkgdir}"
   install -vDm 644 {AUTHORS,README.rst} -t "${pkgdir}/usr/share/doc/${pkgname}"
   install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
 }


More information about the arch-commits mailing list