svn commit: r418711 - in head: databases/py-sqlalchemy09 databases/py-sqlalchemy10 devel/py-apscheduler devel/py-cffi devel/py-pytest-xdist sysutils/py-honcho textproc/py-pyscss
Jan Beich
jbeich at FreeBSD.org
Mon Jul 18 16:15:03 UTC 2016
Author: jbeich
Date: Mon Jul 18 16:15:01 2016
New Revision: 418711
URL: https://svnweb.freebsd.org/changeset/ports/418711
Log:
Invoke pytest from within desired python version
When testing a port for a non-default python py.test may fail to find
dependencies for default version because they weren't built e.g.,
$ make test PYTHON_VERSION=python3.5 -C devel/py-apscheduler
[...]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/_pytest/config.py", line 319, in _importconftest
mod = conftestpath.pyimport()
File "/usr/local/lib/python3.5/site-packages/py/_path/local.py", line 650, in pyimport
__import__(modname)
File "/usr/ports/devel/py-apscheduler/work/APScheduler-3.2.0/tests/conftest.py", line 8, in <module>
from apscheduler.job import Job
File "/usr/ports/devel/py-apscheduler/work/APScheduler-3.2.0/apscheduler/job.py", line 4, in <module>
import six
ImportError: No module named 'six'
ERROR: could not load /usr/ports/devel/py-apscheduler/work/APScheduler-3.2.0/tests/conftest.py
Approved by: portmgr blanket
Modified:
head/databases/py-sqlalchemy09/Makefile (contents, props changed)
head/databases/py-sqlalchemy10/Makefile (contents, props changed)
head/devel/py-apscheduler/Makefile (contents, props changed)
head/devel/py-cffi/Makefile (contents, props changed)
head/devel/py-pytest-xdist/Makefile (contents, props changed)
head/sysutils/py-honcho/Makefile (contents, props changed)
head/textproc/py-pyscss/Makefile (contents, props changed)
Modified: head/databases/py-sqlalchemy09/Makefile
==============================================================================
--- head/databases/py-sqlalchemy09/Makefile Mon Jul 18 16:14:45 2016 (r418710)
+++ head/databases/py-sqlalchemy09/Makefile Mon Jul 18 16:15:01 2016 (r418711)
@@ -76,6 +76,6 @@ do-test:
.if ${PYTHON_REL} >= 3000
${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/test
.endif
- @cd ${WRKSRC} && py.test
+ @(cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
.include <bsd.port.post.mk>
Modified: head/databases/py-sqlalchemy10/Makefile
==============================================================================
--- head/databases/py-sqlalchemy10/Makefile Mon Jul 18 16:14:45 2016 (r418710)
+++ head/databases/py-sqlalchemy10/Makefile Mon Jul 18 16:15:01 2016 (r418711)
@@ -76,6 +76,6 @@ do-test:
.if ${PYTHON_REL} >= 3000
${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/test
.endif
- @cd ${WRKSRC} && py.test
+ @(cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
.include <bsd.port.post.mk>
Modified: head/devel/py-apscheduler/Makefile
==============================================================================
--- head/devel/py-apscheduler/Makefile Mon Jul 18 16:14:45 2016 (r418710)
+++ head/devel/py-apscheduler/Makefile Mon Jul 18 16:15:01 2016 (r418711)
@@ -43,6 +43,6 @@ post-patch:
${WRKSRC}/tests/test_schedulers.py
do-test:
- @(cd ${TEST_WRKSRC}; ${SETENV} ${TEST_ENV} py.test)
+ @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
.include <bsd.port.post.mk>
Modified: head/devel/py-cffi/Makefile
==============================================================================
--- head/devel/py-cffi/Makefile Mon Jul 18 16:14:45 2016 (r418710)
+++ head/devel/py-cffi/Makefile Mon Jul 18 16:15:01 2016 (r418711)
@@ -24,7 +24,8 @@ USES= python
USE_PYTHON= autoplist distutils
do-test: patch
- cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} build_ext -i && \
- ${LOCALBASE}/bin/py.test
+ @(cd ${TEST_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \
+ ${PYDISTUTILS_SETUP} build_ext -i)
+ @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
.include <bsd.port.mk>
Modified: head/devel/py-pytest-xdist/Makefile
==============================================================================
--- head/devel/py-pytest-xdist/Makefile Mon Jul 18 16:14:45 2016 (r418710)
+++ head/devel/py-pytest-xdist/Makefile Mon Jul 18 16:15:01 2016 (r418711)
@@ -29,6 +29,6 @@ post-extract:
${RM} -rf ${WRKSRC}/testing/__pycache__
do-test:
- @cd ${WRKSRC} && py.test
+ @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
.include <bsd.port.mk>
Modified: head/sysutils/py-honcho/Makefile
==============================================================================
--- head/sysutils/py-honcho/Makefile Mon Jul 18 16:14:45 2016 (r418710)
+++ head/sysutils/py-honcho/Makefile Mon Jul 18 16:15:01 2016 (r418711)
@@ -22,6 +22,6 @@ USES= python
USE_PYTHON= autoplist distutils
regression-test:
- @cd ${WRKSRC} && py.test
+ @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
.include <bsd.port.mk>
Modified: head/textproc/py-pyscss/Makefile
==============================================================================
--- head/textproc/py-pyscss/Makefile Mon Jul 18 16:14:45 2016 (r418710)
+++ head/textproc/py-pyscss/Makefile Mon Jul 18 16:15:01 2016 (r418711)
@@ -27,6 +27,6 @@ USES= python
USE_PYTHON= distutils autoplist
regression-test: build
- @cd ${WRKSRC} && py.test
+ @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
.include <bsd.port.mk>
More information about the svn-ports-all
mailing list