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
Originally reported by: adrian (Bitbucket: adrian, GitHub: adrian)
When building a namespace package, Setuptools checks (by searching in the code) whether the __init__.py therein calls declare_namespace from pkg_resources. If it doesn't it, it logs a warning, emitted here, which reads:
WARNING: (package) is a namespace package, but its init.py does not declare_namespace(); setuptools 0.7 will REQUIRE this! (See the setuptools manual under "Namespace Packages" for details.)
First of all, setuptools 0.7 now exists, so the future tense is somewhat worrisome. Also, I'm not sure whether requiring a declare_namespace call is actually in the plans anymore. (My package, for example, accomplishes namespace packages using pkgutil.extend_path from the standard library instead.) Some clarification, either in the warning or the docs, about what the plans are here would be helpful.
Original comment byjaraco (Bitbucket: jaraco, GitHub: jaraco):
Good find. Yes, it does say that, but setuptools 0.7 is now meeting a different goal, and if there was code that removed the compatibility and warning, it's not part of this 0.7 release. I'll comb through the 'setuptools' branch (which was not merged and was originally slated for 0.7) and see if there's a corresponding changeset.
Secondarily, we need to determine what's the proper thing to do about this warning and behavior. If it should be kept, it should be slated for setuptools 1.0 or later major increment release (per semantic versioning).
I seem to think pkgutil.extend_path and pkg_resources.declare_namespace meet similar goals but from a different perspective. My hunch tells me that if the package is declared to be a namespace package (in the metadata), that's a setuptools feature and may be enforced by setuptools. I'll have to learn more.
In the meantime, if anyone can shed some light on the issue, please feel free to do so.
Original comment bypje (Bitbucket: pje, GitHub: pje):
I don't see any issues with it, but to properly support PEP 420-style namespace packages (Python 3.3+), there are more changes needed. Notably, setuptools needs to be able to handle packages without an __init__.py, and to thus not do its special __init__.py handling for them. In addition, declare_namespace() is going to need to be a lot smarter. These are not really issues with this, though.
* Require toml extra for setuptools_scm
setuptools_scm does not know to invoke itself
if it can't read pyproject.toml. This broke
sdist installs for projects deriving from skeleton:
$ python -m pip install zipp --no-binary zipp
Successfully installed zipp-0.0.0
Note the version number defaulting to '0.0.0'.
Building locally only works because pep517,
the build tool, depends on toml which it exposes
to the build environment.
* Require setuptools_scm 3.4.1 at a minimum
does not work in 3.4.0.
* fixup! Require toml extra for setuptools_scm
* fixup! Require setuptools_scm 3.4.1 at a minimum