summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBradford Smith2021-02-22 18:08:02 -0500
committerBradford Smith2021-02-22 18:08:02 -0500
commit02209bc89f55a2f0438e7098c5533a342b840577 (patch)
tree9e2e9dda3122f1c77110f9d37969089b9981f614
parent4810ee78c92f43f18c4ae0510ef15e3a21517148 (diff)
downloadaur-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
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD9
2 files changed, 8 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7b8c64e5346c..4953a9dfe059 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = informant
pkgdesc = An Arch Linux News reader and pacman hook
- pkgver = 0.4.1
+ pkgver = 0.4.2
pkgrel = 1
url = https://github.com/bradford-smith94/informant
install = informant.install
@@ -13,8 +13,8 @@ pkgbase = informant
depends = python-html2text
depends = python-cachecontrol
depends = python-lockfile
- source = https://github.com/bradford-smith94/informant/archive/v0.4.1.tar.gz
- sha256sums = 4d666f358b2461b1d3d53a7e996963e8c16ddaad1804b621eb193079ec20173c
+ source = https://github.com/bradford-smith94/informant/archive/v0.4.2.tar.gz
+ sha256sums = e616dd32d275fccfeaa65fa1890d706075dd5f54a2b03351349adb40b308c8ca
pkgname = informant
diff --git a/PKGBUILD b/PKGBUILD
index b475660596ce..f5f77d264537 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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/