You are not logged in.
Hi,
Please kindly review this PKGBUILD.
This Python module has not been updated for a few years but is still used and required by a software I use, for producing Data Matrix pictures.
There's a project's URL in the source but it's down, hence the source_url. There's also a PyPi version.
For build() and package(), I just followed the wiki.
pkgver() is a nice feature. I'm not sure if there's a way to get a file in the source before the version has been set.
Thanks.
# Maintainer: Tétrapyle <https://aur.archlinux.org/account/Tetrapyle/>
# Contributor: Tétrapyle
#
# A Python module to generate 1D and 2D barcodes
# (Code 39, Code 128, EAN-13, Data Matrix, QR Code),
# forked from huBarcode.
#
pkgname=python-pystrich
pkgver=0.8
pkgrel=1
pkgdesc="A Python module to generate 1D and 2D barcodes"
arch=('any')
url="https://github.com/mmulqueen/pyStrich"
source_url="https://github.com/mmulqueen/pyStrich"
license=('Apache-2.0')
depends=(python python-pillow python-lxml python-setuptools)
source=("${pkgname}-${pkgver}::git+"$source_url)
sha256sums=('SKIP')
makedepends=(python-build python-installer python-wheel python-setuptools git)
pkgver() {
sed -n "s/.*version='\([0-9|.]*\)'.*/\1/p" $srcdir/${pkgname}-*/setup.py
}
build() {
cd $pkgname-$pkgver
python -m build --wheel --no-isolation
}
package() {
cd $pkgname-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
}
Offline
If you want version 0.8, you need to download version 0.8. If you want a VCS package, you need to make a VCS package (https://wiki.archlinux.org/title/VCS_package_guidelines). You can't have this weird combination of both.
Offline
I understand, thanks.
This one should be OK?
# Maintainer: Tétrapyle <https://aur.archlinux.org/account/Tetrapyle/>
# Contributor: Tétrapyle
#
# A Python module to generate 1D and 2D barcodes
# (Code 39, Code 128, EAN-13, Data Matrix, QR Code),
# forked from huBarcode.
#
_name=pyStrich
pkgname=python-${_name,,}
pkgver=0.8
pkgrel=1
pkgdesc="A Python module to generate 1D and 2D barcodes"
arch=('any')
url="https://github.com/mmulqueen/pyStrich"
license=('Apache-2.0')
depends=(python python-pillow python-lxml python-setuptools)
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mmulqueen/${_name}/archive/v${pkgver}.tar.gz")
sha256sums=('dc40821f7862f99bc3b4129cd08700bc7d20842a661fb7046cdc14d5d43b05d0')
makedepends=(python-build python-installer python-wheel git)
build() {
cd "$_name-$pkgver"
python -m build --wheel --no-isolation
}
package() {
cd "$_name-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
}
Offline