Open MegaIng opened 4 weeks ago
Note that I encountered this while trying to debug https://github.com/MegaIng/py_save_monger If you want, you could use it to test that your changes solve the issues (btw, thanks for the quick response!). Currently, it's setup.py
monkey patches prevent_win32_max_path_length_error
with a slightly different solution than what you are trying in #96
prevent_win32_max_path_length_error
silently overwrites files that it shouldn't. This leads to mysterious compilation bugs.If the for-loop through the segments doesn't find any semver segment,
mod_name
is not modified and the samemod_name
as the lastitem
is used, leading to the file being silently overwritten.I would suggested multiple fixes:
replace
, addassert not item.with_name(new_name).exists()
to prevent future occurrences of this bug.else
branch to the for loop that does the same thing as for "bare" modules, i.e. just remove the@m
. This is necessary for local imports which wont include a semver.is_semver
function to also detect if a commit hash is added to the semver in the formatname-major.minor.patch-hash