pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/iso-codes Relax python2.7 restriction by appl...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cadb6f322773
branches:  trunk
changeset: 350372:cadb6f322773
user:      richard <richard%pkgsrc.org@localhost>
date:      Tue Jul 26 13:37:28 2016 +0000

description:
Relax python2.7 restriction by applying some 3to2 rules involving unicode/UTF-8

diffstat:

 textproc/iso-codes/Makefile                             |   4 +-
 textproc/iso-codes/distinfo                             |   3 +-
 textproc/iso-codes/patches/patch-bin_xml__from__json.py |  25 +++++++++++++++++
 3 files changed, 29 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r aab3b4b1a804 -r cadb6f322773 textproc/iso-codes/Makefile
--- a/textproc/iso-codes/Makefile       Tue Jul 26 12:54:39 2016 +0000
+++ b/textproc/iso-codes/Makefile       Tue Jul 26 13:37:28 2016 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.51 2016/05/22 17:46:26 wiz Exp $
+# $NetBSD: Makefile,v 1.52 2016/07/26 13:37:28 richard Exp $
 
 DISTNAME=      iso-codes-3.68
+PKGREVISION=   1
 CATEGORIES=    textproc
 MASTER_SITES=  https://pkg-isocodes.alioth.debian.org/downloads/
 EXTRACT_SUFX=  .tar.xz
@@ -40,7 +41,6 @@
 SUBST_MESSAGE.python3= Fixing path to python binary.
 
 PYTHON_FOR_BUILD_ONLY=         yes
-PYTHON_VERSIONS_INCOMPATIBLE=  27
 
 .include "../../lang/python/application.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r aab3b4b1a804 -r cadb6f322773 textproc/iso-codes/distinfo
--- a/textproc/iso-codes/distinfo       Tue Jul 26 12:54:39 2016 +0000
+++ b/textproc/iso-codes/distinfo       Tue Jul 26 13:37:28 2016 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.38 2016/05/22 17:46:26 wiz Exp $
+$NetBSD: distinfo,v 1.39 2016/07/26 13:37:28 richard Exp $
 
 SHA1 (iso-codes-3.68.tar.xz) = 9cd62cf471b7a269c86fb8e97d63b1e53fbc166c
 RMD160 (iso-codes-3.68.tar.xz) = ba8132da679ef55c26934c377b29885b69c4be12
 SHA512 (iso-codes-3.68.tar.xz) = 77abd3437fe66635cf52dbe065def9ff229a4bce20eb1167ccc825c934db57b4acc8112f99bdca6313324d850549cd9ead7556e0540c2b4e80cad9715613cec2
 Size (iso-codes-3.68.tar.xz) = 3448584 bytes
+SHA1 (patch-bin_xml__from__json.py) = 39fc944725377362faa3b39d03e164c7d57f1497
diff -r aab3b4b1a804 -r cadb6f322773 textproc/iso-codes/patches/patch-bin_xml__from__json.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/iso-codes/patches/patch-bin_xml__from__json.py   Tue Jul 26 13:37:28 2016 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-bin_xml__from__json.py,v 1.1 2016/07/26 13:37:28 richard Exp $
+
+Allow support for python2.7 by enforcing unicode literals and importing
+from io a compatible version of open().
+
+--- bin/xml_from_json.py.orig  2016-05-02 07:00:45.000000000 +0000
++++ bin/xml_from_json.py
+@@ -1,4 +1,5 @@
+ #!/usr/bin/env python3
++# -*- coding: utf-8 -*-
+ #
+ # Create deprecated iso-codes XML from JSON
+ #
+@@ -18,8 +19,11 @@
+ # License along with this program; if not, write to the Free Software
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ 
++from __future__ import unicode_literals
+ import json
+ import sys
++if sys.version_info[0:2] == (2, 7):
++    from io import open
+ 
+ # Get the current ISO code domain, the path to the JSON data dir, and the XML output file
+ if len(sys.argv) != 4:



Home | Main Index | Thread Index | Old Index