I had this in my setup.py:
from setuptools import setup, find_packages
setup(
name="mycli",
packages=find_packages(),
entry_points={
"console_scripts": [
"mycli = myproject.main:program.run"
]
},
)
After installing my package with pip I was able to run mycli
from the shell and it executed my python app.
But I'm switching to setup.cfg.
My setup.py now looks like this:
from setuptools import setup
setup()
And my setup.cfg has this in it:
[options.entry_points]
console_scripts =
mycli = myproject.main:program.run
When installing it locally with pip mycli cannot be found. From what I have read my setup.cfg is correctly configured. Is there something I am missing that is causing the setup.cfg config to not create the entry point correctly?
After installing if I run pip show --verbose mycli
I see the correct entrypoints in the configuration.
EDIT
Per the comments if I run pip show --files mycli | grep mycli
I see this:
Location: /Users/me/.pyenv/versions/3.10.0/lib/python3.10/site-packages
../../../bin/mycli
I am able to run ./Users/me/.pyenv/versions/3.10.0/bin/mycli
Looks like I was just missing some path settings with my pyenv setup probably not related to setup.cfg at all. Looks like this issue: Interpreters installed via pyenv are not added to $PATH