From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: python3-pytest-xdist and dependencies
Date: Sat, 14 May 2022 21:25:39 +0200 [thread overview]
Message-ID: <20220514192539.aNglk5I0yzLBQMG1qRlo3g-3mXeakqw06KL5ZlqOWNY@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-37099@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages new/python3-pytest-xdist
https://github.com/void-linux/void-packages/pull/37099
New package: python3-pytest-xdist and dependencies
- New package: python3-execnet-1.9.0
- New package: python3-pytest-forked-1.4.0
- New package: python3-pytest-xdist-2.5.0
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/37099.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/python3-pytest-xdist-37099.patch --]
[-- Type: text/x-diff, Size: 6198 bytes --]
From f87e32ab419a1759edd942d9d93149fb66a522fa Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Fri, 13 May 2022 02:10:50 -0400
Subject: [PATCH 1/4] New package: python3-execnet-1.9.0
---
srcpkgs/python3-execnet/template | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 srcpkgs/python3-execnet/template
diff --git a/srcpkgs/python3-execnet/template b/srcpkgs/python3-execnet/template
new file mode 100644
index 000000000000..e6634eeded5a
--- /dev/null
+++ b/srcpkgs/python3-execnet/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-execnet'
+pkgname=python3-execnet
+version=1.9.0
+revision=1
+wrksrc="${pkgname#python3-}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-setuptools_scm"
+checkdepends="python3-pytest"
+short_desc="Distributed Python deployment and communication"
+maintainer="classabbyamp <dev@placeviolette.net>"
+license="MIT"
+homepage="https://codespeak.net/execnet/"
+changelog="https://raw.githubusercontent.com/pytest-dev/execnet/master/CHANGELOG.rst"
+distfiles="https://github.com/pytest-dev/execnet/archive/refs/tags/v${version}.tar.gz"
+checksum=d53787346558395f2cf8c570f4a9e2457eecde972429bf00c423a40b1f325765
+
+export SETUPTOOLS_SCM_PRETEND_VERSION="$version"
+
+post_install() {
+ vlicense LICENSE
+}
From f2acfed26d97ff8b3c33e0f57d13b0b7fdab759b Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Fri, 13 May 2022 02:11:12 -0400
Subject: [PATCH 2/4] New package: python3-pytest-forked-1.4.0
---
srcpkgs/python3-pytest-forked/template | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 srcpkgs/python3-pytest-forked/template
diff --git a/srcpkgs/python3-pytest-forked/template b/srcpkgs/python3-pytest-forked/template
new file mode 100644
index 000000000000..d36a05bd46f1
--- /dev/null
+++ b/srcpkgs/python3-pytest-forked/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-pytest-forked'
+pkgname=python3-pytest-forked
+version=1.4.0
+revision=1
+wrksrc="${pkgname#python3-}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-setuptools_scm"
+depends="python3-pytest"
+short_desc="Run pytest tests in a forked subprocess"
+maintainer="classabbyamp <dev@placeviolette.net>"
+license="MIT"
+homepage="https://github.com/pytest-dev/pytest-forked"
+changelog="https://raw.githubusercontent.com/pytest-dev/pytest-forked/master/CHANGELOG.rst"
+distfiles="https://github.com/pytest-dev/pytest-forked/archive/refs/tags/v${version}.tar.gz"
+checksum=22f3a65ef24d45fa03c6fec0d4b582f5f02bea4df26966c1b9812d3a64b44ace
+# tests only work inside tox
+make_check=no
+
+export SETUPTOOLS_SCM_PRETEND_VERSION="$version"
+
+post_install() {
+ vlicense LICENSE
+}
From fc34c7110ede0f812e071d8195ee444e2b22be8f Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Fri, 13 May 2022 02:11:49 -0400
Subject: [PATCH 3/4] New package: python3-pytest-xdist-2.5.0
---
srcpkgs/python3-pytest-xdist/template | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 srcpkgs/python3-pytest-xdist/template
diff --git a/srcpkgs/python3-pytest-xdist/template b/srcpkgs/python3-pytest-xdist/template
new file mode 100644
index 000000000000..3e9bef9bd382
--- /dev/null
+++ b/srcpkgs/python3-pytest-xdist/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-pytest-xdist'
+pkgname=python3-pytest-xdist
+version=2.5.0
+revision=1
+wrksrc="${pkgname#python3-}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-setuptools_scm"
+depends="python3-pytest python3-pytest-forked python3-execnet"
+short_desc="Pytest plugin for distributed testing & loop-on-failures testing modes"
+maintainer="classabbyamp <dev@placeviolette.net>"
+license="MIT"
+homepage="https://github.com/pytest-dev/pytest-xdist"
+changelog="https://raw.githubusercontent.com/pytest-dev/pytest-xdist/master/CHANGELOG.rst"
+distfiles="https://github.com/pytest-dev/pytest-xdist/archive/refs/tags/v${version}.tar.gz"
+checksum=b0623f7b0e190175f46dbc939cc143ca49af2e5bdc70f2627c083b3ed1109f26
+# tests only work in tox
+make_check=no
+
+export SETUPTOOLS_SCM_PRETEND_VERSION="$version"
+
+post_install() {
+ vlicense LICENSE
+}
From 866c1e371115820e1a953033aea60d596c8ca0f3 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Sat, 14 May 2022 15:23:13 -0400
Subject: [PATCH 4/4] common/build-style/python3-*: add support for
pytest-xdist
if python3-pytest-xdist is included in checkdepends, use $XBPS_MAKEJOBS
to run tests in parallel.
---
common/build-style/python3-module.sh | 6 +++++-
common/build-style/python3-pep517.sh | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/common/build-style/python3-module.sh b/common/build-style/python3-module.sh
index 6ec5225d6aab..a0a694ee4a97 100644
--- a/common/build-style/python3-module.sh
+++ b/common/build-style/python3-module.sh
@@ -24,10 +24,14 @@ do_build() {
}
do_check() {
+ local testjobs
if python3 -c 'import pytest' >/dev/null 2>&1; then
+ if python3 -c 'import xdist' >/dev/null 2>&1; then
+ testjobs="-n $XBPS_MAKEJOBS"
+ fi
PYTHONPATH="$(cd build/lib* && pwd)" \
${make_check_pre} \
- python3 -m pytest ${make_check_args} ${make_check_target}
+ python3 -m pytest ${testjobs} ${make_check_args} ${make_check_target}
else
# Fall back to deprecated setup.py test orchestration without pytest
if [ -z "$make_check_target" ]; then
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index a733a521fb3d..97dc7995d58b 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -13,8 +13,12 @@ do_build() {
}
do_check() {
+ local testjobs
if python3 -c 'import pytest' >/dev/null 2>&1; then
- ${make_check_pre} python3 -m pytest ${make_check_args} ${make_check_target}
+ if python3 -c 'import xdist' >/dev/null 2>&1; then
+ testjobs="-n $XBPS_MAKEJOBS"
+ fi
+ ${make_check_pre} python3 -m pytest ${testjobs} ${make_check_args} ${make_check_target}
else
msg_warn "Unable to determine tests for PEP517 Python templates"
return 0
next prev parent reply other threads:[~2022-05-14 19:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-13 6:13 [PR PATCH] " classabbyamp
2022-05-13 6:39 ` classabbyamp
2022-05-13 16:40 ` classabbyamp
2022-05-14 18:58 ` ahesford
2022-05-14 19:20 ` classabbyamp
2022-05-14 19:21 ` classabbyamp
2022-05-14 19:25 ` classabbyamp [this message]
2022-05-14 20:29 ` tornaria
2022-05-17 17:05 ` [PR PATCH] [Updated] " classabbyamp
2022-05-17 19:45 ` [PR REVIEW] " basploeger
2022-05-17 19:51 ` basploeger
2022-05-17 20:35 ` classabbyamp
2022-05-28 6:55 ` [PR PATCH] [Updated] " classabbyamp
2022-06-05 13:05 ` basploeger
2022-06-07 15:23 ` [PR PATCH] [Updated] " classabbyamp
2022-06-07 15:27 ` classabbyamp
2022-06-09 22:49 ` [PR REVIEW] " jcgruenhage
2022-06-09 22:52 ` jcgruenhage
2022-06-09 22:53 ` classabbyamp
2022-06-09 22:53 ` classabbyamp
2022-06-09 22:54 ` jcgruenhage
2022-06-09 22:57 ` [PR PATCH] [Updated] " classabbyamp
2022-06-09 22:58 ` [PR REVIEW] " jcgruenhage
2022-06-10 1:44 ` [PR PATCH] [Merged]: " 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=20220514192539.aNglk5I0yzLBQMG1qRlo3g-3mXeakqw06KL5ZlqOWNY@z \
--to=classabbyamp@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).