Date: Wednesday, April 5, 2023 @ 17:17:10
Author: felixonmars
Revision: 1437811
archrelease: copy trunk to community-staging-any
Added:
python-installer/repos/community-staging-any/
python-installer/repos/community-staging-any/PKGBUILD
(from rev 1437810, python-installer/trunk/PKGBUILD)
----------+
PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
Copied: python-installer/repos/community-staging-any/PKGBUILD (from rev
1437810, python-installer/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-05 17:17:10 UTC (rev 1437811)
@@ -0,0 +1,48 @@
+# Maintainer: Filipe LaĆns (FFY00) <[email protected]>
+# Maintainer: Daniel M. Capella <[email protected]>
+
+_pkgname=installer
+pkgname=python-$_pkgname
+pkgver=0.7.0
+pkgrel=2
+pkgdesc='Low-level library for installing a Python package from a wheel
distribution'
+arch=('any')
+url='https://github.com/pypa/installer'
+license=('MIT')
+depends=('python')
+makedepends=('git' 'python-flit-core' 'python-build'
+ 'python-sphinx' 'python-sphinx-furo' 'python-myst-parser'
+ 'python-sphinx-argparse')
+checkdepends=('python-pytest')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
+sha512sums=('a509c6ea9d88b8527cce0428ca6109077820cb9aa352967a389012bac40f8ec04039ab73710f4fb32b32ed20affd520ce0ba16ba18d9d380ce0af1f51fe8e2c6')
+
+build() {
+ cd $_pkgname-$pkgver
+
+ python -m build -wn --skip-dependency-check
+
+ PYTHONPATH=src sphinx-build -b dirhtml -v docs docs/build/html
+}
+
+check() {
+ cd $_pkgname-$pkgver
+
+ PYTHONPATH=src pytest
+}
+
+package() {
+ cd $_pkgname-$pkgver
+
+ PYTHONPATH=src python -m installer --destdir="$pkgdir" dist/*.whl
+
+ # remove windows entrypoint scripts executables
+ rm "$pkgdir"/usr/lib/python*/site-packages/installer/_scripts/*.exe
+
+ # install documentation
+ install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
+ cp -r -a --no-preserve=ownership docs/build/html
"$pkgdir"/usr/share/doc/$pkgname
+ rm -rf "$pkgdir"/usr/share/doc/$pkgname/html/.doctrees
+
+ install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}