Date: Friday, January 13, 2023 @ 20:30:27
  Author: dvzrv
Revision: 1383297

archrelease: copy trunk to community-any

Added:
  python-pytest-pylint/repos/community-any/PKGBUILD
    (from rev 1383296, python-pytest-pylint/trunk/PKGBUILD)
Deleted:
  python-pytest-pylint/repos/community-any/PKGBUILD

----------+
 PKGBUILD |   76 +++++++++++++++++++++++++++++++++----------------------------
 1 file changed, 42 insertions(+), 34 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-01-13 20:30:14 UTC (rev 1383296)
+++ PKGBUILD    2023-01-13 20:30:27 UTC (rev 1383297)
@@ -1,34 +0,0 @@
-# Maintainer: Felix Yan <felixonm...@archlinux.org>
-
-pkgname=python-pytest-pylint
-pkgver=0.19.0
-pkgrel=1
-pkgdesc='pytest plugin to check source code with pylint'
-arch=('any')
-license=('MIT')
-url='https://github.com/carsongee/pytest-pylint'
-depends=('python-pytest' 'python-pylint' 'python-toml')
-makedepends=('python-pytest-runner')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/carsongee/pytest-pylint/archive/v$pkgver.tar.gz";)
-sha512sums=('94503757bf774ffbba56687cda7689a95748fe437759e29868105bc5f639b03782308c8e86eae7236ab99188674de5596053da5c33ebd90c603e396504047996')
-
-build() {
-  cd pytest-pylint-$pkgver
-  python setup.py build
-}
-
-check() {
-  # Hack entry points by installing it
-
-  cd pytest-pylint-$pkgver
-  python setup.py install --root="$PWD/tmp_install" --optimize=1
-  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages:$PYTHONPATH" 
pytest --ignore tmp_install
-}
-
-package() {
-  cd pytest-pylint-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1
-  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
-}
-
-# vim:set ts=2 sw=2 et:

Copied: python-pytest-pylint/repos/community-any/PKGBUILD (from rev 1383296, 
python-pytest-pylint/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-01-13 20:30:27 UTC (rev 1383297)
@@ -0,0 +1,42 @@
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+
+_name=pytest-pylint
+pkgname=python-pytest-pylint
+pkgver=0.19.0
+pkgrel=2
+pkgdesc='pytest plugin to check source code with pylint'
+arch=('any')
+license=('MIT')
+url='https://github.com/carsongee/pytest-pylint'
+depends=('python-pytest' 'python-pylint' 'python-toml')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 
'python-wheel')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/carsongee/pytest-pylint/archive/v$pkgver.tar.gz";)
+sha512sums=('94503757bf774ffbba56687cda7689a95748fe437759e29868105bc5f639b03782308c8e86eae7236ab99188674de5596053da5c33ebd90c603e396504047996')
+
+prepare() {
+  # pytest-runner is certainly not required to build a wheel...
+  sed -e '/pytest-runner/d' -i $_name-$pkgver/setup.py
+}
+
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
+}
+
+check() {
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
+  cd $_name-$pkgver
+  # install to temporary location, as importlib is used
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
+  pytest -vv --ignore test_dir/
+}
+
+package() {
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+}
+
+# vim:set ts=2 sw=2 et:

Reply via email to