summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 252c7c2ba80ce738e1f0103f65563dec54b2ed9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Maintainer: Alex Hirzel <alex at hirzel period us>

pkgname='python-reqif'
_name=${pkgname#python-}
pkgver='0.0.42'
pkgrel=2
pkgdesc="Python library for ReqIF format. ReqIF parsing and unparsing."
url="https://github.com/strictdoc-project/reqif"
depends=('python' 'python-jinja' 'python-lxml' 'python-xmlschema')
makedepends=('python-build' 'python-installer' 'python-wheel')
license=('Apache-2.0')
arch=('any')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
sha256sums=('9afc4201517c20eb3f4d2f0454860744d989cd13fde11216f441f7e1f2bb9ffa')

build() {
	cd "${srcdir}/${_name}-${pkgver}"
	python -m build --wheel --no-isolation
}

package() {
	cd "${srcdir}/${_name}-${pkgver}"
	#install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/$pkgname"
	PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl

	# not sure why these end up in the wrong spot...
	mv "${pkgdir}/usr/lib/python3.12/site-packages/LICENSE" "${pkgdir}/usr/lib/python3.12/site-packages/reqif"
	mv "${pkgdir}/usr/lib/python3.12/site-packages/README.md" "${pkgdir}/usr/lib/python3.12/site-packages/reqif"
	mv "${pkgdir}/usr/lib/python3.12/site-packages/pyproject.toml" "${pkgdir}/usr/lib/python3.12/site-packages/reqif"
}