Skip to content

Commit 3938e3e

Browse files
committed
GR-46040: fix scipy build from source
- unpin gast 0.5.3 - update scipy 1.10.1 patch
1 parent ab067e2 commit 3938e3e

File tree

4 files changed

+39
-6
lines changed

4 files changed

+39
-6
lines changed

graalpython/lib-graalpython/patches/gast/metadata.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
[[rules]]
22
version = '== 0.12.0'
3-
patch = 'pythran-0.12.0.patch'
3+
patch = 'pythran-0.12.0.patch'
4+
5+
[[rules]]
6+
install-priority = 10
7+
version = '== 0.13.*'
8+
patch = 'pythran-0.13.patch'
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/pythran/pythonic/python/core.hpp b/pythran/pythonic/python/core.hpp
2+
index ff44c01..23b4413 100644
3+
--- a/pythran/pythonic/python/core.hpp
4+
+++ b/pythran/pythonic/python/core.hpp
5+
@@ -53,7 +53,7 @@ namespace python
6+
{
7+
8+
#ifndef PyString_AS_STRING
9+
-#define PyString_AS_STRING (char *)_PyUnicode_COMPACT_DATA
10+
+#define PyString_AS_STRING PyBytes_AS_STRING
11+
#endif
12+
13+
inline void PyObject_TypePrettyPrinter(std::ostream &oss, PyObject *obj)
14+
diff --git a/pythran/pythonic/types/str.hpp b/pythran/pythonic/types/str.hpp
15+
index 1f7a981..00440a9 100644
16+
--- a/pythran/pythonic/types/str.hpp
17+
+++ b/pythran/pythonic/types/str.hpp
18+
@@ -744,7 +744,7 @@ namespace std
19+
#define PyString_Check(x) PyUnicode_Check(x) && PyUnicode_IS_COMPACT_ASCII(x)
20+
#endif
21+
#ifndef PyString_AS_STRING
22+
-#define PyString_AS_STRING (char *)_PyUnicode_COMPACT_DATA
23+
+#define PyString_AS_STRING PyBytes_AS_STRING
24+
#endif
25+
#ifndef PyString_GET_SIZE
26+
#define PyString_GET_SIZE PyUnicode_GET_LENGTH

graalpython/lib-graalpython/patches/scipy/scipy-1.10.1.patch

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ index 00000000..afa33ecc
104104
+ with env_vars(scipy_build_env):
105105
+ return mesonpy.build_sdist(sdist_directory, config_settings=config_settings)
106106
diff --git a/pyproject.toml b/pyproject.toml
107-
index 454a3c2e..370f0e8e 100644
107+
index 454a3c2e..a4157fea 100644
108108
--- a/pyproject.toml
109109
+++ b/pyproject.toml
110-
@@ -8,7 +8,9 @@
110+
@@ -8,55 +8,21 @@
111111
# "pybind11>=2.4.3,<2.5.0",
112112

113113
[build-system]
@@ -118,7 +118,11 @@ index 454a3c2e..370f0e8e 100644
118118
requires = [
119119
"meson-python>=0.11.0,<0.13.0",
120120
"Cython>=0.29.32,<3.0",
121-
@@ -19,44 +21,8 @@ requires = [
121+
# conservatively avoid issues from
122+
# https://github.com/pybind/pybind11/issues/4420
123+
"pybind11==2.10.1",
124+
- "pythran>=0.12.0,<0.13.0",
125+
+ "pythran>=0.13.0",
122126
# `wheel` is needed for non-isolated builds, given that `meson-python`
123127
# doesn't list it as a runtime requirement (at least in 0.5.0)
124128
"wheel<0.39.0",

0 commit comments

Comments
 (0)