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

Requires setuptools #8

Closed
honzajavorek opened this issue Nov 28, 2022 · 3 comments
Closed

Requires setuptools #8

honzajavorek opened this issue Nov 28, 2022 · 3 comments

Comments

@honzajavorek
Copy link

Hi! I installed the package using Poetry 1.2.2 and Python 3.10.6 (macOS, homebrew, pyenv). Running strava-offline results in:

Traceback (most recent call last):
  File "/Users/honza/Library/Caches/pypoetry/virtualenvs/honzajavorekcz-99qNy8GJ-py3.10/bin/strava-offline", line 5, in <module>
    from strava_offline.cli import cli
  File "/Users/honza/Library/Caches/pypoetry/virtualenvs/honzajavorekcz-99qNy8GJ-py3.10/lib/python3.10/site-packages/strava_offline/__init__.py", line 2, in <module>
    from pkg_resources import get_distribution, DistributionNotFound
ModuleNotFoundError: No module named 'pkg_resources'

I found this solution:

$ poetry add setuptools
$ poetry add strava-offline

Then running strava-offline lists its commands. Not sure whether this is expected behavior or a bug.

@liskin liskin closed this as completed in 15930d4 Nov 28, 2022
liskin added a commit that referenced this issue Nov 28, 2022
This would've caught the undeclared setuptools dependency fixed in the
previous commit.

Related: #8
@liskin
Copy link
Owner

liskin commented Nov 28, 2022

Not really expected, there was an undeclared runtime dependency on setuptools. That may have been fine in the Python packaging world in the past, or maybe not, I really don't know. Switched to importlib.metadata and added a test for this. Should be fine now. Will port to my other Python projects later. Do you need me to push a PyPI release immediately?

@liskin
Copy link
Owner

liskin commented Nov 28, 2022

Actually, there was an unreleased bugfix here for a while so I did a release anyway.

@honzajavorek
Copy link
Author

Thanks! Having setuptools in my own dependencies was enough as a workaround, but this is, of course, awesome :)

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

No branches or pull requests

2 participants