pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/python37 lang/python37: Fix on CentOS 7



details:   https://anonhg.NetBSD.org/pkgsrc/rev/97c4f25a5fe1
branches:  trunk
changeset: 442059:97c4f25a5fe1
user:      sjmulder <sjmulder%pkgsrc.org@localhost>
date:      Wed Nov 18 11:03:31 2020 +0000

description:
lang/python37: Fix on CentOS 7

Same as lang/python38 fix just now:

Move __has_attribute() inside #if defined(__has_attribute) body so the
preprocessor doesn't break on that.

diffstat:

 lang/python37/distinfo                                   |   6 +++---
 lang/python37/patches/patch-Modules___ctypes_callbacks.c |   6 +++---
 lang/python37/patches/patch-Modules_timemodule.c         |  16 +++++++++-------
 3 files changed, 15 insertions(+), 13 deletions(-)

diffs (119 lines):

diff -r 961bdeb0da23 -r 97c4f25a5fe1 lang/python37/distinfo
--- a/lang/python37/distinfo    Wed Nov 18 10:51:01 2020 +0000
+++ b/lang/python37/distinfo    Wed Nov 18 11:03:31 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2020/11/17 19:33:26 sjmulder Exp $
+$NetBSD: distinfo,v 1.23 2020/11/18 11:03:31 sjmulder Exp $
 
 SHA1 (Python-3.7.9.tar.xz) = e1de02779a89a94000c0ed340ec126de25825f2f
 RMD160 (Python-3.7.9.tar.xz) = 6ff3676f84b1a103b0e3161dcc7257936c914daf
@@ -22,7 +22,7 @@
 SHA1 (patch-Mac_BuildScript_build-installer.py) = a377ed164ee2ba72ce0f72ccf9507e775f7b7deb
 SHA1 (patch-Mac_Tools_pythonw.c) = 94f27032aac27263bc1c1bd66574121fbca1e380
 SHA1 (patch-Makefile.pre.in) = 1393dac225c5a7edcb7947eb707b4526ea884f95
-SHA1 (patch-Modules___ctypes_callbacks.c) = 98bd449f9c4bf3acbcfdd24d017f490fc0c9326e
+SHA1 (patch-Modules___ctypes_callbacks.c) = 739462325d430d2b57483738d94a3174e36e50e1
 SHA1 (patch-Modules___ctypes_callproc.c) = d0905ede69f2c61d917380d6da73c14e7e31d41f
 SHA1 (patch-Modules___ctypes_ctypes.h) = 2589d24c101771f8696b456d594e5f53305cf72c
 SHA1 (patch-Modules___ctypes_malloc__closure.c) = 780e7dfa293c57dc28e97358937ed7d148414c8e
@@ -32,7 +32,7 @@
 SHA1 (patch-Modules_posixmodule.c) = cae3797179c1a4d820dd294b69ca4b9a6fa81899
 SHA1 (patch-Modules_socketmodule.c) = c0bdb256bccc176c2406feec4080cd91fcb693b2
 SHA1 (patch-Modules_socketmodule.h) = 13a3290eb72078067060d3e71b7baa08f3eb591c
-SHA1 (patch-Modules_timemodule.c) = c0fa13e7f02046b1dfde36a50898b4c46ca3792e
+SHA1 (patch-Modules_timemodule.c) = e4be632485280002eb76a8e6e524676429044c15
 SHA1 (patch-Python_bootstrap__hash.c) = c60b3987e549987a1180edaab0ad2d48fc272925
 SHA1 (patch-Python_pytime.c) = 5d782457439708f5e8e46043eed5fe7ba40f45f9
 SHA1 (patch-Python_thread__pthread.h) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
