[arch-commits] Commit in (20 files)
Daniel M. Capella
polyzen at gemini.archlinux.org
Sun Nov 7 13:53:49 UTC 2021
Date: Sunday, November 7, 2021 @ 13:53:47
Author: polyzen
Revision: 1038581
Use venv when tests need to import built project
python-setuptools-scm is the only package I hit a wall with:
> ==> Starting check()...
> running install
> running bdist_egg
> bdist_egg is forbidden, please update to setuptools>=45 which uses pip
Modified:
borgmatic/trunk/PKGBUILD
python-ansicolor/trunk/PKGBUILD
python-backcall/trunk/PKGBUILD
python-black/trunk/PKGBUILD
python-flake8-black/trunk/PKGBUILD
python-flake8-docstrings/trunk/PKGBUILD
python-jq/trunk/PKGBUILD
python-matplotlib-inline/trunk/PKGBUILD
python-minidb/trunk/PKGBUILD
python-pdftotext/trunk/PKGBUILD
python-pyee/trunk/PKGBUILD
python-pygls/trunk/PKGBUILD
python-pyppeteer/trunk/PKGBUILD
python-pytesseract/trunk/PKGBUILD
python-pytest/trunk/PKGBUILD
python-pytz-deprecation-shim/trunk/PKGBUILD
python-tokenize-rt/trunk/PKGBUILD
python-typing_extensions/trunk/PKGBUILD
python-tzdata/trunk/PKGBUILD
rofimoji/trunk/PKGBUILD
---------------------------------------------+
borgmatic/trunk/PKGBUILD | 8 ++++----
python-ansicolor/trunk/PKGBUILD | 7 +++----
python-backcall/trunk/PKGBUILD | 9 ++++-----
python-black/trunk/PKGBUILD | 11 +++++------
python-flake8-black/trunk/PKGBUILD | 9 +++++----
python-flake8-docstrings/trunk/PKGBUILD | 7 +++----
python-jq/trunk/PKGBUILD | 9 ++++-----
python-matplotlib-inline/trunk/PKGBUILD | 2 +-
python-minidb/trunk/PKGBUILD | 7 +++----
python-pdftotext/trunk/PKGBUILD | 7 +++----
python-pyee/trunk/PKGBUILD | 7 +++----
python-pygls/trunk/PKGBUILD | 2 +-
python-pyppeteer/trunk/PKGBUILD | 2 +-
python-pytesseract/trunk/PKGBUILD | 7 +++----
python-pytest/trunk/PKGBUILD | 7 +++----
python-pytz-deprecation-shim/trunk/PKGBUILD | 7 +++----
python-tokenize-rt/trunk/PKGBUILD | 7 +++----
python-typing_extensions/trunk/PKGBUILD | 7 +++----
python-tzdata/trunk/PKGBUILD | 7 +++----
rofimoji/trunk/PKGBUILD | 2 +-
20 files changed, 59 insertions(+), 72 deletions(-)
Modified: borgmatic/trunk/PKGBUILD
===================================================================
--- borgmatic/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ borgmatic/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -32,10 +32,10 @@
check() {
cd $pkgname-$pkgver
- 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 -c /dev/null --ignore=tests/end-to-end
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ PATH="$PWD/test-env/bin:$PATH" test-env/bin/python -m pytest -c /dev/null \
+ --ignore=tests/end-to-end
}
package() {
Modified: python-ansicolor/trunk/PKGBUILD
===================================================================
--- python-ansicolor/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-ansicolor/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -23,10 +23,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- python setup.py install --skip-build --root=temp
- PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" pytest
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ test-env/bin/python -m pytest
}
package() {
Modified: python-backcall/trunk/PKGBUILD
===================================================================
--- python-backcall/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-backcall/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -21,10 +21,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- python -m install --optimize=1 --destdir=temp dist/*.whl
- PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" python tests/test_callback_prototypes.py
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m install --optimize=1 dist/*.whl
+ test-env/bin/python tests/test_callback_prototypes.py
}
package() {
@@ -34,7 +33,7 @@
# 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/$_name-$pkgver.dist-info/LICENSE \
+ ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
Modified: python-black/trunk/PKGBUILD
===================================================================
--- python-black/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-black/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -32,11 +32,10 @@
check() {
cd "black-$pkgver"
- mkdir -p temp
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- python -m install --optimize=1 --destdir=temp dist/*.whl
- chmod +x temp/usr/bin/* # https://github.com/FFY00/python-install/pull/6
- PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" pytest tests -m "not without_python2"
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m install --optimize=1 dist/*.whl
+ chmod +x test-env/bin/black # https://github.com/FFY00/python-install/pull/6
+ PATH="$PWD/test-env/bin:$PATH" test-env/bin/python -m pytest --run-optional no_python2
}
package() {
@@ -52,7 +51,7 @@
# 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/black-$pkgver.dist-info/LICENSE \
+ ln -s "$site_packages"/black-$pkgver.dist-info/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
Modified: python-flake8-black/trunk/PKGBUILD
===================================================================
--- python-flake8-black/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-flake8-black/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -21,11 +21,12 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local sitepackages=$(python -c "import site; print(site.getsitepackages()[0])")
- python setup.py install --skip-build --root=temp
+ python -m venv --system-site-packages test-env
+ source test-env/bin/activate
+ python setup.py install --optimize=1 --skip-build
cd tests
- PATH="${PWD%/tests}/temp/usr/bin:$PATH" PYTHONPATH="${PWD%/tests}/temp/$sitepackages" ./run_tests.sh
+ ./run_tests.sh
+ deactivate
}
package() {
Modified: python-flake8-docstrings/trunk/PKGBUILD
===================================================================
--- python-flake8-docstrings/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-flake8-docstrings/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -22,10 +22,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local sitepackages=$(python -c "import site; print(site.getsitepackages()[0])")
- python setup.py install --skip-build --root=temp
- PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$sitepackages" flake8 flake8_docstrings.py
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ test-env/bin/python -m flake8 flake8_docstrings.py
}
package() {
Modified: python-jq/trunk/PKGBUILD
===================================================================
--- python-jq/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-jq/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -33,10 +33,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- python -m install --optimize=1 --destdir=temp dist/*.whl
- PYTHONPATH="$PWD/temp/$site_packages" pytest tests
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m install --optimize=1 dist/*.whl
+ test-env/bin/python -m pytest
}
package() {
@@ -46,7 +45,7 @@
# 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/jq-$pkgver.dist-info/LICENSE \
+ ln -s "$site_packages"/jq-$pkgver.dist-info/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
Modified: python-matplotlib-inline/trunk/PKGBUILD
===================================================================
--- python-matplotlib-inline/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-matplotlib-inline/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -25,7 +25,7 @@
check() {
cd $_name-$pkgver
python -m venv --system-site-packages test-env
- test-env/bin/python setup.py install --skip-build
+ test-env/bin/python setup.py install --optimize=1 --skip-build
test-env/bin/python -c 'from matplotlib_inline.backend_inline import show'
}
Modified: python-minidb/trunk/PKGBUILD
===================================================================
--- python-minidb/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-minidb/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -22,10 +22,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local sitepackages=$(python -c "import site; print(site.getsitepackages()[0])")
- python setup.py install --skip-build --root=temp
- PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$sitepackages" pytest
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ test-env/bin/python -m pytest
}
package() {
Modified: python-pdftotext/trunk/PKGBUILD
===================================================================
--- python-pdftotext/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-pdftotext/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -22,10 +22,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local sitepackages=$(python -c "import site; print(site.getsitepackages()[0])")
- python setup.py install --skip-build --root=temp
- PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$sitepackages" python -m unittest discover tests
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ test-env/bin/python -m unittest discover
}
package() {
Modified: python-pyee/trunk/PKGBUILD
===================================================================
--- python-pyee/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-pyee/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -28,10 +28,9 @@
check() {
cd pyee-$pkgver
- mkdir -p temp
- local sitepackages=$(python -c "import site; print(site.getsitepackages()[0])")
- python setup.py install --skip-build --root=temp
- PYTHONPATH="$PWD/temp/$sitepackages" pytest
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ test-env/bin/python -m pytest
}
package() {
Modified: python-pygls/trunk/PKGBUILD
===================================================================
--- python-pygls/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-pygls/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -34,7 +34,7 @@
# 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/$_name-$pkgver.dist-info/LICENSE.txt \
+ ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE.txt \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
}
Modified: python-pyppeteer/trunk/PKGBUILD
===================================================================
--- python-pyppeteer/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-pyppeteer/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -37,7 +37,7 @@
# 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/$_name-$pkgver.dist-info/LICENSE \
+ ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
Modified: python-pytesseract/trunk/PKGBUILD
===================================================================
--- python-pytesseract/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-pytesseract/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -22,10 +22,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local sitepackages=$(python -c "import site; print(site.getsitepackages()[0])")
- python setup.py install --skip-build --root=temp
- PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$sitepackages" pytest
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ PATH="$PWD/test-env/bin:$PATH" test-env/bin/python -m pytest
}
package() {
Modified: python-pytest/trunk/PKGBUILD
===================================================================
--- python-pytest/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-pytest/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -39,10 +39,9 @@
check() {
cd pytest-$pkgver
- 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
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ test-env/bin/python -m pytest
}
package() {
Modified: python-pytz-deprecation-shim/trunk/PKGBUILD
===================================================================
--- python-pytz-deprecation-shim/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-pytz-deprecation-shim/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -22,10 +22,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- python -m install --optimize=1 --destdir=temp dist/*.whl
- PYTHONPATH="$PWD/temp/$site_packages" pytest tests
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m install --optimize=1 dist/*.whl
+ test-env/bin/python -m pytest
}
package() {
Modified: python-tokenize-rt/trunk/PKGBUILD
===================================================================
--- python-tokenize-rt/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-tokenize-rt/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -21,10 +21,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- python setup.py install --root=temp --optimize=1 --skip-build
- PYTHONPATH="$PWD/temp/$sitepackages" pytest
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ test-env/bin/python -m pytest
}
package() {
Modified: python-typing_extensions/trunk/PKGBUILD
===================================================================
--- python-typing_extensions/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-typing_extensions/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -39,10 +39,9 @@
check() {
cd typing/typing_extensions
- mkdir -p temp
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- python setup.py install --root=temp --optimize=1 --skip-build
- PYTHONPATH="${PWD}/temp/${site_packages}" python src_py3/test_typing_extensions.py
+ python -m venv --system-site-packages test-env
+ test-env/bin/python setup.py install --optimize=1 --skip-build
+ test-env/bin/python src_py3/test_typing_extensions.py
}
package() {
Modified: python-tzdata/trunk/PKGBUILD
===================================================================
--- python-tzdata/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ python-tzdata/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -22,10 +22,9 @@
check() {
cd $_name-$pkgver
- mkdir -p temp
- local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
- python -m install --optimize=1 --destdir=temp dist/*.whl
- PYTHONPATH="$PWD/temp/$site_packages" pytest tests
+ python -m venv --system-site-packages test-env
+ test-env/bin/python -m install --optimize=1 dist/*.whl
+ test-env/bin/python -m pytest
}
package() {
Modified: rofimoji/trunk/PKGBUILD
===================================================================
--- rofimoji/trunk/PKGBUILD 2021-11-07 13:52:22 UTC (rev 1038580)
+++ rofimoji/trunk/PKGBUILD 2021-11-07 13:53:47 UTC (rev 1038581)
@@ -44,7 +44,7 @@
# 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/$pkgname-$pkgver.dist-info/LICENSE \
+ ln -s "$site_packages"/$pkgname-$pkgver.dist-info/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
More information about the arch-commits
mailing list