OSGeo / grass-addons

GRASS GIS Addons Repository
https://grass.osgeo.org/grass-stable/manuals/addons/
GNU General Public License v2.0
103 stars 154 forks source link

[Bug] GDAL Python depenency fails in CI with Python 3.10 #644

Open wenzeslaus opened 2 years ago

wenzeslaus commented 2 years ago

The tests with Python 3.10 in the CI fail to install GDAL.

This may be an issue here in this repo with configuration, but it can also be an issue with the dependency.

Describe the bug

CI fails now for Python 3.10, but other things work, so this does not prevent merging of PRs.

To Reproduce

See failing actions in Code > commits or in the Actions tab.

Screenshots

The error output has a UserWarning, but it fails. I'm not sure what is wrong exactly.

 Collecting GDAL==3.0.4
  Downloading GDAL-3.0.4.tar.gz (577 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /opt/hostedtoolcache/Python/3.10.1/x64/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pbu3_8da/gdal_5e5c4428a50d4870967741a99e1cccde/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pbu3_8da/gdal_5e5c4428a50d4870967741a99e1cccde/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-a_nse7su
       cwd: /tmp/pip-install-pbu3_8da/gdal_5e5c4428a50d4870967741a99e1cccde/
  Complete output (5 lines):
  /opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'use_2to3_fixers'
    warnings.warn(msg)
  /opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'use_2to3_exclude_fixers'
    warnings.warn(msg)
  error in GDAL setup command: use_2to3 is invalid.
wenzeslaus commented 2 years ago

When I merged #640 as aa08858b5f0a141ace2e5ea363aeb3a154f05887 (adding Python 3.10), the tests with Python 3.10 passed:

https://github.com/OSGeo/grass-addons/runs/4450031137 https://github.com/OSGeo/grass-addons/runs/4450031265

wenzeslaus commented 2 years ago

In #647 (af95a23ea1e73b86a18be5f4a5220db0e4fd8eb4), I temporary removed 3.10 from the testing matrix, so the build now works again. 3.9 fails in the same way, so not testing that either (testing 3.7 and 3.8).