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

Felix Yan felixonmars at gemini.archlinux.org
Mon Jan 3 21:50:28 UTC 2022


    Date: Monday, January 3, 2022 @ 21:50:28
  Author: felixonmars
Revision: 1092619

upgpkg: python-pytest-socket 0.5.0-1

Modified:
  python-pytest-socket/trunk/PKGBUILD

----------+
 PKGBUILD |   31 +++++++++++--------------------
 1 file changed, 11 insertions(+), 20 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-01-03 21:50:22 UTC (rev 1092618)
+++ PKGBUILD	2022-01-03 21:50:28 UTC (rev 1092619)
@@ -1,31 +1,22 @@
 # Maintainer: Felix Yan <felixonmars at archlinux.org>
 
 pkgname=python-pytest-socket
-pkgver=0.4.1
-pkgrel=3
+pkgver=0.5.0
+pkgrel=1
 pkgdesc='Pytest Plugin to disable socket calls during tests'
 arch=('any')
 license=('MIT')
 url='https://github.com/miketheman/pytest-socket'
 depends=('python-pytest')
-makedepends=('python-dephell')
+makedepends=('python-pyproject2setuppy')
 checkdepends=('python-asynctest' 'python-pytest-cov' 'python-pytest-flake8' 'python-pytest-httpbin'
-              'python-starlette')
+              'python-httpx' 'python-requests' 'python-starlette')
 source=("https://github.com/miketheman/pytest-socket/archive/$pkgver/$pkgname-$pkgver.tar.gz")
-sha512sums=('3a9cda0dd91e43d83c2a28c6e4e068f6c152c129d6f558de1aa6764d508cf430406ab3943a4b76ebdfb017c59f1ac7b55c570d38938f1b94ccf1de09d087924e')
+sha512sums=('1a5479af9d920bee7d2b55e184e58b9510c29e98d697b008e7530b01d771ca9f61aeec1d573fc46383ab6f5b1675f1d19159dca0aaab43d560cb3d8592c4b02d')
 
-prepare() {
-  cd pytest-socket-$pkgver
-  dephell deps convert --from pyproject.toml --to setup.py
-
-  # dephell does not generate py_modules into setup.py, so the resulting installation is missing
-  # the module source code itself. Patching it here as a workaround until we fix it properly.
-  sed -i '/license=/a \    py_modules=["pytest_socket"],' setup.py
-}
-
 build() {
   cd pytest-socket-$pkgver
-  python setup.py build
+  python -m pyproject2setuppy build
 }
 
 check() {
@@ -32,14 +23,14 @@
   # Hack entry points by installing it
 
   cd pytest-socket-$pkgver
-  python setup.py install --root="$PWD/tmp_install" --optimize=1
-  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages:$PYTHONPATH" pytest --deselect setup.py
-  }
+  python -m pyproject2setuppy install --root="$PWD/tmp_install" --optimize=1
+  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.10/site-packages:$PYTHONPATH" pytest
+}
 
 package() {
   cd pytest-socket-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1
-  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  python -m pyproject2setuppy install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
 }
 
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list