Skip to content

Stop installing the dotenv console script on a plain pip install - #689

Open
gyanu2507 wants to merge 1 commit into
theskumar:mainfrom
gyanu2507:drop-base-dotenv-script
Open

Stop installing the dotenv console script on a plain pip install#689
gyanu2507 wants to merge 1 commit into
theskumar:mainfrom
gyanu2507:drop-base-dotenv-script

Conversation

@gyanu2507

Copy link
Copy Markdown

The [cli] extra is supposed to be what gives you the CLI, but the wheel always installed a dotenv script. That script then died with "not installed with cli option" if click wasn't in that environment.

In the setup from #683 that's the conda env's stub winning over a user-level python-dotenv[cli]. Pip installs the same wheel for both extras, so the script cannot actually be extra-gated. Dropping it from the base package and using python -m dotenv (after pip install python-dotenv[cli]) is the option that doesn't leave a fake command on PATH.

__main__.py still reports itself as dotenv so --version output stays the same.

Fixes #683

A conda/venv install without the cli extra was dropping a stub `dotenv`
on PATH that hid a working user-level python-dotenv[cli]. Drive the CLI
with python -m dotenv instead.
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 this pull request may close these issues.

python-dotenv installation without cli masks python-dotenv cli

1 participant