Closed chapmanjacobd closed 1 year ago
Thank you for the report! Seems like this would be useful, though I'm not really sure how to implement correctly.
In particular, I'm not able to let bin/argparse-manpage
behave the same way setup.py
use-case would behave.
Seems like we'd have to modify sys.path
directly in bin/argparse-manpage
(which is a generated file).
Ideas? Patches are welcome!
TBH, I am against that proposal. Relative module imports are known to be problematic and dangerous.
If we had a good test for the whole matrix of possible import combinations, I wouldn't be afraid of adding the support. But I agree that absolute imports have much more "expectable" effects.
I experimented with this for some time already, and haven't found a solution anyway. Closing, feel free to submit patches though.
It would nice to be able to import relative modules. or rather
argparse-manpage
has trouble seeing from the current working directory for absolute module loading