git: 287df32c2fe9 - main - devel/py-stestr: Add py-stestr 4.1.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 08 Apr 2024 20:17:57 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=287df32c2fe9cc3c2b410412328ba52c8cb51763

commit 287df32c2fe9cc3c2b410412328ba52c8cb51763
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-04-08 20:07:37 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-04-08 20:16:40 +0000

    devel/py-stestr: Add py-stestr 4.1.0
    
    stestr is parallel Python test runner designed to execute unittest test suites
    using multiple processes to split up execution of a test suite. It also will
    store a history of all test runs to help in debugging failures and optimizing
    the scheduler to improve speed. To accomplish this goal it uses the subunit
    protocol to facilitate streaming and storing results from multiple workers.
    
    stestr originally started as a fork of the testrepository project. But, instead
    of being an interface for any test runner that used subunit, like
    testrepository, stestr concentrated on being a dedicated test runner for python
    projects. While stestr was originally forked from testrepository it is not
    backwards compatible with testrepository. At a high level the basic concepts of
    operation are shared between the two projects but the actual usage is not
    exactly the same.
---
 devel/Makefile                               |  1 +
 devel/py-stestr/Makefile                     | 33 ++++++++++++++++++++++++++++
 devel/py-stestr/distinfo                     |  3 +++
 devel/py-stestr/files/patch-requirements.txt | 11 ++++++++++
 devel/py-stestr/pkg-descr                    | 13 +++++++++++
 5 files changed, 61 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 44f55b8e947f..0f152388d5ce 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5715,6 +5715,7 @@
     SUBDIR += py-stdlib-list
     SUBDIR += py-stdlibs
     SUBDIR += py-stdnum
+    SUBDIR += py-stestr
     SUBDIR += py-stevedore
     SUBDIR += py-stone
     SUBDIR += py-stopit
diff --git a/devel/py-stestr/Makefile b/devel/py-stestr/Makefile
new file mode 100644
index 000000000000..6a2495683cbb
--- /dev/null
+++ b/devel/py-stestr/Makefile
@@ -0,0 +1,33 @@
+PORTNAME=	stestr
+PORTVERSION=	4.1.0
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Parallel Python test runner built around subunit
+WWW=		https://stestr.readthedocs.io/en/latest/ \
+		https://github.com/mtreinish/stestr
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pbr>=2.0.0:devel/py-pbr@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cliff>=2.8.0:devel/py-cliff@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}extras>=1.0.0:devel/py-extras@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}fixtures>=3.0.0:devel/py-fixtures@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pbr>=2.0.0:devel/py-pbr@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}python-subunit>=1.3.0:devel/py-python-subunit@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}testtools>=2.2.0:devel/py-testtools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}tomlkit>=0.11.6:textproc/py-tomlkit@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}voluptuous>=0.8.9:devel/py-voluptuous@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}yaml>=3.10.0:devel/py-yaml@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-stestr/distinfo b/devel/py-stestr/distinfo
new file mode 100644
index 000000000000..fdb23dede19a
--- /dev/null
+++ b/devel/py-stestr/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1712580500
+SHA256 (stestr-4.1.0.tar.gz) = 5f61c369eece63c292d13599e12aa158af7685990643f24dd6fa7fabfe34e98a
+SIZE (stestr-4.1.0.tar.gz) = 113187
diff --git a/devel/py-stestr/files/patch-requirements.txt b/devel/py-stestr/files/patch-requirements.txt
new file mode 100644
index 000000000000..04452df31f17
--- /dev/null
+++ b/devel/py-stestr/files/patch-requirements.txt
@@ -0,0 +1,11 @@
+--- requirements.txt.orig	2023-09-18 12:36:07 UTC
++++ requirements.txt
+@@ -3,7 +3,7 @@ cliff>=2.8.0 # Apache-2.0
+ # process, which may cause wedges in the gate later.
+ pbr!=2.1.0,>=2.0.0,!=4.0.0,!=4.0.1,!=4.0.2,!=4.0.3 # Apache-2.0
+ cliff>=2.8.0 # Apache-2.0
+-python-subunit>=1.4.0 # Apache-2.0/BSD
++python-subunit>=1.3.0 # Apache-2.0/BSD
+ fixtures>=3.0.0 # Apache-2.0/BSD
+ testtools>=2.2.0 # MIT
+ PyYAML>=3.10.0 # MIT
diff --git a/devel/py-stestr/pkg-descr b/devel/py-stestr/pkg-descr
new file mode 100644
index 000000000000..4aeb234b83e4
--- /dev/null
+++ b/devel/py-stestr/pkg-descr
@@ -0,0 +1,13 @@
+stestr is parallel Python test runner designed to execute unittest test suites
+using multiple processes to split up execution of a test suite. It also will
+store a history of all test runs to help in debugging failures and optimizing
+the scheduler to improve speed. To accomplish this goal it uses the subunit
+protocol to facilitate streaming and storing results from multiple workers.
+
+stestr originally started as a fork of the testrepository project. But, instead
+of being an interface for any test runner that used subunit, like
+testrepository, stestr concentrated on being a dedicated test runner for python
+projects. While stestr was originally forked from testrepository it is not
+backwards compatible with testrepository. At a high level the basic concepts of
+operation are shared between the two projects but the actual usage is not
+exactly the same.