Makefile 2.58 KB
Newer Older
1
2
3
# $FreeBSD$

PORTNAME=	molecule
matthew's avatar
matthew committed
4
PORTVERSION=	2.20.1
5
6
7
8
9
10
11
12
13
14
15
CATEGORIES=	devel python
MASTER_SITES=	CHEESESHOP
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	matthew@FreeBSD.org
COMMENT=	Aid for the development and testing of Ansible roles

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pbr>0:devel/py-pbr@${PY_FLAVOR}
matthew's avatar
matthew committed
16
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}ansible-lint>=4.0.2:sysutils/py-ansible-lint@${PY_FLAVOR} \
17
18
19
20
21
22
23
24
25
26
27
28
29
		${PYTHON_PKGNAMEPREFIX}anyconfig>=0.9.7:devel/py-anyconfig@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}Cerberus>=1.2:devel/py-cerberus@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}click>=6.7:devel/py-click@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}click-completion>=0.3.1:devel/py-click-completion@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}colorama>=0.3.9:devel/py-colorama@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}cookiecutter>=1.6.0:devel/py-cookiecutter@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}python-gilt>=1.2.1:devel/py-python-gilt@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}Jinja2>=2.10:devel/py-Jinja2@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pbr>0:devel/py-pbr@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}yaml>=3.13:devel/py-yaml@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}sh>=1.12.14:devel/py-sh@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}six>=1.11.0:devel/py-six@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}tabulate>=0.8.2:devel/py-tabulate@${PY_FLAVOR} \
matthew's avatar
matthew committed
30
		${PYTHON_PKGNAMEPREFIX}testinfra>=1.19.0:devel/py-testinfra@${PY_FLAVOR} \
31
		${PYTHON_PKGNAMEPREFIX}tree-format>=0.1.2:devel/py-tree-format@${PY_FLAVOR} \
32
		${PY_TYPING} \
33
		${PYTHON_PKGNAMEPREFIX}yamllint>=1.11.1:devel/py-yamllint@${PY_FLAVOR} \
matthew's avatar
matthew committed
34
		${PYTHON_PKGNAMEPREFIX}pexpect>=4.6.0:misc/py-pexpect@${PY_FLAVOR}
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=3.0.7:devel/py-pytest@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pytest-helpers-namespace>0:devel/py-pytest-helpers-namespace@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pytest-mock>0:devel/py-pytest-mock@${PY_FLAVOR}

USES=		python
USE_PYTHON=	autoplist concurrent distutils

NO_ARCH=	yes

# Note: we're only running the unit tests here.  Upstream acknowledges
# that functional tests are still a work in progress.
#
# Test failures. Only three tests fail:
#  test/unit/test_util.py ......FFF.......................   [ 23%]
#
# The click module demands a UTF-8 locale when used with python-3.x
TEST_ENV=	LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8

53
54
55
.include <bsd.port.pre.mk>

.if ${PYTHON_REL} < 3500
56
RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}functools32>=0:devel/py-functools32@${PY_FLAVOR}
57
58
.endif

59
60
61
do-test:
	@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)

62
.include <bsd.port.post.mk>