jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
376 stars 59 forks source link

fix build: only use first 2 items of setuptools.__version__.split('.') #166

Closed ghost closed 1 year ago

ghost commented 1 year ago

setuptools.__version__.split('.') can contain non digit strings, like post0 eg: setuptools.__version__ = '68.2.2.post0' which will create a ValueError when post0 is passed to int when setup.py is run.

this change modifies setup.py so it only converts the first two items from split('.') to ints.

ghost commented 1 year ago

see: https://github.com/NixOS/nixpkgs/pull/265801

jim-easterbrook commented 1 year ago

Good point! I'd not considered setuptools being anything other than a release version.