Received: by mail.netbsd.org (Postfix, from userid 605) id EA95084E86; Sat, 28 Jan 2023 17:58:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 267F284CE8 for ; Sat, 28 Jan 2023 17:58:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id EhI2KQhdCUU9 for ; Sat, 28 Jan 2023 17:58:05 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 894A084CDC for ; Sat, 28 Jan 2023 17:58:05 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 39D44FA90; Sat, 28 Jan 2023 17:58:05 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_167492868551440" MIME-Version: 1.0 Date: Sat, 28 Jan 2023 17:58:05 +0000 From: "Havard Eidnes" Subject: CVS commit: pkgsrc/math/py-pandas To: pkgsrc-changes@NetBSD.org Reply-To: he@netbsd.org X-Mailer: log_accum Message-Id: <20230128175805.39D44FA90@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_167492868551440 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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 is included, Python.h later includes which in turn #undef's all the relevant definitions from , 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. --_----------=_167492868551440 Content-Disposition: inline Content-Length: 2226 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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 is included, Python.h later includes + which in turn #undef's all the relevant definitions +from , 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 "" namespace "std": ++ int signbit(float64_t) nogil ++ float64_t sqrt(float64_t x) nogil ++ + cnp.import_array() + + from pandas._libs.algos import is_monotonic --_----------=_167492868551440--