diff options
author | schmonz <schmonz@pkgsrc.org> | 2020-09-01 09:26:54 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2020-09-01 09:26:54 +0000 |
commit | 3131bc7059dc3af0a992f0a7a1491b2cde7b411e (patch) | |
tree | 3f00c906ee13a1e53b2f09f62840cbb70168277d /lang | |
parent | 928aabcfa98dfd9efea088304cb971ee166ed4d6 (diff) | |
download | pkgsrc-3131bc7059dc3af0a992f0a7a1491b2cde7b411e.tar.gz |
Avoid MemoryError from "import ctypes" on OpenBSD (PR pkg/55134) for all
applicable Pythons. Bump PKGREVISION.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/python27/Makefile | 4 | ||||
-rw-r--r-- | lang/python27/distinfo | 3 | ||||
-rw-r--r-- | lang/python27/patches/patch-Lib_ctypes_____init____.py | 16 | ||||
-rw-r--r-- | lang/python36/Makefile | 3 | ||||
-rw-r--r-- | lang/python36/distinfo | 3 | ||||
-rw-r--r-- | lang/python36/patches/patch-Lib_ctypes_____init____.py | 16 | ||||
-rw-r--r-- | lang/python37/Makefile | 3 | ||||
-rw-r--r-- | lang/python37/distinfo | 3 | ||||
-rw-r--r-- | lang/python37/patches/patch-Lib_ctypes_____init____.py | 16 |
9 files changed, 60 insertions, 7 deletions
diff --git a/lang/python27/Makefile b/lang/python27/Makefile index 711ba88f73f..6c264a78447 100644 --- a/lang/python27/Makefile +++ b/lang/python27/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.88 2020/08/22 15:05:53 wiz Exp $ +# $NetBSD: Makefile,v 1.89 2020/09/01 09:26:54 schmonz Exp $ .include "dist.mk" PKGNAME= python27-${PY_DISTVERSION} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= lang python MAINTAINER= pkgsrc-users@NetBSD.org diff --git a/lang/python27/distinfo b/lang/python27/distinfo index 023f7cd6d3e..402e564fdb2 100644 --- a/lang/python27/distinfo +++ b/lang/python27/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.77 2020/08/22 13:01:42 schmonz Exp $ +$NetBSD: distinfo,v 1.78 2020/09/01 09:26:54 schmonz Exp $ SHA1 (Python-2.7.18.tar.xz) = 678d4cf483a1c92efd347ee8e1e79326dc82810b RMD160 (Python-2.7.18.tar.xz) = 40a514bb05c9e631454ea8466e28f5bb229428ad @@ -6,6 +6,7 @@ SHA512 (Python-2.7.18.tar.xz) = a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c32379 Size (Python-2.7.18.tar.xz) = 12854736 bytes SHA1 (patch-Include_pyerrors.h) = 0d2cd52d18cc719b895fa32ed7e11c6cb15bae54 SHA1 (patch-Include_pyport.h) = f3e4ddbc954425a65301465410911222ca471320 +SHA1 (patch-Lib_ctypes_____init____.py) = 31dd0546bbe29ad1b1d481edc525ba43479c06da SHA1 (patch-Lib_ctypes_util.py) = 6fa516c7b43f08992427a0afcbe80c17bcc070f1 SHA1 (patch-Lib_distutils_command_build__ext.py) = ea4feba4e93dbcff07050c82a00d591bb650e934 SHA1 (patch-Lib_distutils_command_install.py) = e6aef090b444b455fe351308d251e670329b7dc3 diff --git a/lang/python27/patches/patch-Lib_ctypes_____init____.py b/lang/python27/patches/patch-Lib_ctypes_____init____.py new file mode 100644 index 00000000000..e5aad9c3d7f --- /dev/null +++ b/lang/python27/patches/patch-Lib_ctypes_____init____.py @@ -0,0 +1,16 @@ +$NetBSD: patch-Lib_ctypes_____init____.py,v 1.1 2020/09/01 09:26:54 schmonz Exp $ + +Avoid MemoryError from "import ctypes" on OpenBSD. + +--- Lib/ctypes/__init__.py.orig Sun Apr 19 21:13:39 2020 ++++ Lib/ctypes/__init__.py +@@ -273,7 +273,8 @@ def _reset_cache(): + # function is needed for the unittests on Win64 to succeed. This MAY + # be a compiler bug, since the problem occurs only when _ctypes is + # compiled with the MS SDK compiler. Or an uninitialized variable? +- CFUNCTYPE(c_int)(lambda: None) ++ if not _sys.platform.startswith('openbsd'): ++ CFUNCTYPE(c_int)(lambda: None) + + try: + from _ctypes import set_conversion_mode diff --git a/lang/python36/Makefile b/lang/python36/Makefile index 3757bb50765..eaa55a7bec5 100644 --- a/lang/python36/Makefile +++ b/lang/python36/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.26 2020/08/14 19:28:44 schmonz Exp $ +# $NetBSD: Makefile,v 1.27 2020/09/01 09:26:54 schmonz Exp $ .include "dist.mk" PKGNAME= python36-${PY_DISTVERSION} +PKGREVISION= 1 CATEGORIES= lang python MAINTAINER= pkgsrc-users@NetBSD.org diff --git a/lang/python36/distinfo b/lang/python36/distinfo index 50f29cc6cd0..39110658973 100644 --- a/lang/python36/distinfo +++ b/lang/python36/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.33 2020/08/19 07:07:46 adam Exp $ +$NetBSD: distinfo,v 1.34 2020/09/01 09:26:54 schmonz Exp $ SHA1 (Python-3.6.12.tar.xz) = e6a28b1ab47f079a659e24a40e4c416f52828682 RMD160 (Python-3.6.12.tar.xz) = ae27e8221f07520aa97ed706c7f50cce7d63b182 SHA512 (Python-3.6.12.tar.xz) = 1462801f3f6626a853097d34ccdca9838c4c5bd81ecc3abc751003f5f2f8d36eecdaa4130ef4218de351c5586093c11669639a34492668fbc5a2a4a241f4a070 Size (Python-3.6.12.tar.xz) = 17202980 bytes +SHA1 (patch-Lib_ctypes_____init____.py) = 7136d2af2d144b58a3ada07ed3aabddcf6823ced SHA1 (patch-Lib_ctypes_util.py) = 3b7aecb2879cce70c76bd4bc60f2ec577a5bed61 SHA1 (patch-Lib_distutils_command_install.py) = 29204f34296f36ab2b21c745f915ba73caf2b71c SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf diff --git a/lang/python36/patches/patch-Lib_ctypes_____init____.py b/lang/python36/patches/patch-Lib_ctypes_____init____.py new file mode 100644 index 00000000000..fa34cb7f897 --- /dev/null +++ b/lang/python36/patches/patch-Lib_ctypes_____init____.py @@ -0,0 +1,16 @@ +$NetBSD: patch-Lib_ctypes_____init____.py,v 1.1 2020/09/01 09:26:54 schmonz Exp $ + +Avoid MemoryError from "import ctypes" on OpenBSD. + +--- Lib/ctypes/__init__.py.orig Sat Aug 15 06:43:26 2020 ++++ Lib/ctypes/__init__.py +@@ -270,7 +270,8 @@ def _reset_cache(): + # function is needed for the unittests on Win64 to succeed. This MAY + # be a compiler bug, since the problem occurs only when _ctypes is + # compiled with the MS SDK compiler. Or an uninitialized variable? +- CFUNCTYPE(c_int)(lambda: None) ++ if not _sys.platform.startswith('openbsd'): ++ CFUNCTYPE(c_int)(lambda: None) + + def create_unicode_buffer(init, size=None): + """create_unicode_buffer(aString) -> character array diff --git a/lang/python37/Makefile b/lang/python37/Makefile index 0e0b41f2c6a..cc4de8d7028 100644 --- a/lang/python37/Makefile +++ b/lang/python37/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.20 2020/08/19 07:08:34 adam Exp $ +# $NetBSD: Makefile,v 1.21 2020/09/01 09:26:54 schmonz Exp $ .include "dist.mk" PKGNAME= python37-${PY_DISTVERSION} +PKGREVISION= 1 CATEGORIES= lang python MAINTAINER= pkgsrc-users@NetBSD.org diff --git a/lang/python37/distinfo b/lang/python37/distinfo index a0306716844..a5da32d014f 100644 --- a/lang/python37/distinfo +++ b/lang/python37/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.20 2020/08/19 07:08:34 adam Exp $ +$NetBSD: distinfo,v 1.21 2020/09/01 09:26:54 schmonz Exp $ SHA1 (Python-3.7.9.tar.xz) = e1de02779a89a94000c0ed340ec126de25825f2f RMD160 (Python-3.7.9.tar.xz) = 6ff3676f84b1a103b0e3161dcc7257936c914daf SHA512 (Python-3.7.9.tar.xz) = e4217b25529b5336e43b63d17f3758a8177a58184564cf02bd92a312f58dba9e096485c9e3cb3544f966e847ea15b3ab30ed065d28a6ca52a6d7e0faddf7d9f9 Size (Python-3.7.9.tar.xz) = 17389636 bytes +SHA1 (patch-Lib_ctypes_____init____.py) = ded12eb372028288d85ba88b43e45549c6f48144 SHA1 (patch-Lib_ctypes_util.py) = 032cc99ebad93ddddfd89073c60424a952e3faa3 SHA1 (patch-Lib_distutils_command_install.py) = 6fc6f5d918b7581fc62cd0fe55857ee932c3a341 SHA1 (patch-Lib_distutils_sysconfig.py) = 6822eafb4dfded86d7f7353831816aeb8119e6cf diff --git a/lang/python37/patches/patch-Lib_ctypes_____init____.py b/lang/python37/patches/patch-Lib_ctypes_____init____.py new file mode 100644 index 00000000000..57fd80e4c54 --- /dev/null +++ b/lang/python37/patches/patch-Lib_ctypes_____init____.py @@ -0,0 +1,16 @@ +$NetBSD: patch-Lib_ctypes_____init____.py,v 1.1 2020/09/01 09:26:54 schmonz Exp $ + +Avoid MemoryError from "import ctypes" on OpenBSD. + +--- Lib/ctypes/__init__.py.orig Sat Aug 15 05:20:16 2020 ++++ Lib/ctypes/__init__.py +@@ -270,7 +270,8 @@ def _reset_cache(): + # function is needed for the unittests on Win64 to succeed. This MAY + # be a compiler bug, since the problem occurs only when _ctypes is + # compiled with the MS SDK compiler. Or an uninitialized variable? +- CFUNCTYPE(c_int)(lambda: None) ++ if not _sys.platform.startswith('openbsd'): ++ CFUNCTYPE(c_int)(lambda: None) + + def create_unicode_buffer(init, size=None): + """create_unicode_buffer(aString) -> character array |