On Wed, Oct 18, 2017, at 05:59 PM, Paul Moore wrote:
I've always used the setuptools documentation as a reference. Are you suggesting moving that information to a different location to allow/encourage other tools to implement it as a standard?
I've never used entry points myself (other than the console script entry points supported by packaging) but a quick Google search found http://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery... as the only obvious candidate for documentation (and a bit later I thought of looking under pkg_resources and found http://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points). This doesn't really say how the entry point data is stored in the project metadata, so it's not clear how I'd read that data in my own code (the answer is of course to use pkg_resources, but the point of documenting it as a standard is to allow alternative implementations).
I have in fact made an alternative implementation (PyPI package entrypoints) by 'reverse engineering' the format. A simple text-based format doesn't really justify the term 'reverse engineering', but for instance it wasn't obvious to me that the names were case sensitive, whereas Python's standard config parser treats keys as case-insensitive. Daniel:
http://setuptools.readthedocs.io/en/latest/formats.html?highlight=entry_poin...
Thanks, this link is closer than any I found to a specification. There are docs on how to create entry points in setup.py and how to use them with pkg_resources, but that's the only bit I've seen that describes the interchange file format. I think we can probably expand on it a bit, though! I'll try to put together something for packaging.python.org. Thomas