Skip to content

Commit 1bde308

Browse files
committed
Add patch for msgpack
1 parent cb76dd3 commit 1bde308

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

graalpython/lib-graalpython/patches/metadata.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ url = 'https://github.com/ml-explore/mlx/archive/refs/tags/v0.16.2.tar.gz'
359359
version = '0.16.1'
360360
url = 'https://github.com/ml-explore/mlx/archive/refs/tags/v0.16.1.tar.gz'
361361

362+
[[msgpack.rules]]
363+
patch = 'msgpack.patch'
364+
license = 'Apache-2.0'
365+
362366
[[nanobind.rules]]
363367
patch = 'nanobind.patch'
364368
license = 'BSD-3-Clause'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
diff --git a/setup.py b/setup.py
2+
index 4029e9e..14095fc 100644
3+
--- a/setup.py
4+
+++ b/setup.py
5+
@@ -5,6 +5,7 @@ import sys
6+
from setuptools import Extension, setup
7+
8+
PYPY = hasattr(sys, "pypy_version_info")
9+
+GRAALPY = sys.implementation.name == 'graalpy'
10+
11+
libraries = []
12+
macros = []
13+
@@ -14,7 +15,7 @@ if sys.platform == "win32":
14+
libraries.append("ws2_32")
15+
macros = [("__LITTLE_ENDIAN__", "1")]
16+
17+
-if not PYPY and not os.environ.get("MSGPACK_PUREPYTHON"):
18+
+if not PYPY and not GRAALPY and not os.environ.get("MSGPACK_PUREPYTHON"):
19+
ext_modules.append(
20+
Extension(
21+
"msgpack._cmsgpack",

0 commit comments

Comments
 (0)