Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] common/build-style/python3-pep517.sh: ignore tests in temp destdir
@ 2023-05-19 19:32 icp1994
  2023-05-24 22:40 ` tornaria
                   ` (31 more replies)
  0 siblings, 32 replies; 33+ messages in thread
From: icp1994 @ 2023-05-19 19:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 950 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-pep517
https://github.com/void-linux/void-packages/pull/43946

common/build-style/python3-pep517.sh: ignore tests in temp destdir
#### Testing the changes
- I tested the changes in this PR: **YES**

An edge case I came across today. On rare cases, packages include tests in their built wheel. While testing with these wheels extracted in a temporary directory, it conflicts with the tests in the source tree as pytest cannot run testfiless with same name in different directories (ref: https://github.com/pytest-dev/pytest/issues/3151).

See [this run](https://github.com/void-linux/void-packages/actions/runs/5021644643/jobs/9004230165) as an example. The same package passes checks correctly in this PR.

A patch file from https://github.com/void-linux/void-packages/pull/43946.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-build-style/python3-pep517-43946.patch --]
[-- Type: text/x-diff, Size: 2375 bytes --]

From 669db3b3b7a5408fb9f69971c8252c9772267e6b Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Fri, 19 May 2023 12:46:35 +0530
Subject: [PATCH 1/2] common/build-style/python3-pep517.sh: ignore tests in
 temp destdir

---
 common/build-style/python3-pep517.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index f13046ea1968..0a9257b7ba7e 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -25,7 +25,8 @@ do_check() {
 			${make_install_args} ${make_install_target}
 
 		PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" \
-			${make_check_pre} pytest3 ${testjobs} ${make_check_args} ${make_check_target}
+			${make_check_pre} pytest3 --ignore="${testdir}" ${testjobs} \
+			${make_check_args} ${make_check_target}
 	else
 		msg_warn "Unable to determine tests for PEP517 Python templates\n"
 		return 0

From 94eeba9d20b895f73cf5c230c7b2fb3e49f5a888 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Thu, 16 Feb 2023 19:39:39 +0530
Subject: [PATCH 2/2] python3-colorama: update to 0.4.6.

---
 srcpkgs/python3-colorama/template | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/python3-colorama/template b/srcpkgs/python3-colorama/template
index 36a3dda2081c..ec542c2b3b4a 100644
--- a/srcpkgs/python3-colorama/template
+++ b/srcpkgs/python3-colorama/template
@@ -1,18 +1,20 @@
 # Template file for 'python3-colorama'
 pkgname=python3-colorama
-version=0.4.5
-revision=2
-build_style=python3-module
-hostmakedepends="unzip python3-setuptools"
+version=0.4.6
+revision=1
+build_style=python3-pep517
+hostmakedepends="hatchling"
 depends="python3"
+checkdepends="python3-pytest"
 short_desc="Cross-platform colored terminal text (Python3)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="BSD-3-Clause"
 homepage="https://github.com/tartley/colorama"
 changelog="https://github.com/tartley/colorama/raw/master/CHANGELOG.rst"
 distfiles="${PYPI_SITE}/c/colorama/colorama-${version}.tar.gz"
-checksum=e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4
+checksum=08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44
 
 post_install() {
 	vlicense LICENSE.txt
+	rm -r ${DESTDIR}/${py3_sitelib}/colorama/tests
 }

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2023-06-05 20:27 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-19 19:32 [PR PATCH] common/build-style/python3-pep517.sh: ignore tests in temp destdir icp1994
2023-05-24 22:40 ` tornaria
2023-05-25 14:25 ` [PR PATCH] [Updated] " icp1994
2023-05-25 14:27 ` icp1994
2023-05-25 14:59 ` tornaria
2023-05-25 15:11 ` icp1994
2023-05-25 15:20 ` ahesford
2023-05-25 15:36 ` ahesford
2023-05-25 15:44 ` icp1994
2023-05-25 16:15 ` ahesford
2023-05-25 19:13 ` [PR PATCH] [Updated] " icp1994
2023-05-25 19:15 ` icp1994
2023-05-25 19:19 ` ahesford
2023-05-31 13:59 ` [PR REVIEW] " ahesford
2023-05-31 14:00 ` ahesford
2023-05-31 21:44 ` tornaria
2023-05-31 21:56 ` tornaria
2023-06-01  7:06 ` [PR REVIEW] " icp1994
2023-06-01 13:44 ` tornaria
2023-06-01 13:57 ` ahesford
2023-06-01 14:01 ` ahesford
2023-06-02 17:16 ` [PR PATCH] [Updated] " icp1994
2023-06-02 17:19 ` [PR REVIEW] " icp1994
2023-06-05  1:42 ` tornaria
2023-06-05  3:58 ` [PR REVIEW] " ahesford
2023-06-05  3:59 ` ahesford
2023-06-05  3:59 ` ahesford
2023-06-05 15:10 ` ahesford
2023-06-05 19:36 ` [PR PATCH] [Updated] " icp1994
2023-06-05 19:42 ` icp1994
2023-06-05 19:44 ` [PR REVIEW] " icp1994
2023-06-05 19:46 ` [PR PATCH] [Updated] " icp1994
2023-06-05 20:27 ` [PR PATCH] [Closed]: " ahesford

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).