You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just realized that create_intermediate_modules creates the intermediate modules in the current directory, but this isn't always the case.
If the user modified the PYTHONPATH, or installed a package with pip install --editable ., the pkg may be in a different location.
To solve this, we can use find_spec, and pass the first element. e.g., if source_parts is a.b.c, use find_spec('a').origin to get the location of module a, and use this a prefix to create the intermediate files. If a, does not exist, then it's fine to create it in the current working directory
The text was updated successfully, but these errors were encountered:
I just realized that create_intermediate_modules creates the intermediate modules in the current directory, but this isn't always the case.
If the user modified the
PYTHONPATH
, or installed a package withpip install --editable .
, the pkg may be in a different location.To solve this, we can use find_spec, and pass the first element. e.g., if
source_parts
isa.b.c
, usefind_spec('a').origin
to get the location of modulea
, and use this a prefix to create the intermediate files. Ifa
, does not exist, then it's fine to create it in the current working directoryThe text was updated successfully, but these errors were encountered: