* [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
@ 2023-07-09 10:12 icp1994
2023-10-09 1:45 ` github-actions
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: icp1994 @ 2023-07-09 10:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 838 bytes --]
There is a new pull request by icp1994 against master on the void-packages repository
https://github.com/icp1994/void-packages build-style/python3
https://github.com/void-linux/void-packages/pull/44941
common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
Python packages which enables pytest's `--doctest-modules` flag fails while testing against an installed package - ref. https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723. Currently it's worked around in `python3-keyring` & `python3-fpylll` but is needed for `python3-path`, `python3-inflect`, `python3-zipp` etc - basically anything that follows https://github.com/jaraco/skeleton and there's quite a few of those in our repos.
A patch file from https://github.com/void-linux/void-packages/pull/44941.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-build-style/python3-44941.patch --]
[-- Type: text/x-diff, Size: 3545 bytes --]
From 2113dd21ef66827c4dfbb0c1ab47028d2cc38b12 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 21:59:23 +0530
Subject: [PATCH 1/4] common/build-style/python3-module.sh: enable
`PY_IGNORE_IMPORTMISMATCH` for testing
Fixes `ImportMismatchError` for doctest-modules in pytest
Ref: https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723
---
common/build-style/python3-module.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/build-style/python3-module.sh b/common/build-style/python3-module.sh
index b76d89c8b502..09d0b8b6ee18 100644
--- a/common/build-style/python3-module.sh
+++ b/common/build-style/python3-module.sh
@@ -8,6 +8,7 @@ do_build() {
do_check() {
local testjobs
+ export PY_IGNORE_IMPORTMISMATCH=1
if python3 -c 'import pytest' >/dev/null 2>&1; then
if python3 -c 'import xdist' >/dev/null 2>&1; then
testjobs="-n $XBPS_MAKEJOBS"
From 636872e6b14e9a0989fc1b897963c34c5e73f4ab Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 22:00:55 +0530
Subject: [PATCH 2/4] common/build-style/python3-pep517.sh: enable
`PY_IGNORE_IMPORTMISMATCH` for testing
Fixes `ImportMismatchError` for doctest-modules in pytest
Ref: https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723
---
common/build-style/python3-pep517.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 2d5ff7caf34e..98ab30ca9625 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -23,6 +23,7 @@ do_check() {
python3 -m installer --destdir "${testdir}" \
${make_install_args} ${make_install_target:-dist/*.whl}
+ export PY_IGNORE_IMPORTMISMATCH=1
PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" \
${make_check_pre} pytest3 ${testjobs} ${make_check_args} ${make_check_target}
}
From 5bb33eb72530ac49e007f271b4cd070c1d873368 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 22:17:09 +0530
Subject: [PATCH 3/4] python3-fpylll: remove redundant
`PY_IGNORE_IMPORTMISMATCH` export
---
srcpkgs/python3-fpylll/template | 4 ----
1 file changed, 4 deletions(-)
diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
index e4fd9584c795..78c8daf1058c 100644
--- a/srcpkgs/python3-fpylll/template
+++ b/srcpkgs/python3-fpylll/template
@@ -20,7 +20,3 @@ case $XBPS_TARGET_MACHINE in
# skip a test with numerical noise on 32 bit
i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
esac
-
-pre_check() {
- export PY_IGNORE_IMPORTMISMATCH=1
-}
From c171ce7068044827803ec59902e99fb06b547d87 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 22:21:43 +0530
Subject: [PATCH 4/4] python3-keyring: remove redundant
`PY_IGNORE_IMPORTMISMATCH` export
---
srcpkgs/python3-keyring/template | 1 -
1 file changed, 1 deletion(-)
diff --git a/srcpkgs/python3-keyring/template b/srcpkgs/python3-keyring/template
index 6280ed9d4a2e..caef618f46e3 100644
--- a/srcpkgs/python3-keyring/template
+++ b/srcpkgs/python3-keyring/template
@@ -14,7 +14,6 @@ homepage="https://pypi.org/project/keyring/"
changelog="https://raw.githubusercontent.com/jaraco/keyring/main/NEWS.rst"
distfiles="${PYPI_SITE}/k/keyring/keyring-${version}.tar.gz"
checksum=ca0746a19ec421219f4d713f848fa297a661a8a8c1504867e55bfb5e09091509
-make_check_pre="env PY_IGNORE_IMPORTMISMATCH=1"
pre_check() {
vsed -e '/addopts/d' -i pytest.ini
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
@ 2023-10-09 1:45 ` github-actions
2023-10-10 5:32 ` [PR PATCH] [Updated] " icp1994
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: github-actions @ 2023-10-09 1:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/44941#issuecomment-1752245849
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
2023-10-09 1:45 ` github-actions
@ 2023-10-10 5:32 ` icp1994
2023-10-10 5:44 ` icp1994
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: icp1994 @ 2023-10-10 5:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
There is an updated pull request by icp1994 against master on the void-packages repository
https://github.com/icp1994/void-packages build-style/python3
https://github.com/void-linux/void-packages/pull/44941
common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
Python packages which enables pytest's `--doctest-modules` flag fails while testing against an installed package - ref. https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723. Currently it's worked around in `python3-keyring` & `python3-fpylll` but is needed for `python3-path`, `python3-inflect`, `python3-zipp` etc - basically anything that follows https://github.com/jaraco/skeleton and there's quite a few of those in our repos.
A patch file from https://github.com/void-linux/void-packages/pull/44941.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-build-style/python3-44941.patch --]
[-- Type: text/x-diff, Size: 3756 bytes --]
From 53edfae84f9b09fce05a301e0c9a572edeb51b91 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 21:59:23 +0530
Subject: [PATCH 1/4] common/build-style/python3-module.sh: enable
`PY_IGNORE_IMPORTMISMATCH` for testing
Fixes `ImportMismatchError` for doctest-modules in pytest
Ref: https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723
---
common/build-style/python3-module.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/build-style/python3-module.sh b/common/build-style/python3-module.sh
index b76d89c8b502a..8aec7a0e45902 100644
--- a/common/build-style/python3-module.sh
+++ b/common/build-style/python3-module.sh
@@ -12,7 +12,7 @@ do_check() {
if python3 -c 'import xdist' >/dev/null 2>&1; then
testjobs="-n $XBPS_MAKEJOBS"
fi
- PYTHONPATH="$(cd build/lib* && pwd)" \
+ PYTHONPATH="$(cd build/lib* && pwd)" PY_IGNORE_IMPORTMISMATCH=1 \
${make_check_pre} \
python3 -m pytest ${testjobs} ${make_check_args} ${make_check_target}
else
From 2cd71af0fa04e7a7823c1fc0e6bb9192d739e3d6 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 22:00:55 +0530
Subject: [PATCH 2/4] common/build-style/python3-pep517.sh: enable
`PY_IGNORE_IMPORTMISMATCH` for testing
Fixes `ImportMismatchError` for doctest-modules in pytest
Ref: https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723
---
common/build-style/python3-pep517.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 5ec20dd117f8a..46ce6cf3699ff 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -33,7 +33,7 @@ do_check() {
python3 -m installer --destdir "${testdir}" \
${make_install_args} ${make_install_target:-dist/*.whl}
- PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" \
+ PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" PY_IGNORE_IMPORTMISMATCH=1 \
${make_check_pre} pytest3 ${testjobs} ${make_check_args} ${make_check_target}
}
From 25762ae6e2c7311f89d3d6a95fa6b3846606276c Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 22:17:09 +0530
Subject: [PATCH 3/4] python3-fpylll: remove redundant
`PY_IGNORE_IMPORTMISMATCH` export
---
srcpkgs/python3-fpylll/template | 4 ----
1 file changed, 4 deletions(-)
diff --git a/srcpkgs/python3-fpylll/template b/srcpkgs/python3-fpylll/template
index adff12e05ae3a..39f6f7e1d282f 100644
--- a/srcpkgs/python3-fpylll/template
+++ b/srcpkgs/python3-fpylll/template
@@ -20,7 +20,3 @@ case $XBPS_TARGET_MACHINE in
# skip a test with numerical noise on 32 bit
i686*) make_check_args="-k not(averaged_simulate_prob)" ;;
esac
-
-pre_check() {
- export PY_IGNORE_IMPORTMISMATCH=1
-}
From 81071232bcded8617010427c37a8bf8f4902d296 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 22:21:43 +0530
Subject: [PATCH 4/4] python3-keyring: remove redundant
`PY_IGNORE_IMPORTMISMATCH` export
---
srcpkgs/python3-keyring/template | 1 -
1 file changed, 1 deletion(-)
diff --git a/srcpkgs/python3-keyring/template b/srcpkgs/python3-keyring/template
index e04682c8ec5d4..20bf6b03811c8 100644
--- a/srcpkgs/python3-keyring/template
+++ b/srcpkgs/python3-keyring/template
@@ -14,7 +14,6 @@ homepage="https://pypi.org/project/keyring/"
changelog="https://raw.githubusercontent.com/jaraco/keyring/main/NEWS.rst"
distfiles="${PYPI_SITE}/k/keyring/keyring-${version}.tar.gz"
checksum=ca0746a19ec421219f4d713f848fa297a661a8a8c1504867e55bfb5e09091509
-make_check_pre="env PY_IGNORE_IMPORTMISMATCH=1"
pre_check() {
vsed -e '/addopts/d' -i pytest.ini
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
2023-10-09 1:45 ` github-actions
2023-10-10 5:32 ` [PR PATCH] [Updated] " icp1994
@ 2023-10-10 5:44 ` icp1994
2023-10-10 16:38 ` tornaria
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: icp1994 @ 2023-10-10 5:44 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 155 bytes --]
New comment by icp1994 on void-packages repository
https://github.com/void-linux/void-packages/pull/44941#issuecomment-1754429778
Comment:
cc @ahesford
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
` (2 preceding siblings ...)
2023-10-10 5:44 ` icp1994
@ 2023-10-10 16:38 ` tornaria
2023-10-10 16:41 ` classabbyamp
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: tornaria @ 2023-10-10 16:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 745 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/44941#issuecomment-1755812190
Comment:
What could be the downside of this? If there is none, I don't see why not. OTOH, the one liner is easy.
I'm more worried about some packages that fail check unless installed in a venv. A new one is `python3-jupyterlab_server` which needs to install in a venv since one test wants to use pip to install some package (and pip doesn't work anymore outside a venv). We discussed this before and we agreed that for most packages we don't want to use a venv, but I wonder if there could be a simple way to tell the build-style to use a venv so we don't have to go copying the same code all over the place.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
` (3 preceding siblings ...)
2023-10-10 16:38 ` tornaria
@ 2023-10-10 16:41 ` classabbyamp
2023-10-10 16:51 ` tornaria
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: classabbyamp @ 2023-10-10 16:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 288 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/44941#issuecomment-1755820880
Comment:
> one test wants to use pip to install some package
the usual way to deal with that is packaging that package and adding it as checkdepends
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
` (4 preceding siblings ...)
2023-10-10 16:41 ` classabbyamp
@ 2023-10-10 16:51 ` tornaria
2023-10-10 17:15 ` icp1994
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: tornaria @ 2023-10-10 16:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 352 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/44941#issuecomment-1755854290
Comment:
> > one test wants to use pip to install some package
>
> the usual way to deal with that is packaging that package and adding it as checkdepends
This is just a dummy package for the purposes of testing.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
` (5 preceding siblings ...)
2023-10-10 16:51 ` tornaria
@ 2023-10-10 17:15 ` icp1994
2023-10-10 17:17 ` classabbyamp
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: icp1994 @ 2023-10-10 17:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 254 bytes --]
New comment by icp1994 on void-packages repository
https://github.com/void-linux/void-packages/pull/44941#issuecomment-1755899620
Comment:
Is it possible to run `pip config set install.break-system-packages True` in `pre_check()` for those edge cases?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
` (6 preceding siblings ...)
2023-10-10 17:15 ` icp1994
@ 2023-10-10 17:17 ` classabbyamp
2024-01-09 1:47 ` github-actions
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: classabbyamp @ 2023-10-10 17:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 218 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/44941#issuecomment-1755903070
Comment:
that kind of test seems like something that should probably be disabled
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
` (7 preceding siblings ...)
2023-10-10 17:17 ` classabbyamp
@ 2024-01-09 1:47 ` github-actions
2024-01-11 19:28 ` [PR PATCH] [Updated] " icp1994
2024-01-21 21:04 ` [PR PATCH] [Merged]: " classabbyamp
10 siblings, 0 replies; 12+ messages in thread
From: github-actions @ 2024-01-09 1:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/44941#issuecomment-1882140066
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Updated] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
` (8 preceding siblings ...)
2024-01-09 1:47 ` github-actions
@ 2024-01-11 19:28 ` icp1994
2024-01-21 21:04 ` [PR PATCH] [Merged]: " classabbyamp
10 siblings, 0 replies; 12+ messages in thread
From: icp1994 @ 2024-01-11 19:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
There is an updated pull request by icp1994 against master on the void-packages repository
https://github.com/icp1994/void-packages build-style/python3
https://github.com/void-linux/void-packages/pull/44941
common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
Python packages which enables pytest's `--doctest-modules` flag fails while testing against an installed package - ref. https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723. Currently it's worked around in `python3-keyring` & `python3-fpylll` but is needed for `python3-path`, `python3-inflect`, `python3-zipp` etc - basically anything that follows https://github.com/jaraco/skeleton and there's quite a few of those in our repos.
A patch file from https://github.com/void-linux/void-packages/pull/44941.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-build-style/python3-44941.patch --]
[-- Type: text/x-diff, Size: 3031 bytes --]
From 5d5d9b4dcdab4adc68e5335455de34239c856748 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 21:59:23 +0530
Subject: [PATCH 1/3] common/build-style/python3-module.sh: enable
`PY_IGNORE_IMPORTMISMATCH` for testing
Fixes `ImportMismatchError` for doctest-modules in pytest
Ref: https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723
---
common/build-style/python3-module.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/build-style/python3-module.sh b/common/build-style/python3-module.sh
index b76d89c8b502a..8aec7a0e45902 100644
--- a/common/build-style/python3-module.sh
+++ b/common/build-style/python3-module.sh
@@ -12,7 +12,7 @@ do_check() {
if python3 -c 'import xdist' >/dev/null 2>&1; then
testjobs="-n $XBPS_MAKEJOBS"
fi
- PYTHONPATH="$(cd build/lib* && pwd)" \
+ PYTHONPATH="$(cd build/lib* && pwd)" PY_IGNORE_IMPORTMISMATCH=1 \
${make_check_pre} \
python3 -m pytest ${testjobs} ${make_check_args} ${make_check_target}
else
From 43503603b822b8c83be4792a359f7ee3ae3e9dd8 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 22:00:55 +0530
Subject: [PATCH 2/3] common/build-style/python3-pep517.sh: enable
`PY_IGNORE_IMPORTMISMATCH` for testing
Fixes `ImportMismatchError` for doctest-modules in pytest
Ref: https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723
---
common/build-style/python3-pep517.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 5ec20dd117f8a..46ce6cf3699ff 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -33,7 +33,7 @@ do_check() {
python3 -m installer --destdir "${testdir}" \
${make_install_args} ${make_install_target:-dist/*.whl}
- PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" \
+ PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" PY_IGNORE_IMPORTMISMATCH=1 \
${make_check_pre} pytest3 ${testjobs} ${make_check_args} ${make_check_target}
}
From 9f6f425d4a4ec9999295839f4220b3d399add334 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sat, 8 Jul 2023 22:21:43 +0530
Subject: [PATCH 3/3] python3-keyring: remove redundant
`PY_IGNORE_IMPORTMISMATCH` export
---
srcpkgs/python3-keyring/template | 1 -
1 file changed, 1 deletion(-)
diff --git a/srcpkgs/python3-keyring/template b/srcpkgs/python3-keyring/template
index e04682c8ec5d4..20bf6b03811c8 100644
--- a/srcpkgs/python3-keyring/template
+++ b/srcpkgs/python3-keyring/template
@@ -14,7 +14,6 @@ homepage="https://pypi.org/project/keyring/"
changelog="https://raw.githubusercontent.com/jaraco/keyring/main/NEWS.rst"
distfiles="${PYPI_SITE}/k/keyring/keyring-${version}.tar.gz"
checksum=ca0746a19ec421219f4d713f848fa297a661a8a8c1504867e55bfb5e09091509
-make_check_pre="env PY_IGNORE_IMPORTMISMATCH=1"
pre_check() {
vsed -e '/addopts/d' -i pytest.ini
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PR PATCH] [Merged]: common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
` (9 preceding siblings ...)
2024-01-11 19:28 ` [PR PATCH] [Updated] " icp1994
@ 2024-01-21 21:04 ` classabbyamp
10 siblings, 0 replies; 12+ messages in thread
From: classabbyamp @ 2024-01-21 21:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
There's a merged pull request on the void-packages repository
common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing
https://github.com/void-linux/void-packages/pull/44941
Description:
Python packages which enables pytest's `--doctest-modules` flag fails while testing against an installed package - ref. https://github.com/pytest-dev/pytest/issues/2042#issuecomment-381309723. Currently it's worked around in `python3-keyring` & `python3-fpylll` but is needed for `python3-path`, `python3-inflect`, `python3-zipp` etc - basically anything that follows https://github.com/jaraco/skeleton and there's quite a few of those in our repos.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-01-21 21:04 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-09 10:12 [PR PATCH] common/build-style/python3-{module,pep517}.sh: enable `PY_IGNORE_IMPORTMISMATCH` for testing icp1994
2023-10-09 1:45 ` github-actions
2023-10-10 5:32 ` [PR PATCH] [Updated] " icp1994
2023-10-10 5:44 ` icp1994
2023-10-10 16:38 ` tornaria
2023-10-10 16:41 ` classabbyamp
2023-10-10 16:51 ` tornaria
2023-10-10 17:15 ` icp1994
2023-10-10 17:17 ` classabbyamp
2024-01-09 1:47 ` github-actions
2024-01-11 19:28 ` [PR PATCH] [Updated] " icp1994
2024-01-21 21:04 ` [PR PATCH] [Merged]: " classabbyamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).