jim-easterbrook / python-gphoto2

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

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

Closed ghost closed 11 months ago

ghost commented 11 months 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 11 months ago

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

jim-easterbrook commented 11 months ago

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