1PORTNAME=	cryptography
2PORTVERSION=	3.4.8
3PORTREVISION=	1
4PORTEPOCH=	1
5CATEGORIES=	security python
6MASTER_SITES=	PYPI
7PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8PKGNAMESUFFIX=	-legacy
9
10MAINTAINER=	ports@MidnightBSD.org
11COMMENT=	Cryptographic recipes and primitives for Python developers
12WWW=		https://github.com/pyca/cryptography
13
14LICENSE=	Apache-2.0 bsd3
15LICENSE_COMB=	dual
16LICENSE_FILE_apache2=	${WRKSRC}/LICENSE.APACHE
17LICENSE_FILE_bsd3=${WRKSRC}/LICENSE.BSD
18
19# 16 failed on magus, env related
20NO_TEST=	yes
21
22BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.12:devel/py-cffi@${PY_FLAVOR} \
23		${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
24		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
25RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cffi>=1.12:devel/py-cffi@${PY_FLAVOR}
26TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cryptography-vectors>=${PORTVERSION}:security/py-cryptography-vectors@${PY_FLAVOR} \
27		${PYTHON_PKGNAMEPREFIX}hypothesis>=1.11.4:devel/py-hypothesis@${PY_FLAVOR} \
28		${PYTHON_PKGNAMEPREFIX}iso8601>=0:devel/py-iso8601@${PY_FLAVOR} \
29		${PYTHON_PKGNAMEPREFIX}pretend>=0:devel/py-pretend@${PY_FLAVOR} \
30		${PYTHON_PKGNAMEPREFIX}pytest-cov>=0:devel/py-pytest-cov@${PY_FLAVOR} \
31		${PYTHON_PKGNAMEPREFIX}pytest-subtests>=0:devel/py-pytest-subtests@${PY_FLAVOR} \
32		${PYTHON_PKGNAMEPREFIX}pytest-xdist>=0,1:devel/py-pytest-xdist@${PY_FLAVOR} \
33		${PYTHON_PKGNAMEPREFIX}pytz>=0,1:devel/py-pytz@${PY_FLAVOR} \
34		${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR}
35
36USES=		compiler:env cpe python ssl
37USE_PYTHON=	autoplist concurrent pep517 pytest
38
39CFLAGS+=	-I${OPENSSLINC}
40LDFLAGS+=	-L${OPENSSLLIB}
41MAKE_ENV=	CRYPTOGRAPHY_DONT_BUILD_RUST=1
42TEST_ENV=	PYTHONPATH=${PYTHON_SITELIBDIR}
43
44CPE_VENDOR=	cryptography_project
45
46post-install:
47	${FIND} ${FAKE_DESTDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
48
49.include <bsd.port.mk>
50