Bug: console_scripts installed even when extras not requested
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Summary
When [some_extra] is present in console_scripts and the package is installed using pip3 install package (without [some_extra]), the script is still installed. If the extra requires additional dependencies, then the resulting command is broken.
Steps to reproduce
Steps using a real-life example
- Get a system with
gitandpip3installed, but withoutclick,requestsortoml git clone -b cli https://github.com/Kixunil/lnurlcd lnurlsudo pip3 install lnurllnurl
Expected behavior:
lnurl: command not found error, no lnurl in /usr/local/bin
What happens
lnurl command actually exists and runs throwing exceptions about missing dependencies. Of course sudo pip3 install .[cli] installs the required dependencies, so lnurl runs fine - this works as intended.
Meta
Python version: 3.7
OS: Debian 10
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the behavior with the listed git and pip3 commands, especially installing without the extra and checking whether lnurl appears. Then trace setuptools' console_scripts handling for extras; done means a script requiring an unrequested extra is not installed, while installing with [cli] still provides a working command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100