aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authormva <mva@FreeBSD.org>2014-08-19 00:44:14 +0800
committermva <mva@FreeBSD.org>2014-08-19 00:44:14 +0800
commit58582ad3f39820c8238cea0d93b3990b907e6e49 (patch)
tree223545f8d706bf575bbe9147728b13acd0cd06f3 /lang
parent515d5048aa56d4a1c049b999ae019d87b61bd0e2 (diff)
downloadfreebsd-ports-gnome-58582ad3f39820c8238cea0d93b3990b907e6e49.tar.gz
freebsd-ports-gnome-58582ad3f39820c8238cea0d93b3990b907e6e49.tar.zst
freebsd-ports-gnome-58582ad3f39820c8238cea0d93b3990b907e6e49.zip
A selection of supplementary tools for the Python language, which ship with
the Python default distribution. Phabric: D561 Reviewed by: antoine, koobs With hat: python@
Diffstat (limited to 'lang')
-rw-r--r--lang/Makefile1
-rw-r--r--lang/python-tools/Makefile63
-rw-r--r--lang/python-tools/pkg-descr2
3 files changed, 66 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile
index 211182091c32..2cd9450e1513 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -259,6 +259,7 @@
SUBDIR += python-doc-pdf-letter
SUBDIR += python-doc-text
SUBDIR += python-mode.el
+ SUBDIR += python-tools
SUBDIR += python2
SUBDIR += python27
SUBDIR += python3
diff --git a/lang/python-tools/Makefile b/lang/python-tools/Makefile
new file mode 100644
index 000000000000..2952f0c77b82
--- /dev/null
+++ b/lang/python-tools/Makefile
@@ -0,0 +1,63 @@
+# $FreeBSD$
+
+PORTNAME= python-tools
+PORTVERSION= ${PYTHON_PORTVERSION}
+CATEGORIES= lang python devel
+MASTER_SITES= PYTHON
+MASTER_SITE_SUBDIR= ftp/python/${PORTVERSION}
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= Python-${PORTVERSION}
+
+MAINTAINER= python@FreeBSD.org
+COMMENT= Supplementary tools for the Python language
+
+LICENSE= PSFL
+
+PORTSCOUT= ignore:1
+
+USES= python shebangfix tar:xz uniquefiles
+NO_BUILD= yes
+
+DIST_SUBDIR= python
+DISTINFO_FILE= ${PORTSDIR}/lang/python${PYTHON_SUFFIX}/distinfo
+WRKSRC= ${WRKDIR}/Python-${PORTVERSION}/Tools/scripts
+
+SCRIPT_FILES= byteyears checkpyc copytime crlf dutree \
+ ftpmirror lfcr ptags untabify
+PYLIB_FILES= tabnanny timeit
+PLIST_FILES= ${SCRIPT_FILES:C/^.*/bin\/&/g} ${PYLIB_FILES:C/^.*/bin\/&/g}
+
+SHEBANG_LANG= python
+SHEBANG_FILES= ${SCRIPT_FILES:C/^.*/&\.py/g} \
+ ../../Lib/tabnanny.py ../../Lib/timeit.py
+python_CMD= ${PYTHON_CMD}
+
+UNIQUE_SUFFIX= -${PYTHON_VER}
+UNIQUE_SUFFIX_FILES= ${SCRIPT_FILES:C/^.*/bin\/&/g} \
+ ${PYLIB_FILES:C/^.*/bin\/&/g}
+
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} < 320
+SCRIPT_FILES+= logmerge
+python_OLD_CMD= /usr/bin/env python
+.else
+# Python 3+ uses python3 as shebang line, python2 just python
+python_OLD_CMD= /usr/bin/env python3
+.endif
+
+.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION}
+UNIQUE_DEFAULT_LINKS= yes
+.endif
+
+do-install:
+.for fname in ${SCRIPT_FILES}
+ ${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/${fname}.py \
+ ${STAGEDIR}${PREFIX}/bin/${fname}
+.endfor
+.for fname in ${PYLIB_FILES}
+ ${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/../../Lib/${fname}.py \
+ ${STAGEDIR}${PREFIX}/bin/${fname}
+.endfor
+
+.include <bsd.port.post.mk>
diff --git a/lang/python-tools/pkg-descr b/lang/python-tools/pkg-descr
new file mode 100644
index 000000000000..0bca9a78fdad
--- /dev/null
+++ b/lang/python-tools/pkg-descr
@@ -0,0 +1,2 @@
+A selection of supplementary tools for the Python language, which ship with
+the Python default distribution.