Skip to content

Commit 2c84835

Browse files
committed
[GR-66497] Add itk patch
PullRequest: graalpython/3858
2 parents a062c7c + 2da4d38 commit 2c84835

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/Wrapping/macro_files/itk_end_wrap_module.cmake b/Wrapping/macro_files/itk_end_wrap_module.cmake
2+
index 63d85c8718..0f94646710 100644
3+
--- a/Wrapping/macro_files/itk_end_wrap_module.cmake
4+
+++ b/Wrapping/macro_files/itk_end_wrap_module.cmake
5+
@@ -422,7 +422,12 @@ ${DO_NOT_WAIT_FOR_THREADS_CALLS}
6+
if (ITK_USE_PYTHON_LIMITED_API)
7+
set_target_properties(${lib} PROPERTIES SUFFIX .abi3.so)
8+
else()
9+
- set_target_properties(${lib} PROPERTIES SUFFIX .so)
10+
+ find_package(Python)
11+
+ if(PYTHON_FOUND)
12+
+ # Graalpy Patch
13+
+ set_target_properties(${lib} PROPERTIES SUFFIX ${Python_SOABI}.so)
14+
+ else()
15+
+ set_target_properties(${lib} PROPERTIES SUFFIX .so)
16+
+ endif()
17+
endif()
18+
endif()
19+
if(NOT MSVC)

graalpython/lib-graalpython/patches/metadata.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,16 @@ version = '< 6.69.0'
207207
patch = 'hypothesis-6.patch'
208208
license = 'MPL-2.0'
209209

210+
[[itk.rules]]
211+
note = """\
212+
ITK cannot be directly installed with pip. It can be built manually from upstream source tarball with cmake. \
213+
GraalPy includes a patch `itk-5.4.3.patch` that can be manually applied to fix library loading issues.\
214+
"""
215+
# Note: there is no source, the patch isn't complete enough to build a wheel
216+
version = '== 5.4.3'
217+
patch = 'itk-5.4.3.patch'
218+
license = 'Apache-2.0'
219+
210220
[[jaxlib.rules]]
211221
version = '== 0.4.13'
212222
patch = 'jaxlib-0.4.13.patch'

0 commit comments

Comments
 (0)