Skip to content

Commit 44a2d31

Browse files
committed
fixed up version import __init__ writing
1 parent 6f5f6a8 commit 44a2d31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype2pydra/package.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,13 +1023,13 @@ def write_pkg_inits(
10231023
names : List[str]
10241024
The names to import in the __init__.py files
10251025
"""
1026-
parts = module_name.split(".")
10271026
# Write base init path that imports __version__ from the auto-generated _version
10281027
# file
1029-
base_init_fspath = package_root.joinpath(*parts, "__init__.py")
1028+
base_init_fspath = package_root.joinpath(*self.name, "__init__.py")
10301029
if not base_init_fspath.exists():
10311030
with open(base_init_fspath, "w") as f:
10321031
f.write("from ._version import __version__")
1032+
parts = module_name.split(".")
10331033
for i, part in enumerate(reversed(parts[depth:]), start=1):
10341034
mod_parts = parts[:-i]
10351035
parent_mod = ".".join(mod_parts)

0 commit comments

Comments
 (0)