ilot/py3-pg8000: new aport

This commit is contained in:
Antoine Martin 2024-09-19 12:51:19 -04:00
parent 0a6aa52515
commit 8d3b6b0c99
Signed by: ayakael
GPG key ID: D62A472A4AA7D541
2 changed files with 59 additions and 0 deletions

40
ilot/py3-pg8000/APKBUILD Normal file
View file

@ -0,0 +1,40 @@
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-pg8000
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=pg8000
pkgver=1.31.2
pkgrel=0
pkgdesc="Pure-Python PostgreSQL Driver"
url="https://pypi.python.org/project/pg8000"
arch="noarch"
license="BSD-3-Clause"
depends="py3-scramp py3-dateutil"
checkdepends="py3-pytest"
makedepends="py3-setuptools py3-gpep517 py3-wheel py3-hatchling"
source="$pkgname-$pkgver.tar.gz::https://github.com/tlocke/pg8000/archive/refs/tags/$pkgver.tar.gz"
options="!check" # TODO required postgresql db
builddir="$srcdir/$_pkgreal-$pkgver"
subpackages="$pkgname-pyc"
build() {
echo "__version__ = \"$pkgver\"" > _version.py
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 pytest -v
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
f04d4aaf3dcaf244e223a093b42473a723de718eeeee648d07f6e3d061f9783c4dff23ff120a1399ab8dd951dee2cf836dd4c7185668cc516f390b293ee72adb py3-pg8000-1.31.2.tar.gz
"

View file

@ -0,0 +1,19 @@
diff --git a/pyproject.toml.orig b/pyproject.toml
index c3db28f..5a8a017 100644
--- a/pyproject.toml.orig
+++ b/pyproject.toml
@@ -40,13 +40,7 @@ dynamic = ["version"]
Homepage = "https://github.com/tlocke/pg8000"
[tool.hatch.version]
-source = "versioningit"
-
-[tool.versioningit]
-
-[tool.versioningit.vcs]
-method = "git"
-default-tag = "0.0.0"
+path = "_version.py"
[tool.flake8]
application-names = ['pg8000']