[arch-commits] Commit in python-calmjs.parse/trunk (PKGBUILD)
David Runge
dvzrv at archlinux.org
Wed Jul 15 22:03:41 UTC 2020
Date: Wednesday, July 15, 2020 @ 22:03:41
Author: dvzrv
Revision: 664017
upgpkg: python-calmjs.parse 1.2.5-3: Rebuilding for reproducibility.
Generating required symbol tables for lex and yacc (python-ply) in prepare().
Using PYTHONDONTWRITEBYTECODE=1 in check() to not create .pyc files there.
Pin the version of python-ply because the created symbol table files are bound to it.
Modified:
python-calmjs.parse/trunk/PKGBUILD
----------+
PKGBUILD | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-07-15 21:31:59 UTC (rev 664016)
+++ PKGBUILD 2020-07-15 22:03:41 UTC (rev 664017)
@@ -3,12 +3,12 @@
_name=calmjs.parse
pkgname=python-calmjs.parse
pkgver=1.2.5
-pkgrel=2
+pkgrel=3
pkgdesc="Various parsers for ECMA standards"
arch=('any')
url="https://github.com/calmjs/calmjs.parse"
license=('MIT')
-depends=('python-ply')
+depends=('python-ply=3.11')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.zip")
@@ -17,6 +17,11 @@
prepare() {
mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
+ cd "$pkgname-$pkgver"
+ # generate symbol tables required for lex and yacc
+ # this requires version pinning towards python-ply!
+ PYTHONPATH="src:${PYTHONPATH}" \
+ python -m calmjs.parse.parsers.optimize
}
build() {
@@ -27,10 +32,7 @@
check() {
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
+ PYTHONDONTWRITEBYTECODE=1 pytest -v
}
package() {
More information about the arch-commits
mailing list