From 8d3b6b0c99d8fbfa99d4495fb986f15a0aaadbc6 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 19 Sep 2024 12:51:19 -0400 Subject: [PATCH] ilot/py3-pg8000: new aport --- ilot/py3-pg8000/APKBUILD | 40 ++++++++++++++++++++ ilot/py3-pg8000/use-local-version-file.patch | 19 ++++++++++ 2 files changed, 59 insertions(+) create mode 100644 ilot/py3-pg8000/APKBUILD create mode 100644 ilot/py3-pg8000/use-local-version-file.patch diff --git a/ilot/py3-pg8000/APKBUILD b/ilot/py3-pg8000/APKBUILD new file mode 100644 index 0000000..92b0b75 --- /dev/null +++ b/ilot/py3-pg8000/APKBUILD @@ -0,0 +1,40 @@ +# Contributor: Antoine Martin (ayakael) +# Maintainer: Antoine Martin (ayakael) +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 +" diff --git a/ilot/py3-pg8000/use-local-version-file.patch b/ilot/py3-pg8000/use-local-version-file.patch new file mode 100644 index 0000000..051d762 --- /dev/null +++ b/ilot/py3-pg8000/use-local-version-file.patch @@ -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']