Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang Avoid MemoryError from "import ctypes" on OpenBSD...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/793bfcb9fb6a
branches:  trunk
changeset: 437835:793bfcb9fb6a
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Tue Sep 01 09:26:54 2020 +0000

description:
Avoid MemoryError from "import ctypes" on OpenBSD (PR pkg/55134) for all
applicable Pythons. Bump PKGREVISION.

diffstat:

 lang/python27/Makefile                                 |   4 ++--
 lang/python27/distinfo                                 |   3 ++-
 lang/python27/patches/patch-Lib_ctypes_____init____.py |  16 ++++++++++++++++
 lang/python36/Makefile                                 |   3 ++-
 lang/python36/distinfo                                 |   3 ++-
 lang/python36/patches/patch-Lib_ctypes_____init____.py |  16 ++++++++++++++++
 lang/python37/Makefile                                 |   3 ++-
 lang/python37/distinfo                                 |   3 ++-
 lang/python37/patches/patch-Lib_ctypes_____init____.py |  16 ++++++++++++++++
 9 files changed, 60 insertions(+), 7 deletions(-)

diffs (150 lines):

diff -r 4e253b730562 -r 793bfcb9fb6a lang/python27/Makefile
--- a/lang/python27/Makefile    Tue Sep 01 09:15:04 2020 +0000
+++ b/lang/python27/Makefile    Tue Sep 01 09:26:54 2020 +0000
@@ -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@localhost
diff -r 4e253b730562 -r 793bfcb9fb6a lang/python27/distinfo
--- a/lang/python27/distinfo    Tue Sep 01 09:15:04 2020 +0000
+++ b/lang/python27/distinfo    Tue Sep 01 09:26:54 2020 +0000
@@ -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 @@
 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 -r 4e253b730562 -r 793bfcb9fb6a lang/python27/patches/patch-Lib_ctypes_____init____.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python27/patches/patch-Lib_ctypes_____init____.py    Tue Sep 01 09:26:54 2020 +0000
@@ -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 -r 4e253b730562 -r 793bfcb9fb6a lang/python36/Makefile
--- a/lang/python36/Makefile    Tue Sep 01 09:15:04 2020 +0000
+++ b/lang/python36/Makefile    Tue Sep 01 09:26:54 2020 +0000
@@ -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@localhost
diff -r 4e253b730562 -r 793bfcb9fb6a lang/python36/distinfo
--- a/lang/python36/distinfo    Tue Sep 01 09:15:04 2020 +0000
+++ b/lang/python36/distinfo    Tue Sep 01 09:26:54 2020 +0000
@@ -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 -r 4e253b730562 -r 793bfcb9fb6a lang/python36/patches/patch-Lib_ctypes_____init____.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python36/patches/patch-Lib_ctypes_____init____.py    Tue Sep 01 09:26:54 2020 +0000
@@ -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 -r 4e253b730562 -r 793bfcb9fb6a lang/python37/Makefile
--- a/lang/python37/Makefile    Tue Sep 01 09:15:04 2020 +0000
+++ b/lang/python37/Makefile    Tue Sep 01 09:26:54 2020 +0000
@@ -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@localhost
diff -r 4e253b730562 -r 793bfcb9fb6a lang/python37/distinfo
--- a/lang/python37/distinfo    Tue Sep 01 09:15:04 2020 +0000
+++ b/lang/python37/distinfo    Tue Sep 01 09:26:54 2020 +0000
@@ -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 -r 4e253b730562 -r 793bfcb9fb6a lang/python37/patches/patch-Lib_ctypes_____init____.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python37/patches/patch-Lib_ctypes_____init____.py    Tue Sep 01 09:26:54 2020 +0000
@@ -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



Home | Main Index | Thread Index | Old Index