Skip to content

Commit

Permalink
python-numba: fix build with numpy 2.0.1 (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed Aug 1, 2024
1 parent 6d817c7 commit 7fbc009
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
18 changes: 10 additions & 8 deletions mingw-w64-python-numba/001-fix-build-with-numpy-2.0.1.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
--- a/numba/_helperlib.c
+++ b/numba/_helperlib.c
@@ -19,6 +19,7 @@
#else
#include <stdint.h>
#define _complex_float_t complex float
+ #define I _Complex_I
#define _complex_float_ctor(r, i) (r + I * i)
#define _complex_double_t complex double
#endif
@@ -25,6 +25,9 @@
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/ndarrayobject.h>
#include <numpy/arrayscalars.h>
+#if !defined(I) && !defined(_MSC_VER)
+#define I _Complex_I
+#endif

#include "_arraystruct.h"

4 changes: 2 additions & 2 deletions mingw-w64-python-numba/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=numba
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=0.60.0
pkgrel=4
pkgrel=5
pkgdesc='NumPy aware dynamic Python compiler using LLVM (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand All @@ -31,7 +31,7 @@ options=('!emptydirs' '!strip')
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz"
"001-fix-build-with-numpy-2.0.1.patch")
sha256sums=('5df6158e5584eece5fc83294b949fd30b9f1125df7708862205217e068aabf16'
'fcc90833b3b55409d842922403de3a4562cbd573ffffed3b606aa7d7576c5013')
'a0aef12c07a204935c49f316d8da0a0f3b70325840d6a8b244888a96f65b52ff')

prepare() {
cd ${_realname}-${pkgver}
Expand Down

0 comments on commit 7fbc009

Please sign in to comment.