geopandas / pyogrio

Vectorized vector I/O using OGR
https://pyogrio.readthedocs.io
MIT License
276 stars 24 forks source link

BUG: failure during parsing GDAL version number on windows during setup #500

Closed brendan-ward closed 16 hours ago

brendan-ward commented 2 days ago

Per our latest CI failures with conda-forge on Windows:

...setuptools\build_meta.py", line 320, in run_setup
      exec(code, locals())
    File "<string>", line 156, in <module>
    File "<string>", line 156, in <genexpr>
  ValueError: invalid literal for int() with base 10: ''
  [end of output]

If I follow, it is failing on line 156 of setup.py:

gdal_version = tuple(int(i) for i in gdal_version_str.strip("dev").split("."))

The GDAL version in conda-forge used here looks valid, so I'm not yet sure why this is failing to parse.

brendan-ward commented 2 days ago

The issue is that for the Windows conda test runner we are setting the version via an environment variable that doesn't account for the longer version number of 3.10.x:

GDAL_VERSION=$(gdalinfo --version | cut -c 6-10)

This returns "3.10.", which then fails to parse.

jorisvandenbossche commented 1 day ago

Ah, good catch!