[arch-commits] Commit in python-calmjs.parse/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Wed Jul 15 20:01:39 UTC 2020


    Date: Wednesday, July 15, 2020 @ 20:01:39
  Author: dvzrv
Revision: 663991

upgpkg: python-calmjs.parse 1.2.5-2: Rebuilding for reproducibility.

Exporting PYTHONHASHSEED so .pyc files stay reproducible.
Removing files created during test, that make the package unreproducible and opening upstream ticket.

Modified:
  python-calmjs.parse/trunk/PKGBUILD

----------+
 PKGBUILD |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-07-15 19:50:31 UTC (rev 663990)
+++ PKGBUILD	2020-07-15 20:01:39 UTC (rev 663991)
@@ -3,7 +3,7 @@
 _name=calmjs.parse
 pkgname=python-calmjs.parse
 pkgver=1.2.5
-pkgrel=1
+pkgrel=2
 pkgdesc="Various parsers for ECMA standards"
 arch=('any')
 url="https://github.com/calmjs/calmjs.parse"
@@ -13,6 +13,7 @@
 checkdepends=('python-pytest')
 source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.zip")
 sha512sums=('3614c1f495fa1ca746a8dd0813629da14115f4ef401176e389515239700849770b7c408d2ebdf55c8286dbde0b8f1b711f7ec4e4f3858f0477b39455a50bbe5a')
+b2sums=('9e3f81a99cf346b4ff61fa8f97bc3fa4c667d7dece38c47c512931508d5592b82143b0507e8e5190f2dd07f3596b6d146a90e59bad1a1c44d8f398a51ff0fb48')
 
 prepare() {
   mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
@@ -27,14 +28,17 @@
   cd "$pkgname-$pkgver"
   export PYTHONPATH="build:${PYTHONPATH}"
   pytest -v
+  # remove files created by tests, making package unreproducible:
+  # https://github.com/calmjs/calmjs.parse/issues/34
+  rm -v src/calmjs/parse/parsers/{lex,yacc}tab_es5_py3_ply3_11.py
 }
 
 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 {CHANGES,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