pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/math/py-pandas
Module Name: pkgsrc
Committed By: he
Date: Sat Jan 28 17:58:05 UTC 2023
Modified Files:
pkgsrc/math/py-pandas: distinfo
Added Files:
pkgsrc/math/py-pandas/patches:
patch-pandas___libs_window_aggregations.pyx
Log Message:
math/py-pandas: fix aggregations.pyx so that this builds on NetBSD.
On NetBSD, signbit and sqrt cannot be imported from "libc", because
even though <math.h> is included, Python.h later includes
<cmath> which in turn #undef's all the relevant definitions
from <math.h>, forcing the use of the std:: variants of those
functions. So ... re-do how we import signbit() and sqrt().
To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 pkgsrc/math/py-pandas/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/math/py-pandas/patches/patch-pandas___libs_window_aggregations.pyx
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/math/py-pandas/distinfo
diff -u pkgsrc/math/py-pandas/distinfo:1.30 pkgsrc/math/py-pandas/distinfo:1.31
--- pkgsrc/math/py-pandas/distinfo:1.30 Wed Jan 25 14:05:16 2023
+++ pkgsrc/math/py-pandas/distinfo Sat Jan 28 17:58:04 2023
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.30 2023/01/25 14:05:16 adam Exp $
+$NetBSD: distinfo,v 1.31 2023/01/28 17:58:04 he Exp $
BLAKE2s (pandas-1.5.3.tar.gz) = 70796e4f607463d03134f834f57b29b6b482faf98e64c1da58c8f847618b0081
SHA512 (pandas-1.5.3.tar.gz) = 3c725c33dcaf78b952d2eb966ced73ff0073162a01d3cbcb722d58d8f12a82163e6e684c27284c735bdfb32dea263b960f70f6a80ff93e6b316316d40835ae35
Size (pandas-1.5.3.tar.gz) = 5203060 bytes
+SHA1 (patch-pandas___libs_window_aggregations.pyx) = baca41b0a320bb82197dd9c817cb08554fb358f7
Added files:
Index: pkgsrc/math/py-pandas/patches/patch-pandas___libs_window_aggregations.pyx
diff -u /dev/null pkgsrc/math/py-pandas/patches/patch-pandas___libs_window_aggregations.pyx:1.1
--- /dev/null Sat Jan 28 17:58:05 2023
+++ pkgsrc/math/py-pandas/patches/patch-pandas___libs_window_aggregations.pyx Sat Jan 28 17:58:05 2023
@@ -0,0 +1,35 @@
+$NetBSD: patch-pandas___libs_window_aggregations.pyx,v 1.1 2023/01/28 17:58:05 he Exp $
+
+On NetBSD, signbit and sqrt cannot be imported from "libc", because
+even though <math.h> is included, Python.h later includes
+<cmath> which in turn #undef's all the relevant definitions
+from <math.h>, forcing the use of the std:: variants of those
+functions. So ... re-do how we import signbit() and sqrt().
+
+--- pandas/_libs/window/aggregations.pyx.orig 2023-01-19 03:22:10.000000000 +0000
++++ pandas/_libs/window/aggregations.pyx
+@@ -1,11 +1,8 @@
+ # cython: boundscheck=False, wraparound=False, cdivision=True
+
+ cimport cython
+-from libc.math cimport (
+- round,
+- signbit,
+- sqrt,
+-)
++from libc.math cimport round
++
+ from libcpp.deque cimport deque
+
+ from pandas._libs.algos cimport TiebreakEnumType
+@@ -20,6 +17,10 @@ from numpy cimport (
+ ndarray,
+ )
+
++cdef extern from "<cmath>" namespace "std":
++ int signbit(float64_t) nogil
++ float64_t sqrt(float64_t x) nogil
++
+ cnp.import_array()
+
+ from pandas._libs.algos import is_monotonic
Home |
Main Index |
Thread Index |
Old Index