Github messages for voidlinux
 help / color / mirror / Atom feed
From: icp1994 <icp1994@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] common/build-style/python3-pep517.sh: ignore tests in temp destdir
Date: Mon, 05 Jun 2023 21:36:44 +0200	[thread overview]
Message-ID: <20230605193644.0FQ4eUwz_qpQjMGYAMTjQwzBpOt2Dhct_LjaPhpvk0s@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43946@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 955 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-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: 2214 bytes --]

From 86e76885a1d9f5cfcac96d386bf917df87fced28 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Thu, 16 Feb 2023 19:39:39 +0530
Subject: [PATCH 1/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
 }

From a16895d6ab20851274ce01c3d662f32b09055322 Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Fri, 26 May 2023 00:43:08 +0530
Subject: [PATCH 2/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 ffe52fccf3db..b524495c0b25 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -19,7 +19,8 @@ do_check() {
 		testjobs="-n $XBPS_MAKEJOBS"
 	fi
 
-	local testdir="${wrksrc}/tmp/$(date +%s)"
+	local testdir="${wrksrc}/.xbps-testdir/$(date +%s)"
+
 	python3 -m installer --destdir "${testdir}" \
 		${make_install_args} ${make_install_target:-dist/*.whl}
 

  parent reply	other threads:[~2023-06-05 19:36 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-19 19:32 [PR PATCH] " 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 ` icp1994 [this message]
2023-06-05 19:42 ` [PR PATCH] [Updated] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230605193644.0FQ4eUwz_qpQjMGYAMTjQwzBpOt2Dhct_LjaPhpvk0s@z \
    --to=icp1994@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).