Date: Wednesday, April 5, 2023 @ 17:10:32
  Author: felixonmars
Revision: 1437797

archrelease: copy trunk to community-staging-any

Added:
  python-wheel/repos/community-staging-any/
  python-wheel/repos/community-staging-any/PKGBUILD
    (from rev 1437796, python-wheel/trunk/PKGBUILD)

----------+
 PKGBUILD |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

Copied: python-wheel/repos/community-staging-any/PKGBUILD (from rev 1437796, 
python-wheel/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD                              (rev 0)
+++ community-staging-any/PKGBUILD      2023-04-05 17:10:32 UTC (rev 1437797)
@@ -0,0 +1,50 @@
+# Maintainer: Felix Yan <[email protected]>
+# Maintainer: Morten Linderud <[email protected]>
+# Contributor: Lance Chen <[email protected]>
+
+_pypiname=wheel
+pkgname=python-wheel
+pkgver=0.40.0
+pkgrel=2
+pkgdesc="A built-package format for Python"
+arch=(any)
+url="https://pypi.python.org/pypi/wheel";
+license=('MIT')
+depends=('python-packaging')
+optdepends=('python-keyring: for wheel.signatures'
+            'python-xdg: for wheel.signatures')
+makedepends=('python-setuptools' 'python-build' 'python-flit-core' 
'python-installer')
+checkdepends=('python-jsonschema' 'python-pytest' 'python-keyring' 
'python-keyrings-alt'
+              'python-xdg' 'python-pytest-cov')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/pypa/wheel/archive/$pkgver.tar.gz";)
+sha512sums=('f23bddfb0c23c77d16b24d9c6b132b0272830c89ae63ac672f204af665863a38779c142a72a66a33c615c4b52450d433b4edcbd333de4e0d418b4fbe836de953')
+
+prepare() {
+  cd wheel-$pkgver
+  # https://github.com/pypa/wheel/pull/365 but why?
+  rm -r src/wheel/vendored
+  sed -i 's/from .vendored.packaging.requirements import Requirement/from 
packaging.requirements import Requirement/' src/wheel/metadata.py
+  sed -i 's/from .vendored.packaging import tags/from packaging import tags/' 
src/wheel/bdist_wheel.py
+  sed -i 's/from .vendored.packaging import version as _packaging_version/from 
packaging import version as _packaging_version/' src/wheel/bdist_wheel.py
+  sed -i 's/from wheel.vendored.packaging import tags/from packaging import 
tags/' tests/test_bdist_wheel.py
+}
+
+build() {
+  cd wheel-$pkgver
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  # Hack entry points by installing it
+
+  cd wheel-$pkgver
+  python -m installer --destdir="$PWD/tmp_install" dist/*.whl
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+  PYTHONPATH="$PWD/tmp_install/$site_packages" pytest
+}
+
+package() {
+  cd wheel-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
+}

Reply via email to