-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ModuleNotFoundError when using cmdclass option in PEP517-style build #3000
Comments
Hi @zluudg, thank you very much for reporting this! Unfortunately, this feature is not yet fully supported by setuptools via As a workaround, you could try: PYTHONPATH=$PWD python -m build But the good news is that this problem might be solved in the near future (via #2970) |
Thanks for the tips and for the quick reply! I think I'll go with the setup.py-approach for now while keeping an eye on your PR. Good luck with that! |
Another option could be to supply the cmdclass as a plugin. If you were to implement |
That seems like an interesting option as well, @jaraco. But would I have to upload my |
It would have to be on PyPI or otherwise discoverable by pip, so not a good solution if the implementation is local to this one project. |
Ah, I see. I think I'll stick with my Thanks a lot for taking the time, @abravalheri and @jaraco. It's ok for me if you want to close this issue. Cheers! |
Sure, no probs! |
Ok, I revisited this issue and considering the changes in the mentioned PR, I think this specific problem will not be solved, but a similar problem will: when the cmdclass reside within the package being published. So I think the best options here are keep using |
Although this situation is different from the one described in pypa#3000, that issue served as inspiration behind this change.
Although this situation is different from the one described in pypa#3000, that issue served as inspiration behind this change.
setuptools version
setuptools===60.2.0
Python version
Python 3.8
OS
Ubuntu 20.04
Additional environment information
build 0.7.0
Description
Having the
cmdclass
option defined insetup.cfg
causespython -m build
to fail with aModuleNotFoundError
.Expected behavior
I expect to be able to customize/override
setuptools
commands in a project with a PEP 517-style build system with nosetup.py
.The code for the overriden/customized commands resides in a python module at the root of the repo and is being pointed out with the
cmdclass
option insetup.cfg
.How to Reproduce
python -m build
ModuleNotFoundError
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: