I have this CLI tool called Rackfocus. I've published to PyPI, and I'm reasonably sure it worked just fine before. When I try to run it with current versions of Python on Mac, I get the error:
No module named rackfocus.__main__; 'rackfocus' is a package
and cannot be directly executed
All I want is one package with one entry point that users can download and use using pip.
Based on tutorials, I have this in setup.py:
packages=['rackfocus']
entry_points = {
'console_scripts': [
'rackfocus=rackfocus.run:main'
]
}
And I have a rackfocus.run:main
function, an init.py and everything. What's wrong?
You can reproduce this locally:
- Clone my repo.
- Create and activate a virtualenv (optional).
pip3 install -e .
python3 -m rackfocus