Skip to content

Commit 3d31b5d

Browse files
author
Simon Rit
committed
ENH: Improve module name extraction from wheel name for delvewheel fixup
The module name was previously obtained by removing the "itk-" prefix from the wheel name. Some wheels might have suffixes, e.g., itk-rtk-cuda124. The module name is now obtained by 1. Removing the "itk-" prefix 2. Removing from the result everything after the first occurence of "-".
1 parent c110dd4 commit 3d31b5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/windows_build_module_wheels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def rename_wheel_init(py_env, filepath, add_module_name=True):
147147
wheel_dir = os.path.join(dist_dir, "itk_" + module_name.replace('-','_') + "-" + module_version)
148148
init_dir = os.path.join(wheel_dir, "itk")
149149
init_file = os.path.join(init_dir, "__init__.py")
150-
init_file_module = os.path.join(init_dir, "__init_" + module_name + "__.py")
150+
init_file_module = os.path.join(init_dir, "__init_" + module_name.split("-")[0] + "__.py")
151151

152152
# Unpack wheel and rename __init__ file if it exists.
153153
check_call([python_executable, "-m", "wheel", "unpack", filepath, "-d", dist_dir])

0 commit comments

Comments
 (0)