diff options
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' |