git » python-pytest.git » commit e47a50e

upgpkg: 7.4.1-1

author Daniel M. Capella
2023-09-04 03:42:31 UTC
committer Daniel M. Capella
2023-09-04 03:42:31 UTC
parent a01d20e760fa729b61c2a701672f3740e4618dd9

upgpkg: 7.4.1-1

PKGBUILD +35 -26

diff --git a/PKGBUILD b/PKGBUILD
index 0a93f33..8d85e35 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,42 +3,51 @@
 # Contributor: Felix Kaiser <felix.kaiser@fxkr.net>
 
 pkgname=python-pytest
-pkgver=7.4.0
+_name=${pkgname#python-}
+pkgver=7.4.1
 pkgrel=1
 pkgdesc="Simple powerful testing with Python"
 arch=('any')
 license=('MIT')
 url="https://pytest.org/"
 depends=('python-iniconfig' 'python-packaging' 'python-pluggy')
-makedepends=('python-build' 'python-installer' 'python-setuptools'
-             'python-wheel')
-checkdepends=('python-argcomplete' 'python-attrs' 'python-hypothesis'
-              'python-nose' 'python-pygments' 'python-requests'
-              'python-xmlschema'
-              # Unlisted, but actually used. Check again after a while:
-              'lsof' 'python-decorator' 'python-docutils'
-              'python-exceptiongroup' 'python-jinja' 'python-numpy'
-              'python-pexpect' 'python-pytest-xdist' 'python-twisted')
-source=("https://files.pythonhosted.org/packages/source/p/pytest/pytest-$pkgver.tar.gz")
-sha256sums=('b4bf8c45bd59934ed84001ad51e11b4ee40d40a1229d2c79f9c592b0a3f6bd8a')
-b2sums=('59b9e90ab226dd317a5beeb0b189d0e323379e781dcca3fc7aa37ab7ef6d623a25f6f50e4b648cd274bdbc202e914fd393749d093a4c9d8c2f19124403d6b4fe')
-
-# Remove dep on setuptools_scm
-prepare() {
-  cd pytest-$pkgver
-  sed -i "/^\[metadata\]/a version = $pkgver
-  /setuptools-scm/d" setup.cfg
-  sed -i '/setuptools-scm\|wheel/d
-  /\[tool.setuptools_scm\]/,/^$/d' pyproject.toml
-}
+makedepends=(
+  'git'
+  'python-build'
+  'python-installer'
+  'python-setuptools'
+  'python-setuptools-scm'
+  'python-wheel'
+)
+checkdepends=(
+  'python-argcomplete'
+  'python-attrs'
+  'python-hypothesis'
+  'python-nose'
+  'python-pygments'
+  'python-requests'
+  'python-xmlschema'
+  # Unlisted, but actually used. Check again after a while:
+  'lsof'
+  'python-decorator'
+  'python-docutils'
+  'python-exceptiongroup'
+  'python-jinja'
+  'python-numpy'
+  'python-pexpect'
+  'python-pytest-xdist'
+  'python-twisted'
+)
+source=("git+https://github.com/$_name-dev/$_name.git#tag=$pkgver")
+b2sums=('SKIP')
 
 build() {
-  cd pytest-$pkgver
+  cd "$_name"
   python -m build --wheel --skip-dependency-check --no-isolation
 }
 
 check() {
-  cd pytest-$pkgver
+  cd "$_name"
   python -m venv --system-site-packages test-env
   test-env/bin/python -m installer dist/*.whl
   # https://github.com/pytest-dev/pytest/issues/10042
@@ -46,12 +55,12 @@ check() {
 }
 
 package() {
-  cd pytest-$pkgver
+  cd "$_name"
   python -m installer --destdir="$pkgdir" dist/*.whl
 
   # Symlink license file
   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
   install -d "$pkgdir"/usr/share/licenses/$pkgname
-  ln -s "$site_packages"/pytest-$pkgver.dist-info/LICENSE \
+  ln -s "$site_packages"/"$_name"-$pkgver.dist-info/LICENSE \
     "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 }