diff options
author | wg <wg@FreeBSD.org> | 2015-11-10 23:28:15 +0800 |
---|---|---|
committer | wg <wg@FreeBSD.org> | 2015-11-10 23:28:15 +0800 |
commit | 9b66e3d236943f2187a3f8789f051934e2160479 (patch) | |
tree | 6695f9378b82cdc1ad980b2ba56826fc1e0c960d /devel/py-columnize | |
parent | 68f1e3e0be6845dedf6d1ebcb2201bcdec18d274 (diff) | |
download | freebsd-ports-gnome-9b66e3d236943f2187a3f8789f051934e2160479.tar.gz freebsd-ports-gnome-9b66e3d236943f2187a3f8789f051934e2160479.tar.zst freebsd-ports-gnome-9b66e3d236943f2187a3f8789f051934e2160479.zip |
devel/py-columnize? add python 3 support
Approved by: maintainer (via email)
Diffstat (limited to 'devel/py-columnize')
-rw-r--r-- | devel/py-columnize/Makefile | 11 | ||||
-rw-r--r-- | devel/py-columnize/files/extra-patch-____pkginfo____.py | 11 |
2 files changed, 20 insertions, 2 deletions
diff --git a/devel/py-columnize/Makefile b/devel/py-columnize/Makefile index e9fa4f946f9c..1bd1bbba36f7 100644 --- a/devel/py-columnize/Makefile +++ b/devel/py-columnize/Makefile @@ -12,7 +12,6 @@ COMMENT= Format a simple (i.e. not nested) list into aligned columns LICENSE= MIT MY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>=1.0:${PORTSDIR}/devel/py-nose -MY_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}backports.shutil_get_terminal_size=1.0:${PORTSDIR}/devel/py-backports.shutil_get_terminal_size BUILD_DEPENDS= ${MY_DEPENDS} RUN_DEPENDS= ${MY_DEPENDS} @@ -20,4 +19,12 @@ RUN_DEPENDS= ${MY_DEPENDS} USES= python USE_PYTHON= autoplist distutils -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +.if ${PYTHON_MAJOR_VER} == "3" +EXTRA_PATCHES= ${FILESDIR}/extra-patch-____pkginfo____.py +.else +MY_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}backports.shutil_get_terminal_size=1.0:${PORTSDIR}/devel/py-backports.shutil_get_terminal_size +.endif + +.include <bsd.port.post.mk> diff --git a/devel/py-columnize/files/extra-patch-____pkginfo____.py b/devel/py-columnize/files/extra-patch-____pkginfo____.py new file mode 100644 index 000000000000..83b00ee7a85d --- /dev/null +++ b/devel/py-columnize/files/extra-patch-____pkginfo____.py @@ -0,0 +1,11 @@ +--- __pkginfo__.py.orig 2015-10-27 08:06:17 UTC ++++ __pkginfo__.py +@@ -28,7 +28,7 @@ web = 'https://github.com/rocky/pycolumn + zip_safe = False + + def read(*rnames): +- return open(os.path.join(os.path.dirname(__file__), *rnames)).read() ++ return open(os.path.join(os.path.dirname(__file__), *rnames), encoding='utf8').read() + + readme = 'README.txt' + if os.path.exists('README.rst'): readme = 'README.rst' |