various modules use entry_points to register plugins etc. It would be neat if users could search by these strings.
eg a search for all the packages that use 'flake8.extension' entrypoint
Entry points and scripts! This feature would be great to find which PyPi package(s) exposes, say, the django-admin script (bad example, but you get the point).
Thanks for the ideas, @graingert and @Zopieux, and my apologies on the delayed reply!
For context: the folks working on Warehouse have gotten funding to concentrate on improving and deploying it, and have kicked off work towards our development roadmap -- the most urgent task is to improve Warehouse to the point where we can redirect pypi.python.org to pypi.org so the site is more sustainable and reliable.
Since this feature isn't something that the legacy site has, I've moved it to a future milestone. But it is an interesting idea. Where within the package metadata would Warehouse be able to find the strings you'd like people to be able to search for?
Thanks and sorry again for the wait.
Thanks for the feedback @brainwane!
As for the metadata we would like to be searchable, this would imply parsing:
entry_points setup() parameter, eg. for pytest the argumentpython
entry_points={'console_scripts': ['pytest=pytest:main', 'py.test=pytest:main']},
pytest and py.test); searching "by binary path" for one or the other should yield the pytest package as a resultscripts setup() parameter, eg. for ansible the argumentpython
scripts=[
'bin/ansible',
'bin/ansible-playbook',
… ],
ansible-playbook (this example is a little contrived because ansible had the good idea to namespace its binaries, but many projects do not).+1!
This would be an awesome feature for warehouse, which will benefit any framework that builds a plugin system based around entry points.
For example, packages that are pytest plugins advertise the fact by registering an entry point in the group named "pytest11". Here's an example in pyproject.toml, and here's an example in setup.py.
Unfortunately, there is currently no way (at least not that I know of) to tell if a package is a pytest plugin without actually downloading the source code and looking. There's nothing mentioning "pytest11" in here (built by flit), and nothing in there (built by setuptools) either.
I am hoping the next version of Metadata for Python Software Packages can ratify entry points so that we can really move forward here.
@wimglenn the stdlib now defines entry_points: https://docs.python.org/3/library/importlib.metadata.html#entry-points and the pypa defines it here: https://packaging.python.org/specifications/entry-points/
@graingert That is nice to see but it doesn't seem to offer anything new for the purposes of this issue, i.e. searching of PyPI packages based on their entry points.
Most helpful comment
Entry points and scripts! This feature would be great to find which PyPi package(s) exposes, say, the
django-adminscript (bad example, but you get the point).