1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 11:45:18 +03:00
aports/community/py3-jsonschema/APKBUILD
psykose b71032c356 */*: invoke -m venv with --without-pip
we never use pip in the venv manually made for tests-
this might break 1-2 things unexpectedly, but

- those should be looked at anyway
- this has a severe speedup- even on a desktop machine with nvme, this
  makes an arbitrary venv go from 2.6s to <100ms(!) to make. a nice small
  optimisation.
2023-02-09 22:55:20 +01:00

48 lines
1.6 KiB
Text

# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-jsonschema
pkgver=4.7.2
pkgrel=3
pkgdesc="An implementation of JSON Schema validation for Python"
url="https://github.com/python-jsonschema/jsonschema"
arch="noarch"
license="MIT"
depends="python3 py3-pyrsistent py3-attrs"
makedepends="py3-gpep517 py3-installer py3-hatchling py3-hatch-vcs py3-setuptools_scm py3-wheel"
checkdepends="py3-twisted py3-pytest"
source="https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-$pkgver.tar.gz
skip-license-test.patch
"
builddir="$srcdir/jsonschema-$pkgver"
replaces="py-jsonschema" # Backwards compatibility
provides="py-jsonschema=$pkgver-r$pkgrel" # Backwards compatibility
build() {
gpep517 build-wheel \
--wheel-dir dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages testenv
testenv/bin/python3 -m installer dist/*.whl
testenv/bin/python3 -m twisted.trial jsonschema
}
package() {
python3 -m installer -d "$pkgdir" \
dist/jsonschema-$pkgver-py3-none-any.whl
# Add version suffix to executable files.
local path; for path in "$pkgdir"/usr/bin/*; do
mv "$path" "$path"-3
done
ln -s jsonschema-3 "$pkgdir"/usr/bin/jsonschema
}
sha512sums="
c624d7bf317ca20fd8cdd248ec7d7679fde907ab304f1a092fc7a172464f43e41904d3f88df57e1351043b978448f51166a09af3625f00a9ad4d7353033b80af jsonschema-4.7.2.tar.gz
4e74925bfa689bb53840f31faed361463e82bb2fd16c86a90de7cbcd0d1d6949c81944bc60e8d2068a6043e1da64b62fd48a062d683e9b96d6bc9b6603b2ccd6 skip-license-test.patch
"