From 9bf49fdc29a0fa6872f39a6cfcf1b2034380888d Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Wed, 30 Nov 2022 18:12:58 -0500
Subject: python-url-normalize: initial inclusion

---
 linhes/python-url-normalize/PKGBUILD | 37 ++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 linhes/python-url-normalize/PKGBUILD

diff --git a/linhes/python-url-normalize/PKGBUILD b/linhes/python-url-normalize/PKGBUILD
new file mode 100644
index 0000000..de114f1
--- /dev/null
+++ b/linhes/python-url-normalize/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
+# Maintainer: Jordan Cook <JCook83@gmail.com>
+# Contributor: Benoit Pierre <benoit.pierre@gmail.com>
+# Contributor: Marc Plano-Lesay <kernald@enoent.fr>
+_base=url-normalize
+pkgname=python-${_base}
+pkgdesc="URL normalization for Python"
+pkgver=1.4.3
+pkgrel=16
+arch=('any')
+url="https://github.com/niksite/${_base}"
+license=(MIT)
+depends=(python-six)
+makedepends=(python-build python-installer python-poetry)
+checkdepends=(python-pytest-socket)
+source=(${_base}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz)
+sha512sums=('46eaa1753b37e89d56cb19818144a7cf5b38653811720eb506732c35bb3732ef0c556420b22a9ee2c08e70e5b408aab7f44cea5e15d1ebe3d717c0c77706bfb8')
+
+build() {
+  cd ${_base}-${pkgver}
+  # Note: set `GIT_CEILING_DIRECTORIES` to prevent poetry
+  # from incorrectly using a parent git checkout info.
+  # https://github.com/pypa/build/issues/384#issuecomment-947675975
+  GIT_CEILING_DIRECTORIES="${PWD}/.." python -m build --wheel --skip-dependency-check --no-isolation
+}
+
+check() {
+  cd ${_base}-${pkgver}
+  # https://github.com/niksite/url-normalize/blob/master/tox.ini#L17
+  pytest -o addopts=--disable-socket tests
+}
+
+package() {
+  cd ${_base}-${pkgver}
+  python -m installer --destdir="${pkgdir}" dist/*.whl
+  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}
-- 
cgit v0.12

