aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-yaml/Makefile19
-rw-r--r--devel/py3-yaml/Makefile7
3 files changed, 21 insertions, 6 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 080b5fb88570..ea4906689113 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4690,6 +4690,7 @@
SUBDIR += py3-threema-msgapi
SUBDIR += py3-vcversioner
SUBDIR += py3-xdg
+ SUBDIR += py3-yaml
SUBDIR += py_static_check
SUBDIR += pybugz
SUBDIR += pychecker
diff --git a/devel/py-yaml/Makefile b/devel/py-yaml/Makefile
index c642be0dcb76..58f71b18d6f5 100644
--- a/devel/py-yaml/Makefile
+++ b/devel/py-yaml/Makefile
@@ -3,6 +3,7 @@
PORTNAME= yaml
PORTVERSION= 3.11
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,30 +13,36 @@ 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
+USES?= python
USE_PYTHON= distutils autoplist
EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME}
.include <bsd.port.pre.mk>
-.if ${PORT_OPTIONS:MEXAMPLES}
-post-install:
- @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/)
-.endif
-
.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>
diff --git a/devel/py3-yaml/Makefile b/devel/py3-yaml/Makefile
new file mode 100644
index 000000000000..d17d55a12059
--- /dev/null
+++ b/devel/py3-yaml/Makefile
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+MASTERDIR= ${.CURDIR}/../py-yaml
+
+USES= python:3.1+
+
+.include "${MASTERDIR}/Makefile"