mtkennerly / dunamai

Dynamic versioning library and CLI
https://dunamai.readthedocs.io/en/latest
MIT License
312 stars 24 forks source link

Declare dependency on pkg_resources #7

Closed gsemet closed 3 years ago

gsemet commented 3 years ago

Hi

It looks like dunamai depends on pkg_resources which is provided by setuptools, so one needs it to be installed on the system so dynamic-poetry-versioning works.

mtkennerly commented 3 years ago

I thought this would be safe since it already came with Python by default, but I could certainly add it to Dunamai's dependency list to prevent any issues. Do you have a use case where it's not already installed or in fact must be uninstalled if present?

gsemet commented 3 years ago

I don't think this comes from python, at least it is not part of the STL (it is provided by the setuptool package). I have a use case (on docker) where fresh install has standard ubuntu python but no setuptools by default (probably because pip is too old or too recent maybe). if you only use parse_version, maybe you can remove this dependency by copying the code? Or depends on another pypi lib (pkg_resources is not even in its own package).

Or maybe add an explicit dependency on setuptools so it is installed when you install dunamai

mtkennerly commented 3 years ago

Dunamai needs parse_version and (more importantly) get_distribution, which I'd rather not have to copy in. I'll go ahead and add it as an explicit dependency.

mtkennerly commented 3 years ago

This is now fixed in v1.5.0 🎉