-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
Building asteroids with bdist_apps and setuptools>=61 gives error #1394
Comments
This is due to pypa/setuptools#2887 and pypa/setuptools#2894 which introduce a mechanism to automatically populate py_modules/packages if they are absent in setup.py (which they are because we don't need them). I have no idea why automatic discovery is taking place for custom commands, though. I think we have to set py_modules to an empty list, but the discovery is taking place before our custom command even gets to run. :-/ |
I see that py2app (which is a similar tool as ours) ran into the same issue: ronaldoussoren/py2app#414 @abravalheri is there a more elegant way nowadays to disable auto-discovery in custom commands? |
See #1394 - creates a new finalize_distribution_options entry point that makes sure that either `py_modules` or `packages` is present, otherwise setuptools will activate its new auto-discovery system, even for custom commands that don't need setuptools' discovery system. However, this is not a great solution, because it applies when running all setuptools commands, not just build_apps.
For a general package, if you are using setuptools but you don't want to setuptools to process any importable package or importable module, then you need to setup either If you are working on a plugin that the most common use case is to have "package/module"-less builds and to ditch completely regular setuptools-builds... then the procedure followed by Footnotes
|
@abravalheri We have a plug-in that adds a custom command ( The If there is really no other way, we will just stick with the But really, why is automatic package discovery not limited in effect to the standard |
Closing for now since we have a workaround. If upstream has a better solution for us then we can integrate it, until then we'll just have to put a note in the manual. |
Description
Encountering this error:
Steps to Reproduce
Run
..\..\built_x64\python\python.exe setup.py bdist_apps
withsetuptools>=61.0.0
Known Workaround
Add
py_modules=[]
to the list of parameters insetup()
.Environment
The text was updated successfully, but these errors were encountered: