Closed pdelboca closed 1 year ago
The build of pyproj==2.6.1
fails for me too. I am running:
CKAN 3.10, Python 3.10.10, setuptools 67.3.2, but I also tried with the recommended version of setuptools 44.1.0. Same error.
(default) root@ckan-2-10:~# pip install --upgrade pyproj==2.6.1
Collecting pyproj==2.6.1
Using cached pyproj-2.6.1.tar.gz (528 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyproj
Building wheel for pyproj (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyproj (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [167 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-310
creating build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/datadir.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/_show_versions.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/transformer.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/geod.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/enums.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/proj.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/__main__.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/exceptions.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/utils.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/compat.py -> build/lib.linux-x86_64-cpython-310/pyproj
copying pyproj/__init__.py -> build/lib.linux-x86_64-cpython-310/pyproj
creating build/lib.linux-x86_64-cpython-310/pyproj/crs
copying pyproj/crs/_cf1x8.py -> build/lib.linux-x86_64-cpython-310/pyproj/crs
copying pyproj/crs/coordinate_operation.py -> build/lib.linux-x86_64-cpython-310/pyproj/crs
copying pyproj/crs/crs.py -> build/lib.linux-x86_64-cpython-310/pyproj/crs
copying pyproj/crs/datum.py -> build/lib.linux-x86_64-cpython-310/pyproj/crs
copying pyproj/crs/enums.py -> build/lib.linux-x86_64-cpython-310/pyproj/crs
copying pyproj/crs/coordinate_system.py -> build/lib.linux-x86_64-cpython-310/pyproj/crs
copying pyproj/crs/__init__.py -> build/lib.linux-x86_64-cpython-310/pyproj/crs
running build_ext
building 'pyproj._proj' extension
creating build/temp.linux-x86_64-cpython-310
creating build/temp.linux-x86_64-cpython-310/pyproj
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/include -I/usr/lib/ckan/default/include -I/usr/local/include/python3.10 -c pyproj/_proj.c -o build/temp.linux-x86_64-cpython-310/pyproj/_proj.o
pyproj/_proj.c: In function ‘__pyx_pf_6pyproj_5_proj_18PyBuffWriteManager_2__init__’:
pyproj/_proj.c:1580:37: warning: passing argument 1 of ‘PyObject_GetBuffer’ from incompatible pointer type [-Wincompatible-pointer-types]
1580 | __pyx_t_1 = ((PyObject_GetBuffer(((struct PyObject *)__pyx_v_data), (&__pyx_v_self->buffer), PyBUF_WRITABLE) != 0) != 0);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| struct PyObject *
In file included from /usr/local/include/python3.10/abstract.h:866,
from /usr/local/include/python3.10/genobject.h:12,
from /usr/local/include/python3.10/Python.h:110,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/abstract.h:270:46: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘struct PyObject *’
270 | PyAPI_FUNC(int) PyObject_GetBuffer(PyObject *obj, Py_buffer *view,
| ~~~~~~~~~~^~~
pyproj/_proj.c: In function ‘__pyx_tp_dealloc_6pyproj_5_proj__Proj’:
pyproj/_proj.c:6584:5: error: lvalue required as increment operand
6584 | ++Py_REFCNT(o);
| ^~
pyproj/_proj.c:6586:5: error: lvalue required as decrement operand
6586 | --Py_REFCNT(o);
| ^~
pyproj/_proj.c: In function ‘__pyx_tp_dealloc_6pyproj_5_proj_PyBuffWriteManager’:
pyproj/_proj.c:6738:5: error: lvalue required as increment operand
6738 | ++Py_REFCNT(o);
| ^~
pyproj/_proj.c:6740:5: error: lvalue required as decrement operand
6740 | --Py_REFCNT(o);
| ^~
pyproj/_proj.c: In function ‘__Pyx_ParseOptionalKeywords’:
pyproj/_proj.c:7896:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
7896 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7896:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
7896 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7896:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
7896 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7896:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
7896 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7896:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
7896 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7896:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
7896 | (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7912:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
7912 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7912:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
7912 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7912:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
7912 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7912:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
7912 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7912:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
7912 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
| ^~~~~~~~~~~~~~~~~~~
pyproj/_proj.c:7912:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
7912 | (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
| ^
In file included from /usr/local/include/python3.10/unicodeobject.h:1046,
from /usr/local/include/python3.10/Python.h:83,
from pyproj/_proj.c:31:
/usr/local/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyproj
Failed to build pyproj
ERROR: Could not build wheels for pyproj, which is required to install pyproject.toml-based projects
Install installing the latest version pyproj 3.4.1
works.
Working on this on #308
@ChristianF88 can you check if the latest master version solves your issues after #308 was merged? otherwise just create a new issue. Thanks
@ChristianF88 can you check if the latest master version solves your issues after #308 was merged? otherwise just create a new issue. Thanks
Looks good! I didn't have to manually change the pyproj
version.
The pyproj problem is back:
(default) root@bookworm:/usr/lib/ckan/default/src/ckanext-spatial# pip install -r requirements.txt
Requirement already satisfied: ckantoolkit in /usr/lib/ckan/default/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (0.0.7)
Collecting Shapely<2.0.0,>=1.2.13 (from -r requirements.txt (line 2))
Using cached Shapely-1.8.5.post1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.1 MB)
Collecting pyproj==2.6.1 (from -r requirements.txt (line 3))
Using cached pyproj-2.6.1.tar.gz (528 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [51 lines of output]
<string>:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Error compiling Cython file:
------------------------------------------------------------
...
bint free_context_on_error,
) except *:
"""
Setup the context for pyproj
"""
proj_log_func(context, NULL, pyproj_log_function)
^
------------------------------------------------------------
pyproj/_datadir.pyx:40:33: Cannot assign type 'void (void *, int, const char *) except *' to 'PJ_LOG_FUNCTION'
Error compiling Cython file:
------------------------------------------------------------
...
proj_context_destroy(context)
raise
def pyproj_global_context_initialize():
proj_log_func(NULL, NULL, pyproj_log_function)
^
------------------------------------------------------------
pyproj/_datadir.pyx:52:30: Cannot assign type 'void (void *, int, const char *) except *' to 'PJ_LOG_FUNCTION'
Traceback (most recent call last):
File "/usr/lib/ckan/default/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/lib/ckan/default/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/ckan/default/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-kjk0g_0l/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-kjk0g_0l/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-kjk0g_0l/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-kjk0g_0l/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 243, in <module>
File "<string>", line 159, in get_extension_modules
File "/tmp/pip-build-env-kjk0g_0l/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
cythonize_one(*args)
File "/tmp/pip-build-env-kjk0g_0l/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: pyproj/_datadir.pyx
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
The issue is from Cython 3 Compatibility https://github.com/pyproj4/pyproj/issues/1321 Hopefully, the bug fix will be released soon https://github.com/pyproj4/pyproj/pull/1322
The issue is from Cython 3 Compatibility pyproj4/pyproj#1321 Hopefully, the bug fix will be released soon pyproj4/pyproj#1322
Until version 3.6.1 of pyproj is released, replacing 'reqs' with this may work on >=3.9 and CKAN >2.9.
ckantoolkit
lxml>=2.3
argparse
pyparsing>=2.1.10
requests>=1.1.0
six
# requirements pyproj tempfix: https://github.com/pyproj4/pyproj/issues/1321
pyproj==2.6.1; python_version < '3.9'
pyproj @ git+https://github.com/pyproj4/pyproj.git@main; python_version >= '3.9'
Shapely==2.0.1
OWSLib==0.28.1
geojson==3.0.1
I'm having the same error Probably related to https://github.com/pyproj4/pyproj/issues/1321 and https://github.com/cython/cython/issues/5305
Checking
Hello!
I know it's not merged yet but I have been testing a little bit the new branch (https://github.com/ckan/ckanext-spatial/pull/292) and I have some issues running it. I will document them here in case it is useful for the developing process.
My stack:
ckan/ckan-solr
repositoryProblem installing proj
The pinned version of
proj==2.6.1
doesn't seems to work in my envorinment (Python 3.9), there's some documentation about installing PROJ in the official webpage although nothing of this is mentioned inckanext-spatial
docs. I was able to install the latest version of proj.Installing ckanext-harvest
In the documentation is flagged as optional but it is not possible to run
ckanext-spatial
without it. The extension tries to access it at import time.Solr backend docs
Some places of the documentation still suggest a deprecated value:
Specifically this part: https://docs.ckan.org/projects/ckanext-spatial/en/dev-v2.0/spatial-search.html#setup
Where to store the
spatial
field?The snippet suggested here didn't work for me: https://docs.ckan.org/projects/ckanext-spatial/en/dev-v2.0/spatial-search.html#dataset-extent-map
The issue is that I have stored the data in a new field using
ckanext-scheming
instead in a custom extra one. Does it need to be stored in a new field or in a extra field?Displaying of facet filter - Improvement?
The filter is being shown, however when I click to use it it is re-positioned at the top of the page forcing me to scroll up.
Search is not working for me
I'm getting:
java.lang.UnsupportedOperationException
from Solr.I'm able to display the spatial data in the dataset page:![image](https://user-images.githubusercontent.com/6672339/201382080-94629656-d932-49c5-9533-f30953c9f508.png)
But trying to search gets me an error in Solr:![image](https://user-images.githubusercontent.com/6672339/201382462-f98c6dfd-951d-463f-bb00-12351c3c0286.png)
As usual Solr errors are messy, so sorry for this: