File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1023,13 +1023,13 @@ def write_pkg_inits(
1023
1023
names : List[str]
1024
1024
The names to import in the __init__.py files
1025
1025
"""
1026
- parts = module_name .split ("." )
1027
1026
# Write base init path that imports __version__ from the auto-generated _version
1028
1027
# file
1029
- base_init_fspath = package_root .joinpath (* parts , "__init__.py" )
1028
+ base_init_fspath = package_root .joinpath (* self . name , "__init__.py" )
1030
1029
if not base_init_fspath .exists ():
1031
1030
with open (base_init_fspath , "w" ) as f :
1032
1031
f .write ("from ._version import __version__" )
1032
+ parts = module_name .split ("." )
1033
1033
for i , part in enumerate (reversed (parts [depth :]), start = 1 ):
1034
1034
mod_parts = parts [:- i ]
1035
1035
parent_mod = "." .join (mod_parts )
You can’t perform that action at this time.
0 commit comments