Skip to content
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

Python generators: Add setuptools dependency for console_script entry points #664

Closed
hroncok opened this issue Apr 16, 2019 · 3 comments · Fixed by #666
Closed

Python generators: Add setuptools dependency for console_script entry points #664

hroncok opened this issue Apr 16, 2019 · 3 comments · Fixed by #666

Comments

@hroncok
Copy link
Contributor

hroncok commented Apr 16, 2019

Almost no upstream specifies setuptools in install_requires. I guess that it is pretty straight forward upstream that if you pip install stuff, you already got setuptools installed.

However, the console_scripts entry points are de-facto standard now and they import from pkg_resources (part of setuptools).

Packages with console_scripts entry points need setuptools on runtime.

It is possible to see console_scripts entry points metadata and hence it is possible to require setuptools for packages with entry_points.

Example: https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/YR6OG5CULN42R5FPKHWUASEGDWMABC5K/

@hroncok
Copy link
Contributor Author

hroncok commented Apr 16, 2019

Example metadata:

$ cat %{buildroot}%{python3_sitelib}/fedpkg-1.36-py3.7.egg-info/entry_points.txt 
[console_scripts]
fedpkg = fedpkg.__main__:main
fedpkg-stage = fedpkg.__main__:main

Other possibility:

$ grep EASY-INSTALL-ENTRY-SCRIPT %{buildroot}%{bindir}/*
# EASY-INSTALL-ENTRY-SCRIPT: 'fedpkg==1.36','console_scripts','fedpkg'

@ignatenkobrain
Copy link
Contributor

is it possible knowing that using pkg_resources API?

@hroncok
Copy link
Contributor Author

hroncok commented Apr 16, 2019

Yes, working on it.

ffesti pushed a commit to ffesti/rpm that referenced this issue Feb 18, 2020
ffesti pushed a commit to ffesti/rpm that referenced this issue Mar 2, 2020
ffesti pushed a commit to ffesti/rpm that referenced this issue Mar 23, 2020
pmatilai pushed a commit that referenced this issue Mar 26, 2020
hroncok added a commit to rpm-software-management/python-rpm-packaging that referenced this issue Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants