Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
upgpkg: python-pytest-socket 0.6.0-3: Rebuild against Python 3.11.
Browse files Browse the repository at this point in the history
Disable broken test: miketheman/pytest-socket#161
Use bash arrays with one entry per line for better handling.
Remove unnecessary quotes and curly braces.

git-svn-id: file:///srv/repos/svn-community/svn@1444751 9fca08f4-af9d-4005-b8df-a31f2cc04f65
  • Loading branch information
dvzrv committed Apr 11, 2023
1 parent 9e69b8a commit 62c7ca2
Showing 1 changed file with 33 additions and 11 deletions.
44 changes: 33 additions & 11 deletions python-pytest-socket/trunk/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,33 +1,55 @@
# Maintainer: Felix Yan <[email protected]>
# Maintainer:
# Contributor: Felix Yan <[email protected]>

_name=pytest-socket
pkgname=python-pytest-socket
pkgver=0.6.0
pkgrel=2
pkgrel=3
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-build' 'python-installer' 'python-poetry-core' 'python-wheel')
checkdepends=('python-asynctest' 'python-pytest-cov' 'python-pytest-flake8' 'python-pytest-httpbin'
'python-httpx' 'python-requests' 'python-starlette')
source=("https://github.com/miketheman/pytest-socket/archive/$pkgver/$pkgname-$pkgver.tar.gz")
arch=(any)
license=(MIT)
url="https://github.com/miketheman/pytest-socket"
depends=(
python
python-pytest
)
makedepends=(
python-build
python-installer
python-poetry-core
python-wheel
)
checkdepends=(
python-asynctest
python-httpx
python-pytest-cov
python-pytest-flake8
python-pytest-httpbin
python-requests
python-starlette
)
source=($url/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('b70ab9fe3c41a707f16b6ae23d45e07238d03a731b3f99b794a6707303cd0301b75360ea164b7de48e9f2d56b5544e2da39373ba14a3b0fc20ef03afce03ab03')
b2sums=('640ce9d047ee422221ac4b707aa8a36b1c9dbeb4e8f9dc138270cbe9e5e04ece849b7308e092c1a6fc67c0c92a48f99aea41db535ad45d87ee87d18e0b6c9607')

build() {
cd $_name-$pkgver
python -m build --wheel --no-isolation
}

check() {
local pytest_options=(
-vv
# https://github.com/miketheman/pytest-socket/issues/161
--deselect tests/test_async.py::test_asynctest
)
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
pytest "${pytest_options[@]}"
}

package() {
Expand Down

0 comments on commit 62c7ca2

Please sign in to comment.