aboutsummaryrefslogtreecommitdiff
path: root/security/py-txtorcon/Makefile
blob: 1c47679ee150c72bcf8878b97990f80e144e6232 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
PORTNAME=	txtorcon
DISTVERSION=	23.0.0
CATEGORIES=	security python
MASTER_SITES=	PYPI
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Twisted-based Tor controller client
WWW=		https://github.com/meejah/txtorcon

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Automat>0:devel/py-Automat@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}cryptography>0:security/py-cryptography@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}incremental>0:devel/py-incremental@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}twisted>=15.5.0:devel/py-twisted@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}zope.interface>=3.6.1:devel/py-zope.interface@${PY_FLAVOR}

USES=		python shebangfix
USE_PYTHON=	distutils autoplist pytest # 1 test fails, see https://github.com/meejah/txtorcon/issues/376

SHEBANG_FILES=	examples/*.py

NO_ARCH=	yes

OPTIONS_DEFINE=	DOCS EXAMPLES

post-patch:
	@${REINPLACE_CMD} -e " \
		s|'share/txtorcon'|'${DOCSDIR}'| ; \
		s|'share/txtorcon/examples'|'${EXAMPLESDIR}'|" \
		${WRKSRC}/setup.py

post-patch-DOCS-off:
	@${REINPLACE_CMD} -E " \
		s|(.*'${DOCSDIR}'.*)|#\1| ; \
		s|(.*'docs/.*',$$)|#\1| ; \
		s|(.*\+ sphinx_docs.*)|#\1|" \
		${WRKSRC}/setup.py

post-patch-EXAMPLES-off:
	@${REINPLACE_CMD} -E "s|(.*'${EXAMPLESDIR}'.*)|#\1|" ${WRKSRC}/setup.py

.include <bsd.port.mk>