ckan / ckanext-spatial

Geospatial extension for CKAN
http://docs.ckan.org/projects/ckanext-spatial
126 stars 193 forks source link

Fix requirements #313

Closed avdata99 closed 1 year ago

avdata99 commented 1 year ago

related to #301 Also, related to https://github.com/pyproj4/pyproj/issues/1321 and https://github.com/cython/cython/issues/5305

It look like the new cython version is not comaptible with our pyproj version

We need to use cython<3 for pyproj==2.6.1 Also --no-use-pep517 is requirer for pyproj

Requirement files do not allow to use this parameter. GH Action files changed to test this approach CKAN 2.10 will work but previous version will need to run

pip install cython==0.29.36
pip install --no-use-pep517 pyproj==2.6.1 (or 2.2.2 for py2)

Before processing the requirements file

amercader commented 1 year ago

What a mess. If I'm reading https://github.com/pyproj4/pyproj/issues/1321 correctly this should be fixed when pyproj==6.3.1 is released in a couple months time. Let's make a note to revert the pyproj changes when that happens and require the fixed version

spwoodcock commented 1 year ago

Installing the requirements.txt prior to ckanext-spatial now breaks my build on CKAN 2.9, Python 3.9, Debian Buster.

Within my Dockerfile I first install plugin requirements.txt files, prior to installing the plugins.

I thought the issue might have been with not having pyproj-dev installed to build the wheel, but this does not fix it.

I haven't looked into the underlying issue too deeply, but my thoughts are that tracking the main branch of pyproj is probably a bad idea: https://github.com/ckan/ckanext-spatial/pull/313/files#diff-4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552R9

The line above this pins the version of pyproj, so I assume the install from the git repo was probably left over from testing and should be removed?

avdata99 commented 1 year ago

Hi @spwoodcock

A new release of pyproj is pending. Until that, installing for the main branch works for CKAN 2.10 Tests in this repository do not cover the case CKAN 2.9 + Python 3.9 The docker image for CKAN 2.9 is based on Alpine 3.13 which uses Python 3.8

For CKAN 2.9 you can try

pip install cython==0.29.36
pip install --no-use-pep517 pyproj==2.6.1

like we do in the github action test.

spwoodcock commented 1 year ago

Thanks @avdata99

I'll pin the version of ckanext-spatial to the commit before this PR for now then, until the latest pyproj is released 👍