[arch-commits] Commit in python-pytest/trunk (PKGBUILD)

Daniel M. Capella polyzen at gemini.archlinux.org
Tue Aug 31 00:49:07 UTC 2021


    Date: Tuesday, August 31, 2021 @ 00:49:06
  Author: polyzen
Revision: 1010111

upgpkg: python-pytest 6.2.5-1

Modified:
  python-pytest/trunk/PKGBUILD

----------+
 PKGBUILD |   39 ++++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-08-31 00:18:32 UTC (rev 1010110)
+++ PKGBUILD	2021-08-31 00:49:06 UTC (rev 1010111)
@@ -1,28 +1,35 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Maintainer: Daniel M. Capella <polyzen at archlinux.org>
 # Contributor: Felix Kaiser <felix.kaiser at fxkr.net>
 
 pkgname=python-pytest
-pkgver=6.2.4
+pkgver=6.2.5
 pkgrel=1
 pkgdesc="Simple powerful testing with Python"
 arch=('any')
 license=('MIT')
 url="https://pytest.org/"
-depends=('python-attrs' 'python-iniconfig' 'python-more-itertools' 'python-packaging' 'python-pluggy'
+depends=('python-attrs' 'python-iniconfig' 'python-packaging' 'python-pluggy'
          'python-py' 'python-toml')
-makedepends=('python-setuptools-scm')
-checkdepends=('python-argcomplete' 'python-hypothesis' 'python-mock' 'python-nose' 'python-requests'
-              'python-xmlschema'
+makedepends=('python-setuptools')
+checkdepends=('python-argcomplete' 'python-hypothesis' 'python-mock'
+              'python-nose' 'python-requests' 'python-xmlschema'
               # Unlisted, but actually used. Check again after a while:
-              'python-decorator' 'python-docutils' 'python-jinja' 'python-numpy' 'python-pexpect'
-              'python-pygments' 'python-twisted' 'python-pytest-xdist')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/pytest-dev/pytest/archive/$pkgver.tar.gz")
-sha512sums=('aeb3483f57e72d5cab4846e45bb4a2d7b457539bba7ad447456f40ab10862a86c8085ce681e35b5c2cdbda12318358e451ec65a3dc3e5f62d66d9ce4191182c7')
+              'lsof' 'python-asynctest' 'python-decorator' 'python-docutils'
+              'python-jinja' 'python-numpy' 'python-pexpect' 'python-pygments'
+              'python-pytest-xdist' 'python-twisted')
+source=("https://files.pythonhosted.org/packages/source/p/pytest/pytest-$pkgver.tar.gz")
+sha256sums=('131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89')
+b2sums=('9dfc87279617be58353566009325f929e6fa53d54fd4c665a75f3b359ab5415972d745a680eb85ab21ca9eaec84450bc1decd50566b0ccdf90d7551f3d03ee70')
 
-export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
-
+# Remove dep on setuptools_scm and workaround test failures
 prepare() {
-  sed -i '/_pytest.warning_types.PytestUnknownMarkWarning/a \    "ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning"' pytest-$pkgver/pyproject.toml
+  cd pytest-$pkgver
+  sed -i "/^\[metadata\]/a version = $pkgver
+  /setuptools-scm/d" setup.cfg
+  sed -i '/setuptools-scm\|wheel/d
+  /\[tool.setuptools_scm\]/,/^$/d
+  /_pytest.warning_types.PytestUnknownMarkWarning/a \    "ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning",' pyproject.toml
 }
 
 build() {
@@ -32,13 +39,15 @@
 
 check() {
   cd pytest-$pkgver
-  python setup.py egg_info
-  # pdb tests: https://github.com/pytest-dev/pytest/issues/8161
-  PYTHONPATH="$PWD"/build/lib python src/pytest/__main__.py
+  mkdir -p temp
+  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
+  python setup.py install --root=temp --optimize=1 --skip-build
+  PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" pytest
 }
 
 package() {
   cd pytest-$pkgver
+  export PYTHONHASHSEED=0
   python setup.py install --root="$pkgdir" --optimize=1
   install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
 }



More information about the arch-commits mailing list