diff options
author | Bradford Smith | 2021-02-22 18:08:02 -0500 |
---|---|---|
committer | Bradford Smith | 2021-02-22 18:08:02 -0500 |
commit | 02209bc89f55a2f0438e7098c5533a342b840577 (patch) | |
tree | 9e2e9dda3122f1c77110f9d37969089b9981f614 /PKGBUILD | |
parent | 4810ee78c92f43f18c4ae0510ef15e3a21517148 (diff) | |
download | aur-02209bc89f55a2f0438e7098c5533a342b840577.tar.gz |
Make python bytecode reproducible and pin to system python
Update package building to match recommendations in [1] for optimization
as well as building a reproducible bytecode.
This also pins to /usr/bin/python instead of just calling python to
avoid possible issues with virtual environments when installing.
[1]: https://wiki.archlinux.org/index.php/Python%20package%20guidelines
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,7 +1,7 @@ # Maintainer: Bradford Smith <aur@bradfords.me> pkgname=informant -pkgver=0.4.1 +pkgver=0.4.2 pkgrel=1 pkgdesc="An Arch Linux News reader and pacman hook" arch=('any') @@ -10,16 +10,17 @@ license=('MIT') install=informant.install depends=('python' 'python-docopt' 'python-dateutil' 'python-feedparser' 'python-html2text' 'python-cachecontrol' 'python-lockfile') source=("https://github.com/bradford-smith94/$pkgname/archive/v$pkgver.tar.gz") -sha256sums=('e616dd32d275fccfeaa65fa1890d706075dd5f54a2b03351349adb40b308c8ca') +sha256sums=('a4e6138344812c5c4c422da599707b6609632c6d1be6ba50b20b7eb89a9c6ca2') build() { cd "$srcdir/$pkgname-$pkgver" - python setup.py build + /usr/bin/python setup.py build } package() { cd "$srcdir/$pkgname-$pkgver" - python setup.py install --root="${pkgdir}" --skip-build + export PYTHONHASHSEED=0 + /usr/bin/python setup.py install --root="${pkgdir}" --optimize=1 --skip-build install -Dm 0644 $pkgname.hook -T $pkgdir/usr/share/libalpm/hooks/00-$pkgname.hook install -Dm 0644 LICENSE -t $pkgdir/usr/share/licenses/$pkgname/ install -Dm 0644 man/$pkgname.1 -t $pkgdir/usr/share/man/man1/ |