aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2016-09-28 01:49:37 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2016-09-28 01:49:37 +0800
commit3a76199160267577efffa859b0be5d9f9fa38047 (patch)
treed1cb12712d7b815ff8196f10f4bf189aaed0f999 /devel
parentc620426ced2949cd6a5955f36f7bf60587123d42 (diff)
downloadfreebsd-ports-gnome-3a76199160267577efffa859b0be5d9f9fa38047.tar.gz
freebsd-ports-gnome-3a76199160267577efffa859b0be5d9f9fa38047.tar.zst
freebsd-ports-gnome-3a76199160267577efffa859b0be5d9f9fa38047.zip
devel/py-yaml:
- Add LICENSE_FILE - Switch to options helpers - Strip library - Add support for tests Add devel/py3-yaml python3 counterpart of this port PR: 212692 Submitted by: amdmi3 Approved by: maintainer timeout (jpaetzel, 2 weeks)
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"