freebsd-ports/devel/py-cffi/Makefile

36 lines
983 B
Makefile

# Created by: William Grzybowski <wg@FreeBSD.org>
# $FreeBSD$
PORTNAME= cffi
PORTVERSION= 1.12.3
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 localbase python
USE_PYTHON= autoplist distutils
.include <bsd.port.pre.mk>
.if ${COMPILER_TYPE} == "clang"
CFLAGS+= -Wno-shift-negative-value
.endif
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_cffi_backend.so
do-test:
@(cd ${TEST_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} build_ext -i)
@(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -rs)
.include <bsd.port.post.mk>