1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-11 07:22:22 +00:00
freebsd-ports/devel/py-yaml/Makefile
2018-07-09 15:21:31 +00:00

48 lines
1.1 KiB
Makefile

# Created by: ijliao@FreeBSD.org
# $FreeBSD$
PORTNAME= yaml
PORTVERSION= 3.13
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= PyYAML-${PORTVERSION}
MAINTAINER= jpaetzel@FreeBSD.org
COMMENT= Python YAML parser
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
OPTIONS_DEFINE= LIBYAML EXAMPLES
LIBYAML_DESC= Use textproc/libyaml for faster parsing
USES= python
USE_PYTHON= distutils autoplist
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MLIBYAML}
PYDISTUTILS_SETUP+= --with-libyaml
PYDISTUTILS_BUILD_TARGET= build_ext
PYDISTUTILS_BUILDARGS+= --include-dirs=${LOCALBASE}/include \
--library-dirs=${LOCALBASE}/lib
LIB_DEPENDS+= libyaml.so:textproc/libyaml
post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_yaml.so
.else
PYDISTUTILS_SETUP+= --without-libyaml
NO_ARCH= yes
.endif
post-install-EXAMPLES-on:
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/)
do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
.include <bsd.port.post.mk>