blob: d3788649cdefc02d59cd8893329ec3f61f3bbe1b (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# Maintainer: TheFeelTrain <the@feeltra.in>
pkgname=python-hatch-sbom
_origpkgname=hatch_sbom
pkgver=0.4.2
pkgrel=4
pkgdesc="Hatchling build hook plugin for generating Software Bill of Materials (SBOM)"
arch=("x86_64")
url='https://pypi.org/project/hatch-sbom/'
license=("MIT")
depends=(
"python-hatch"
"python-hatch-vcs"
"uv"
)
makedepends=(
"python-build"
"python-installer"
"python-wheel"
"python-setuptools"
"python-hatchling"
)
source=("https://files.pythonhosted.org/packages/source/h/${_origpkgname}/${_origpkgname}-${pkgver}.tar.gz")
sha256sums=('6539360cae31e807be0154a292fea2d842a173b314ed567804044a5b1a7f3ce0')
prepare() {
cd "${_origpkgname}-${pkgver}" || exit
sed -i \
-e 's/hatchling==1\.32\.3, <2\.0\.0/hatchling>=1.32.3,<2.0.0/' \
-e 's/hatchling==1\.32\.3"/hatchling>=1.32.3,<2.0.0"/' \
-e 's/hatch-vcs==0\.5\.0"/hatch-vcs>=0.5.0,<1.0.0"/' \
-e 's/uv==[^",]*/uv>=0.12.0/' \
pyproject.toml
sed -i -E \
's/^class SbomBuildHook\(BuildHookInterface\[[^]]*\]\):/class SbomBuildHook(BuildHookInterface):/' \
"src/${_origpkgname}/plugin.py"
}
package() {
cd "${_origpkgname}-${pkgver}" || exit
python -m build --wheel --no-isolation
python -m installer --destdir="$pkgdir" dist/*.whl
}
|