Some ports may wish to use Python for their testing suite but otherwise do not need it at all (ie, not for build or run). This patch adds support for the test argument to be used in the USES clause, such as python:3.2+,test. This enables the relevant Python environment and modifies TEST_DEPENDS as necessary.
Details
Details
For non-Python ports that use Python as their testing suite, add python:VER,test as required to the USES clause and observe output.
An example of this in use (as requested by koobs):
# Created by: Gea-Suan Lin <gslin@gslin.org> # $FreeBSD: head/sysutils/fusefs-unionfs/Makefile 380917 2015-03-10 14:15:55Z amdmi3 $ PORTNAME= unionfs PORTVERSION= 1.0 DISTVERSIONPREFIX= v CATEGORIES= sysutils PKGNAMEPREFIX= fusefs- MAINTAINER= brendan+freebsd@bbqsrc.net COMMENT= FUSE based implementation of the well-known unionfs LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE USE_GITHUB= yes GH_ACCOUNT= rpodgorny GH_PROJECT= unionfs-fuse PLIST_FILES= bin/unionfs \ bin/unionfsctl \ man/man8/unionfs.8.gz USES= python:3.2+,test fuse cmake localbase post-patch: @${REINPLACE_CMD} "s,share/man,man,g" ${WRKSRC}/man/CMakeLists.txt do-test: @cd ${WRKSRC} && ${PYTHON_CMD} test.py post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/* .include <bsd.port.mk>
Diff Detail
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Mk/Uses/python.mk | ||
---|---|---|
473 | This can go (be removed) in favour of the (test) dependent port adding setuptools to its TEST_DEPENDS manually if it explicitly requires it, or another Python package |
Comment Actions
I'm +1 on this feature, and I know many software packages use python for running their tests
I don't have the chops to review the change semantically.
Comment Actions
I need this for deskutils/taskwarrior, which depends on any version of Python for its tests