Skip to content

Commit 2531f36

Browse files
committed
[GR-51959] Add patch for uvloop
PullRequest: graalpython/3355
2 parents fbbcf51 + 7511409 commit 2531f36

File tree

6 files changed

+51
-5
lines changed

6 files changed

+51
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/SignalModuleBuiltins.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ public void initialize(Python3Core core) {
121121
addBuiltinConstant("ITIMER_REAL", ITIMER_REAL);
122122
addBuiltinConstant("ITIMER_VIRTUAL", ITIMER_VIRTUAL);
123123
addBuiltinConstant("ITIMER_PROF", ITIMER_PROF);
124+
addBuiltinConstant("NSIG", Signals.SIGMAX + 1);
124125
for (int i = 0; i < Signals.SIGNAL_NAMES.length; i++) {
125126
String name = Signals.SIGNAL_NAMES[i];
126127
if (name != null) {
@@ -539,7 +540,7 @@ private static final class ModuleData {
539540
final class Signals {
540541
static final int SIG_DFL = 0;
541542
static final int SIG_IGN = 1;
542-
private static final int SIGMAX = 31;
543+
static final int SIGMAX = 64;
543544
static final String[] SIGNAL_NAMES = new String[SIGMAX + 1];
544545

545546
static {

graalpython/lib-graalpython/patches/pyarrow/pyarrow-12.0.0.patch

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,17 @@ index 0000000..c9826ce
140140
+ shutil.copyfile(wheel, wheel_directory / wheel.name)
141141
+ return str(wheel.name)
142142
diff --git a/pyproject.toml b/pyproject.toml
143-
index fe8c938..8945652 100644
143+
index fe8c938..3f9e7c5 100644
144144
--- a/pyproject.toml
145145
+++ b/pyproject.toml
146-
@@ -23,3 +23,5 @@ requires = [
146+
@@ -17,9 +17,11 @@
147+
148+
[build-system]
149+
requires = [
150+
- "cython >= 0.29.31",
151+
+ "cython >= 0.29.31, < 3",
152+
"oldest-supported-numpy>=0.14",
153+
"setuptools_scm",
147154
"setuptools >= 40.1.0",
148155
"wheel"
149156
]

graalpython/lib-graalpython/patches/pyarrow/pyarrow-15.0.0.patch

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,17 @@ index 0000000..955ac8d
140140
+ shutil.copyfile(wheel, wheel_directory / wheel.name)
141141
+ return str(wheel.name)
142142
diff --git a/pyproject.toml b/pyproject.toml
143-
index 437de10..bbae50f 100644
143+
index 437de10..a78c7ee 100644
144144
--- a/pyproject.toml
145145
+++ b/pyproject.toml
146-
@@ -23,3 +23,5 @@ requires = [
146+
@@ -17,9 +17,11 @@
147+
148+
[build-system]
149+
requires = [
150+
- "cython >= 0.29.31",
151+
+ "cython >= 0.29.31, < 3",
152+
"oldest-supported-numpy>=0.14",
153+
"setuptools_scm < 8.0.0",
147154
"setuptools >= 40.1.0",
148155
"wheel"
149156
]

graalpython/lib-graalpython/patches/scikit-learn/scikit-learn-1.1.3.patch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
diff --git a/pyproject.toml b/pyproject.toml
2+
index 9ad9298..b0ce0fa 100644
3+
--- a/pyproject.toml
4+
+++ b/pyproject.toml
5+
@@ -1,9 +1,9 @@
6+
[build-system]
7+
# Minimum requirements for the build system to execute.
8+
requires = [
9+
- "setuptools<60.0",
10+
+ "setuptools",
11+
"wheel",
12+
- "Cython>=0.28.5",
13+
+ "Cython>=0.28.5,<3",
14+
15+
# use oldest-supported-numpy which provides the oldest numpy version with
16+
# wheels on PyPI
117
diff --git a/sklearn/_build_utils/__init__.py b/sklearn/_build_utils/__init__.py
218
index d8206a3..e7b7bf4 100644
319
--- a/sklearn/_build_utils/__init__.py
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[[rules]]
2+
patch = 'uvloop.patch'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/setup.py b/setup.py
2+
index ba15af5..263a5b0 100644
3+
--- a/setup.py
4+
+++ b/setup.py
5+
@@ -84,7 +84,7 @@ class uvloop_build_ext(build_ext):
6+
def initialize_options(self):
7+
super().initialize_options()
8+
self.use_system_libuv = False
9+
- self.cython_always = False
10+
+ self.cython_always = True
11+
self.cython_annotate = None
12+
self.cython_directives = None
13+

0 commit comments

Comments
 (0)