summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCaleb Maclennan2021-08-03 22:54:23 +0300
committerCaleb Maclennan2021-08-03 22:56:10 +0300
commit67ecafe64c2af00a3ab566c9773b8c8a9c8c6502 (patch)
tree57d2d5e761a2c19b679929f47ef32248b5e91cb6 /PKGBUILD
parent30cc85e48f8cfc273c00554afc04dc659aa2aa89 (diff)
downloadaur-67ecafe64c2af00a3ab566c9773b8c8a9c8c6502.tar.gz
Adopt and overhaul packaging
* Add missing dependencies, crosscheck with upstream * Prepare Python build for reproducible build verification * Use more stable download location for PyPi * Cleanup coding style (largely to my preferences, but also making sure bash quoting is valid and matches shellharden output) * Place fields in Wiki recommended order, sort dependencies
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 25 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a3d04db373c5..5db39d4b62d6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,36 @@
# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
-pkgname='python-compreffor'
-_pkgname='compreffor'
-pkgver='0.5.0'
-pkgrel=1
-pkgdesc="A CFF table suroutinizer for FontTools."
-url="https://github.com/googlefonts/compreffor"
-checkdepends=('python-pytest')
-depends=('python-fonttools')
-makedepends=('cython' 'python-setuptools')
-optdepends=()
-license=('Apache')
-arch=('x86_64')
-source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip")
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
+
+pkgname=python-compreffor
+_pyname=${pkgname#python-}
+pkgver=0.5.0
+pkgrel=2
+pkgdesc='A CFF table suroutinizer for FontTools'
+arch=(x86_64)
+url="https://github.com/googlefonts/$_pyname"
+license=(Apache)
+depends=(python
+ python-fonttools)
+makedepends=(cython
+ python-setuptools)
+checkdepends=(python-pytest)
+_archive="$_pyname-$pkgver"
+source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_archive.zip")
sha256sums=('b804999e0c256094e28a9cbb9306f6031b7cf6884bbb98fd44ad70eed6c4c2fd')
build() {
- cd "$_pkgname-$pkgver"
- python setup.py build
+ cd "$_archive"
+ export PYTHONHASHSEED=0
+ python setup.py build_ext --inplace
+ python setup.py build
}
check() {
- cd "$_pkgname-$pkgver"
- python setup.py build_ext --inplace
- PYTHONPATH=src/python pytest src/python/compreffor/test
+ cd "$_archive/src/python"
+ PYTHONPATH=. pytest compreffor/test
}
package() {
- cd "${_pkgname}-${pkgver}"
- python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+ cd "$_archive"
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}