# Created by: William Grzybowski PORTNAME= cffi PORTVERSION= 1.15.0 CATEGORIES= devel python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= sunpoet@FreeBSD.org COMMENT= Foreign Function Interface for Python calling C code LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libffi.so:devel/libffi RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycparser>=0:devel/py-pycparser@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} USES= compiler:c11 localbase python:3.6+ USE_PYTHON= autoplist concurrent distutils .include .if ${CHOSEN_COMPILER_TYPE} == clang CFLAGS+= -Wno-shift-negative-value .endif post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + do-test: cd ${WRKSRC} && ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${PYTHON_CMD} -m pytest -rs -v .include