diff -r 961bdeb0da23 -r 97c4f25a5fe1 lang/python37/patches/patch-Modules___ctypes_callbacks.c
--- a/lang/python37/patches/patch-Modules___ctypes_callbacks.c  Wed Nov 18 10:51:01 2020 +0000
+++ b/lang/python37/patches/patch-Modules___ctypes_callbacks.c  Wed Nov 18 11:03:31 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-Modules___ctypes_callbacks.c,v 1.1 2020/11/17 19:33:26 sjmulder Exp $
+$NetBSD: patch-Modules___ctypes_callbacks.c,v 1.2 2020/11/18 11:03:31 sjmulder Exp $
 
 Support for macOS 11 and Apple Silicon (ARM). Mostly backported from:
 https://github.com/python/cpython/pull/22855
@@ -62,14 +62,14 @@
 +#ifdef MACOSX
 +        #pragma clang diagnostic push
 +        #pragma clang diagnostic ignored "-Wdeprecated-declarations"
- #endif
++#endif
 +        result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p);
 +
 +#ifdef MACOSX
 +        #pragma clang diagnostic pop
 +#endif
 +
-+#endif
+ #endif
 +    }
      if (result != FFI_OK) {
          PyErr_Format(PyExc_RuntimeError,
diff -r 961bdeb0da23 -r 97c4f25a5fe1 lang/python37/patches/patch-Modules_timemodule.c
--- a/lang/python37/patches/patch-Modules_timemodule.c  Wed Nov 18 10:51:01 2020 +0000
+++ b/lang/python37/patches/patch-Modules_timemodule.c  Wed Nov 18 11:03:31 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-Modules_timemodule.c,v 1.1 2020/11/17 19:33:26 sjmulder Exp $
+$NetBSD: patch-Modules_timemodule.c,v 1.2 2020/11/18 11:03:31 sjmulder Exp $
 
 Support for macOS 11 and Apple Silicon (ARM). Mostly backported from:
 https://github.com/python/cpython/pull/22855
@@ -104,24 +104,26 @@
      }
  #endif
  
-@@ -1327,6 +1355,16 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t 
+@@ -1327,6 +1355,18 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t
  
  #elif defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID)
  #define HAVE_THREAD_TIME
 +
-+#if defined(__APPLE__) && defined(__has_attribute) && __has_attribute(availability)
++#if defined(__APPLE__) && defined(__has_attribute)
++# if __has_attribute(availability)
 +static int
 +_PyTime_GetThreadTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info) 
 +     __attribute__((availability(macos, introduced=10.12)))
 +     __attribute__((availability(ios, introduced=10.0)))
 +     __attribute__((availability(tvos, introduced=10.0)))
 +     __attribute__((availability(watchos, introduced=3.0)));
++# endif
 +#endif
 +
  static int
  _PyTime_GetThreadTimeWithInfo(_PyTime_t *tp, _Py_clock_info_t *info)
  {
-@@ -1358,6 +1396,15 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t 
+@@ -1358,6 +1398,15 @@ _PyTime_GetThreadTimeWithInfo(_PyTime_t
  #endif
  
  #ifdef HAVE_THREAD_TIME
@@ -137,7 +139,7 @@
  static PyObject *
  time_thread_time(PyObject *self, PyObject *unused)
  {
-@@ -1388,6 +1435,11 @@ PyDoc_STRVAR(thread_time_ns_doc,
+@@ -1388,6 +1437,11 @@ PyDoc_STRVAR(thread_time_ns_doc,
  \n\
  Thread time for profiling as nanoseconds:\n\
  sum of the kernel and user-space CPU time.");
@@ -149,7 +151,7 @@
  #endif
  
  
-@@ -1446,9 +1498,19 @@ time_get_clock_info(PyObject *self, PyOb
+@@ -1446,9 +1500,19 @@ time_get_clock_info(PyObject *self, PyOb
      }
  #ifdef HAVE_THREAD_TIME
      else if (strcmp(name, "thread_time") == 0) {
@@ -170,7 +172,7 @@
      }
  #endif
      else {
-@@ -1761,40 +1823,85 @@ PyInit_time(void)
+@@ -1761,40 +1825,85 @@ PyInit_time(void)
      if (m == NULL)
          return NULL;
  



Home | Main Index | Thread Index | Old Index