muety / pyquadkey2

🌐 Python implementation of geographical tiling using QuadKeys
https://docs.muetsch.io/pyquadkey2
Apache License 2.0
22 stars 5 forks source link

Cannot install in python 3.11 #15

Closed BrendanJM closed 8 months ago

BrendanJM commented 10 months ago

Hi there - great project, really like it! It looks like it doesn't install with python 3.11 (at least on Apple Silicon) though:

Building wheels for collected packages: pyquadkey2
  Building wheel for pyquadkey2 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [47 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-14.2-arm64-cpython-311
      creating build/lib.macosx-14.2-arm64-cpython-311/pyquadkey2
      copying src/pyquadkey2/__init__.py -> build/lib.macosx-14.2-arm64-cpython-311/pyquadkey2
      creating build/lib.macosx-14.2-arm64-cpython-311/pyquadkey2/quadkey
      copying src/pyquadkey2/quadkey/util.py -> build/lib.macosx-14.2-arm64-cpython-311/pyquadkey2/quadkey
      copying src/pyquadkey2/quadkey/__init__.py -> build/lib.macosx-14.2-arm64-cpython-311/pyquadkey2/quadkey
      running build_ext
      building 'tilesystem' extension
      creating build/temp.macosx-14.2-arm64-cpython-311
      creating build/temp.macosx-14.2-arm64-cpython-311/src
      creating build/temp.macosx-14.2-arm64-cpython-311/src/pyquadkey2
      creating build/temp.macosx-14.2-arm64-cpython-311/src/pyquadkey2/quadkey
      creating build/temp.macosx-14.2-arm64-cpython-311/src/pyquadkey2/quadkey/tilesystem
      clang -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/brendan/Projects/poibox/.venv/include -I/Users/brendan/.pyenv/versions/3.11.7/include/python3.11 -c src/pyquadkey2/quadkey/tilesystem/tilesystem.c -o build/temp.macosx-14.2-arm64-cpython-311/src/pyquadkey2/quadkey/tilesystem/tilesystem.o
      src/pyquadkey2/quadkey/tilesystem/tilesystem.c:5488:43: warning: 'ob_shash' is deprecated [-Wdeprecated-declarations]
                  hash1 = ((PyBytesObject*)s1)->ob_shash;
                                                ^
      /Users/brendan/.pyenv/versions/3.11.7/include/python3.11/cpython/bytesobject.h:7:5: note: 'ob_shash' has been explicitly marked deprecated here
          Py_DEPRECATED(3.11) Py_hash_t ob_shash;
          ^
      /Users/brendan/.pyenv/versions/3.11.7/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      src/pyquadkey2/quadkey/tilesystem/tilesystem.c:5489:43: warning: 'ob_shash' is deprecated [-Wdeprecated-declarations]
                  hash2 = ((PyBytesObject*)s2)->ob_shash;
                                                ^
      /Users/brendan/.pyenv/versions/3.11.7/include/python3.11/cpython/bytesobject.h:7:5: note: 'ob_shash' has been explicitly marked deprecated here
          Py_DEPRECATED(3.11) Py_hash_t ob_shash;
          ^
      /Users/brendan/.pyenv/versions/3.11.7/include/python3.11/pyport.h:336:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      src/pyquadkey2/quadkey/tilesystem/tilesystem.c:7421:5: error: incomplete definition of type 'struct _frame'
          __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/pyquadkey2/quadkey/tilesystem/tilesystem.c:603:62: note: expanded from macro '__Pyx_PyFrame_SetLineNumber'
        #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
                                                            ~~~~~~~^
      /Users/brendan/.pyenv/versions/3.11.7/include/python3.11/pytypedefs.h:22:16: note: forward declaration of 'struct _frame'
      typedef struct _frame PyFrameObject;
                     ^
      2 warnings and 1 error generated.
      error: command '/usr/bin/clang' 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 pyquadkey2
  Running setup.py clean for pyquadkey2
Failed to build pyquadkey2
ERROR: Could not build wheels for pyquadkey2, which is required to install pyproject.toml-based projects