Skip to content

Commit

Permalink
devel/py-pytest-xdist: Update to 3.3.1
Browse files Browse the repository at this point in the history
* Introduce default PSUTIL and SETPROCTITLE options to reflect the
  settings as noted in "pyproject.toml".

* Switch to the PEP517 build framework.

* Update test suite and use USE_PYTHON=pytest to simplify the Makefile.

* Errors like this one [1] should be remedied with this update:

[...]
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/xdist/scheduler/each.py", line 1, in <module>
INTERNALERROR>     from py.log import Producer
INTERNALERROR> ModuleNotFoundError: No module named 'py.log'; 'py' is not a package
[...]

  This is because devel/py-py was removed from devel/py-pytest's
  RUN_DEPENDS in 47177a5 as it's no longer a dependency since
  py-pytest 7.2.0.

Changelog since 2.5.0:

https://github.com/pytest-dev/pytest-xdist/blob/v3.3.1/CHANGELOG.rst

PR:		274789
Reported by:	QA run of textproc/py-ocrmypdf's test suite [1]
Approved by:	bofh (maintainer)
  • Loading branch information
knobix committed Oct 29, 2023
1 parent 0d5a698 commit 5f7e3b0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
21 changes: 14 additions & 7 deletions devel/py-pytest-xdist/Makefile
@@ -1,5 +1,5 @@
PORTNAME= pytest-xdist
PORTVERSION= 2.5.0
PORTVERSION= 3.3.1
PORTEPOCH= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
Expand All @@ -12,20 +12,27 @@ WWW= https://github.com/pytest-dev/pytest-xdist
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR}
BUILD_DEPENDS= ${PY_SETUPTOOLS} \
${PYTHON_PKGNAMEPREFIX}setuptools_scm>=6.2.3:devel/py-setuptools_scm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}execnet>=1.1:sysutils/py-execnet@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-forked>=0:devel/py-pytest-forked@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest>=6.2.0:devel/py-pytest@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}filelock>=0:sysutils/py-filelock@${PY_FLAVOR}

USES= python
USE_PYTHON= autoplist concurrent distutils
USE_PYTHON= autoplist concurrent pep517 pytest

TEST_ENV= PYTHONPATH=${WRKSRC}/src
TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}

NO_ARCH= yes

do-test:
@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -o addopts=)
OPTIONS_DEFINE= PSUTIL SETPROCTITLE
OPTIONS_DEFAULT= PSUTIL SETPROCTITLE

PSUTIL_DESC= Detect number of available CPUs
SETPROCTITLE_DESC= Indicate state of current running workers

PSUTIL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}psutil>=3.0:sysutils/py-psutil@${PY_FLAVOR}
SETPROCTITLE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setproctitle>0:devel/py-setproctitle@${PY_FLAVOR}

.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions devel/py-pytest-xdist/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1647069706
SHA256 (pytest-xdist-2.5.0.tar.gz) = 4580deca3ff04ddb2ac53eba39d76cb5dd5edeac050cb6fbc768b0dd712b4edf
SIZE (pytest-xdist-2.5.0.tar.gz) = 72455
TIMESTAMP = 1698519402
SHA256 (pytest-xdist-3.3.1.tar.gz) = d5ee0520eb1b7bcca50a60a518ab7a7707992812c578198f8b44fdfac78e8c93
SIZE (pytest-xdist-3.3.1.tar.gz) = 77751

0 comments on commit 5f7e3b0

Please sign in to comment.