summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2020-05-31 20:49:32 +0000
committerjoerg <joerg@pkgsrc.org>2020-05-31 20:49:32 +0000
commit3a12f273afbd3bb33cb31b8be3a0fd7ede82c05e (patch)
treee0bc14018181a75968f2f01ae058c9afa1ca87b9
parent6c32e5f95c513f5d2207a302c9f0738f5978d8b8 (diff)
downloadpkgsrc-3a12f273afbd3bb33cb31b8be3a0fd7ede82c05e.tar.gz
Explicitly read files as unicode for Python 3. The content is converted
using the system locale with Python 3.6 otherwise, falling back to ASCII.
-rw-r--r--cad/py-gds/distinfo3
-rw-r--r--cad/py-gds/patches/patch-setup.py13
-rw-r--r--converters/py-unicode-slugify/distinfo3
-rw-r--r--converters/py-unicode-slugify/patches/patch-setup.py17
-rw-r--r--devel/py-test-testmon/distinfo3
-rw-r--r--devel/py-test-testmon/patches/patch-setup.py16
-rw-r--r--devel/py-test-testmon/patches/patch-setup.py.orig0
-rw-r--r--math/py-ephem/distinfo3
-rw-r--r--math/py-ephem/patches/patch-setup.py15
-rw-r--r--math/z3/distinfo5
-rw-r--r--math/z3/patches/patch-scripts_mk__genfile__common.py44
-rw-r--r--math/z3/patches/patch-scripts_mk__util.py20
-rw-r--r--textproc/py-xmlschema/distinfo3
-rw-r--r--textproc/py-xmlschema/patches/patch-setup.py19
14 files changed, 152 insertions, 12 deletions
diff --git a/cad/py-gds/distinfo b/cad/py-gds/distinfo
index 40f73aa5c71..b8246b67299 100644
--- a/cad/py-gds/distinfo
+++ b/cad/py-gds/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.9 2020/04/27 18:50:26 adam Exp $
+$NetBSD: distinfo,v 1.10 2020/05/31 20:49:32 joerg Exp $
SHA1 (gdspy-1.5.2.zip) = 97a0f614aee05b79dbcec42740670c98e4980eaa
RMD160 (gdspy-1.5.2.zip) = d2fcfada1ee830fa9a63c690418935c6b6703ca4
SHA512 (gdspy-1.5.2.zip) = 33fb48da4a9ed9e789d9da41e8428c859c66f39d50a2edf88cbe41f9396d210e5b7f41b5446814f0f52ef51368a5fb689a96cdc3b71d93ba03bfc83fb9306cb0
Size (gdspy-1.5.2.zip) = 7128099 bytes
+SHA1 (patch-setup.py) = 9cd9fe70eff8346a03f758cf3c72d94e02ed50bf
diff --git a/cad/py-gds/patches/patch-setup.py b/cad/py-gds/patches/patch-setup.py
new file mode 100644
index 00000000000..fc0434c40d9
--- /dev/null
+++ b/cad/py-gds/patches/patch-setup.py
@@ -0,0 +1,13 @@
+$NetBSD: patch-setup.py,v 1.1 2020/05/31 20:49:33 joerg Exp $
+
+--- setup.py.orig 2020-05-31 17:53:41.141364832 +0000
++++ setup.py
+@@ -12,7 +12,7 @@ import platform
+ from setuptools import setup, Extension
+ from distutils.version import LooseVersion
+
+-with open("README.md") as fin:
++with open("README.md", **({'encoding': 'UTF-8'} if sys.version_info.major>=3 else {})) as fin:
+ long_description = fin.read()
+
+ with open("gdspy/__init__.py") as fin:
diff --git a/converters/py-unicode-slugify/distinfo b/converters/py-unicode-slugify/distinfo
index 581615abe2f..e8914ea76cc 100644
--- a/converters/py-unicode-slugify/distinfo
+++ b/converters/py-unicode-slugify/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2020/05/01 17:50:59 nia Exp $
+$NetBSD: distinfo,v 1.2 2020/05/31 20:49:33 joerg Exp $
SHA1 (unicode-slugify-0.1.3.tar.gz) = 077cfd0c226f6b2cab3c84b340cd9693ce9939fc
RMD160 (unicode-slugify-0.1.3.tar.gz) = 16fbfb4614658bb4fb2217484ebece362d140e0d
SHA512 (unicode-slugify-0.1.3.tar.gz) = 509414c8b3603f3b092390ee29f52b6a22de45d904fcfa5554f2c1188a35ac090781050642b0b7bf068d1b30ce424342878e646db98b592712f47595528911a1
Size (unicode-slugify-0.1.3.tar.gz) = 4430 bytes
+SHA1 (patch-setup.py) = 3a7d378b2d2881e533b5e04688d60ab2d2853b52
diff --git a/converters/py-unicode-slugify/patches/patch-setup.py b/converters/py-unicode-slugify/patches/patch-setup.py
new file mode 100644
index 00000000000..9d7a157faa4
--- /dev/null
+++ b/converters/py-unicode-slugify/patches/patch-setup.py
@@ -0,0 +1,17 @@
+$NetBSD: patch-setup.py,v 1.1 2020/05/31 20:49:33 joerg Exp $
+
+--- setup.py.orig 2020-05-31 18:05:52.507238288 +0000
++++ setup.py
+@@ -1,10 +1,11 @@
++import sys
+ from setuptools import setup
+
+ setup(
+ name='unicode-slugify',
+ version='0.1.3',
+ description='A slug generator that turns strings into unicode slugs.',
+- long_description=open('README.md').read(),
++ long_description=open('README.md', **({'encoding': 'UTF-8'} if sys.version_info.major>=3 else {})).read(),
+ author='Jeff Balogh, Dave Dash',
+ author_email='jbalogh@mozilla.com, dd@mozilla.com',
+ url='http://github.com/mozilla/unicode-slugify',
diff --git a/devel/py-test-testmon/distinfo b/devel/py-test-testmon/distinfo
index c57713a59e5..d5995948e4e 100644
--- a/devel/py-test-testmon/distinfo
+++ b/devel/py-test-testmon/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.8 2019/10/25 09:45:35 adam Exp $
+$NetBSD: distinfo,v 1.9 2020/05/31 20:49:33 joerg Exp $
SHA1 (pytest-testmon-0.9.19.tar.gz) = 2277b15050d84cfc64f7c019477dd917e1be54b9
RMD160 (pytest-testmon-0.9.19.tar.gz) = 980ee9c0b344200f1d93b631da0cfa58781674c3
SHA512 (pytest-testmon-0.9.19.tar.gz) = 28e5f75265373f5e65d45fc3a26e7926e6095265befa9ba61acfc8a230f5350738074ef11f35c462ba97d08c15a8fbf008e49483f6c9c2b9ab64fe324db94db2
Size (pytest-testmon-0.9.19.tar.gz) = 26805 bytes
+SHA1 (patch-setup.py) = 1c10d0a3ba21e3a1aa6504f52b46cd916c4bc334
diff --git a/devel/py-test-testmon/patches/patch-setup.py b/devel/py-test-testmon/patches/patch-setup.py
new file mode 100644
index 00000000000..2e421bd4f27
--- /dev/null
+++ b/devel/py-test-testmon/patches/patch-setup.py
@@ -0,0 +1,16 @@
+$NetBSD: patch-setup.py,v 1.1 2020/05/31 20:49:33 joerg Exp $
+
+--- setup.py.orig 2020-05-31 17:59:09.409031695 +0000
++++ setup.py
+@@ -1,9 +1,10 @@
++import sys
+ from setuptools import setup
+
+ setup(
+ name='pytest-testmon',
+ description='find bugs 10x faster',
+- long_description=''.join(open('README.rst').readlines()),
++ long_description=''.join(open('README.rst', **({'encoding': 'UTF-8'} if sys.version_info.major>=3 else {})).readlines()),
+ version='0.9.19',
+ license='MIT',
+ platforms=['linux', 'osx', 'win32'],
diff --git a/devel/py-test-testmon/patches/patch-setup.py.orig b/devel/py-test-testmon/patches/patch-setup.py.orig
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/devel/py-test-testmon/patches/patch-setup.py.orig
diff --git a/math/py-ephem/distinfo b/math/py-ephem/distinfo
index b562178047b..6c265042d36 100644
--- a/math/py-ephem/distinfo
+++ b/math/py-ephem/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.8 2020/05/13 14:53:29 adam Exp $
+$NetBSD: distinfo,v 1.9 2020/05/31 20:49:33 joerg Exp $
SHA1 (ephem-3.7.7.1.tar.gz) = 9928fb8f0e1a13ae627cdd86cb4ecc2bbeeb6edd
RMD160 (ephem-3.7.7.1.tar.gz) = 2b6a4bb41d51697f17f3a1bdafe1a1dbee17c846
SHA512 (ephem-3.7.7.1.tar.gz) = c3f489371febcb65da03da7ba0e08168320a6f5d81fd2355281f621074ecf2be694b2d0cc3ef7863cec617176751a34856bdd22beb66cd64129fbfb915b3dcae
Size (ephem-3.7.7.1.tar.gz) = 745839 bytes
+SHA1 (patch-setup.py) = ca5c99e7f1a4cf90e53b7d34f63d91210f9e0acf
diff --git a/math/py-ephem/patches/patch-setup.py b/math/py-ephem/patches/patch-setup.py
new file mode 100644
index 00000000000..9cc72b109ee
--- /dev/null
+++ b/math/py-ephem/patches/patch-setup.py
@@ -0,0 +1,15 @@
+$NetBSD: patch-setup.py,v 1.1 2020/05/31 20:49:33 joerg Exp $
+
+Python 3.6 doesn't default to UTF-8, but still tries to convert to Unicode.
+
+--- setup.py.orig 2020-05-31 17:37:01.440042910 +0000
++++ setup.py
+@@ -24,7 +24,7 @@ libastro_files = glob('libastro-%s/*.c'
+ libastro_data = glob('extensions/data/*.c')
+
+ def read(*filenames):
+- return open(os.path.join(os.path.dirname(__file__), *filenames)).read()
++ return open(os.path.join(os.path.dirname(__file__), *filenames), **({'encoding': 'UTF-8'} if sys.version_info.major >= 3 else {})).read()
+
+ extensions = [
+ Extension('ephem._libastro',
diff --git a/math/z3/distinfo b/math/z3/distinfo
index 302345a9410..5b60225360d 100644
--- a/math/z3/distinfo
+++ b/math/z3/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.8 2018/12/18 06:46:39 kamil Exp $
+$NetBSD: distinfo,v 1.9 2020/05/31 20:49:33 joerg Exp $
SHA1 (z3-4.8.3.tar.gz) = bc713372c9be6808306a8e0844caf27c0a10ee2c
RMD160 (z3-4.8.3.tar.gz) = 3b8bc18719725c0d110ca52f7e692519cbac341e
SHA512 (z3-4.8.3.tar.gz) = 34a2dca0083ed469fdaf5ac062dda26248633245607ddd9ef90629c5f76ae30f87bfa4191c04ba9be7a617bf182a1bd00b59fd2274699e12ece69b86088c8044
Size (z3-4.8.3.tar.gz) = 4119116 bytes
-SHA1 (patch-scripts_mk__util.py) = 59c17bbcd05be21089a89ae304662b69bd2a571d
+SHA1 (patch-scripts_mk__genfile__common.py) = ecedf747f4a5b4cb410898a6cb65eed2aad46d27
+SHA1 (patch-scripts_mk__util.py) = 79106c08ce39901d13eaab5a18173fcb0479dc96
diff --git a/math/z3/patches/patch-scripts_mk__genfile__common.py b/math/z3/patches/patch-scripts_mk__genfile__common.py
new file mode 100644
index 00000000000..ece04ec0e1e
--- /dev/null
+++ b/math/z3/patches/patch-scripts_mk__genfile__common.py
@@ -0,0 +1,44 @@
+$NetBSD: patch-scripts_mk__genfile__common.py,v 1.1 2020/05/31 20:49:34 joerg Exp $
+
+--- scripts/mk_genfile_common.py.orig 2018-11-19 20:21:17.000000000 +0000
++++ scripts/mk_genfile_common.py
+@@ -622,7 +622,8 @@ def mk_gparams_register_modules_internal
+ reg_mod_descr_pat = re.compile('[ \t]*REG_MODULE_DESCRIPTION\(\'([^\']*)\', *\'([^\']*)\'\)')
+ for h_file in sorted_headers_by_component(h_files_full_path):
+ added_include = False
+- with open(h_file, 'r') as fin:
++ py3args = { 'encoding': 'UTF-8' } if sys.version_info.major >= 3 else {}
++ with open(h_file, 'r', **py3args) as fin:
+ for line in fin:
+ m = reg_pat.match(line)
+ if m:
+@@ -696,7 +697,8 @@ def mk_install_tactic_cpp_internal(h_fil
+ for h_file in sorted_headers_by_component(h_files_full_path):
+ added_include = False
+ try:
+- with open(h_file, 'r') as fin:
++ py3args = { 'encoding': 'UTF-8' } if sys.version_info.major >= 3 else {}
++ with open(h_file, 'r', **py3args) as fin:
+ for line in fin:
+ if tactic_pat.match(line):
+ if not added_include:
+@@ -764,7 +766,8 @@ def mk_mem_initializer_cpp_internal(h_fi
+ finalizer_pat = re.compile('[ \t]*ADD_FINALIZER\(\'([^\']*)\'\)')
+ for h_file in sorted_headers_by_component(h_files_full_path):
+ added_include = False
+- with open(h_file, 'r') as fin:
++ py3args = { 'encoding': 'UTF-8' } if sys.version_info.major >= 3 else {}
++ with open(h_file, 'r', **py3args) as fin:
+ for line in fin:
+ m = initializer_pat.match(line)
+ if m:
+@@ -806,7 +809,8 @@ def mk_pat_db_internal(inputFilePath, ou
+ """
+ Generate ``g_pattern_database[]`` declaration header file.
+ """
+- with open(inputFilePath, 'r') as fin:
++ py3args = { 'encoding': 'UTF-8' } if sys.version_info.major >= 3 else {}
++ with open(inputFilePath, 'r', **py3args) as fin:
+ with open(outputFilePath, 'w') as fout:
+ fout.write('static char const g_pattern_database[] =\n')
+ for line in fin:
diff --git a/math/z3/patches/patch-scripts_mk__util.py b/math/z3/patches/patch-scripts_mk__util.py
index 67c64545952..5d567969de9 100644
--- a/math/z3/patches/patch-scripts_mk__util.py
+++ b/math/z3/patches/patch-scripts_mk__util.py
@@ -1,8 +1,18 @@
-$NetBSD: patch-scripts_mk__util.py,v 1.5 2018/12/18 06:46:39 kamil Exp $
+$NetBSD: patch-scripts_mk__util.py,v 1.6 2020/05/31 20:49:34 joerg Exp $
---- scripts/mk_util.py.orig 2018-12-15 09:28:53.381588998 +0000
+--- scripts/mk_util.py.orig 2018-11-19 20:21:17.000000000 +0000
+++ scripts/mk_util.py
-@@ -2001,7 +2001,7 @@ class JavaDLLComponent(Component):
+@@ -803,7 +803,8 @@ def extract_c_includes(fname):
+ # We should generate and error for any occurrence of #include that does not match the previous pattern.
+ non_std_inc_pat = re.compile(".*#include.*")
+
+- f = open(fname, 'r')
++ py3args = { 'encoding': 'UTF-8' } if sys.version_info.major >= 3 else {}
++ f = open(fname, 'r', **py3args)
+ linenum = 1
+ for line in f:
+ m1 = std_inc_pat.match(line)
+@@ -2001,7 +2002,7 @@ class JavaDLLComponent(Component):
out.write('\t$(SLINK) $(SLINK_OUT_FLAG)libz3java$(SO_EXT) $(SLINK_FLAGS) %s$(OBJ_EXT) libz3$(LIB_EXT)\n' %
os.path.join('api', 'java', 'Native'))
else:
@@ -11,7 +21,7 @@ $NetBSD: patch-scripts_mk__util.py,v 1.5 2018/12/18 06:46:39 kamil Exp $
os.path.join('api', 'java', 'Native'))
out.write('%s.jar: libz3java$(SO_EXT) ' % self.package_name)
deps = ''
-@@ -2694,7 +2694,8 @@ def mk_config():
+@@ -2694,7 +2695,8 @@ def mk_config():
check_ar()
CXX = find_cxx_compiler()
CC = find_c_compiler()
@@ -21,7 +31,7 @@ $NetBSD: patch-scripts_mk__util.py,v 1.5 2018/12/18 06:46:39 kamil Exp $
EXE_EXT = ''
LIB_EXT = '.a'
if GPROF:
-@@ -2822,6 +2823,7 @@ def mk_config():
+@@ -2822,6 +2824,7 @@ def mk_config():
config.write('SLINK_FLAGS=%s\n' % SLIBFLAGS)
config.write('SLINK_EXTRA_FLAGS=%s\n' % SLIBEXTRAFLAGS)
config.write('SLINK_OUT_FLAG=-o \n')
diff --git a/textproc/py-xmlschema/distinfo b/textproc/py-xmlschema/distinfo
index 8cf4278ebce..a179a49da90 100644
--- a/textproc/py-xmlschema/distinfo
+++ b/textproc/py-xmlschema/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.7 2020/04/29 07:50:05 adam Exp $
+$NetBSD: distinfo,v 1.8 2020/05/31 20:49:34 joerg Exp $
SHA1 (xmlschema-1.1.3.tar.gz) = 663f856b99b99a70631f8c7da8acf0b0b8c765d6
RMD160 (xmlschema-1.1.3.tar.gz) = 0a4255b5aa23afd06727b6e66769a5cec98122fe
SHA512 (xmlschema-1.1.3.tar.gz) = df277cd75058e10b8e0505db51fc167c688fe4c3d319de289ac77faa37913f60d2697f4456e00d637c4a3c3f83d164619e0ce1b849e8c8ea3b5e1932b56044dc
Size (xmlschema-1.1.3.tar.gz) = 298490 bytes
+SHA1 (patch-setup.py) = 6007d0da37c00e14a7217b588df8e92679fc7c96
diff --git a/textproc/py-xmlschema/patches/patch-setup.py b/textproc/py-xmlschema/patches/patch-setup.py
new file mode 100644
index 00000000000..1f634df6716
--- /dev/null
+++ b/textproc/py-xmlschema/patches/patch-setup.py
@@ -0,0 +1,19 @@
+$NetBSD: patch-setup.py,v 1.1 2020/05/31 20:49:34 joerg Exp $
+
+--- setup.py.orig 2020-05-31 18:07:15.361949598 +0000
++++ setup.py
+@@ -8,12 +8,13 @@
+ #
+ # @author Davide Brunato <brunato@sissa.it>
+ #
++import sys
+ import importlib
+ from setuptools import setup
+ from setuptools.command.develop import develop
+ from setuptools.command.install import install
+
+-with open("README.rst") as readme:
++with open("README.rst", **({'encoding': 'UTF-8'} if sys.version_info.major>=3 else {})) as readme:
+ long_description = readme.read()
+
+