Giter Club home page Giter Club logo

convertbng's Issues

Ubuntu 18.04 64bit: Illegal instruction (core dumped)

I have been using convertbng on a windows machine successfully and I attempted to move my code onto an ubuntu server and get an "Illegal instruction (core dumped)" error every time I try to call any function in this library.

I even tried with a very simple test case and then had the same issue. The following code works fine on the windows device but not on the linux server:

from convertbng.util import convert_bng
convert_bng([-1.89983], [52.48142])

Cheers,

Error installing on Mac with python 3.9

I followed the instructions and get the following error:

% pip install convertbng
Collecting convertbng
  Using cached convertbng-0.4.14.tar.gz (11.4 MB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.9.0 in /usr/local/anaconda3/envs/ox/lib/python3.9/site-packages (from convertbng) (1.21.2)
Building wheels for collected packages: convertbng
  Building wheel for convertbng (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/anaconda3/envs/ox/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-install-s41uf3lb/convertbng_58adb7d95e09486fb5ede4ee063e7f51/setup.py'"'"'; __file__='"'"'/private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-install-s41uf3lb/convertbng_58adb7d95e09486fb5ede4ee063e7f51/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'"'"'))' bdist_wheel -d /private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-wheel-vmdzykbb
       cwd: /private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-install-s41uf3lb/convertbng_58adb7d95e09486fb5ede4ee063e7f51/
  Complete output (322 lines):
  running bdist_wheel
  The [wheel] section is deprecated. Use [bdist_wheel] instead.
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.9
  creating build/lib.macosx-10.9-x86_64-3.9/convertbng
  copying convertbng/util.py -> build/lib.macosx-10.9-x86_64-3.9/convertbng
  copying convertbng/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/convertbng
  running egg_info
  writing convertbng.egg-info/PKG-INFO
  writing dependency_links to convertbng.egg-info/dependency_links.txt
  writing requirements to convertbng.egg-info/requires.txt
  writing top-level names to convertbng.egg-info/top_level.txt
  reading manifest file 'convertbng.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'license.txt'
  warning: no files found matching 'README.md'
  warning: no files found matching 'ostn002_s.gif'
  writing manifest file 'convertbng.egg-info/SOURCES.txt'
  copying convertbng/convertbng_p.pxd -> build/lib.macosx-10.9-x86_64-3.9/convertbng
  copying convertbng/cutil.c -> build/lib.macosx-10.9-x86_64-3.9/convertbng
  copying convertbng/cutil.pyx -> build/lib.macosx-10.9-x86_64-3.9/convertbng
  copying convertbng/liblonlat_bng.dylib -> build/lib.macosx-10.9-x86_64-3.9/convertbng
  copying convertbng/liblonlat_bng.so -> build/lib.macosx-10.9-x86_64-3.9/convertbng
  copying convertbng/rlib.h -> build/lib.macosx-10.9-x86_64-3.9/convertbng
  running build_ext
  building 'convertbng.cutil' extension
  creating build/temp.macosx-10.9-x86_64-3.9
  creating build/temp.macosx-10.9-x86_64-3.9/convertbng
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /usr/local/anaconda3/envs/ox/include -fPIC -O2 -isystem /usr/local/anaconda3/envs/ox/include -I/usr/local/opt/icu4c/include -I. -Iconvertbng -I/usr/local/anaconda3/envs/ox/include/python3.9 -c convertbng/cutil.c -o build/temp.macosx-10.9-x86_64-3.9/convertbng/cutil.o -O3
  convertbng/cutil.c:15295:94: error: no member named 'tp_print' in 'struct _typeobject'
    __pyx_type_10convertbng_5cutil___pyx_scope_struct____pyx_f_10convertbng_5cutil_ffi_wrapper.tp_print = 0;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
  convertbng/cutil.c:15300:26: error: no member named 'tp_print' in 'struct _typeobject'
    __pyx_type___pyx_array.tp_print = 0;
    ~~~~~~~~~~~~~~~~~~~~~~ ^
  convertbng/cutil.c:15304:32: error: no member named 'tp_print' in 'struct _typeobject'
    __pyx_type___pyx_MemviewEnum.tp_print = 0;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
  convertbng/cutil.c:15315:31: error: no member named 'tp_print' in 'struct _typeobject'
    __pyx_type___pyx_memoryview.tp_print = 0;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
  convertbng/cutil.c:15324:36: error: no member named 'tp_print' in 'struct _typeobject'
    __pyx_type___pyx_memoryviewslice.tp_print = 0;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
  convertbng/cutil.c:15743:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                      (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                       ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
        PyUnicode_WSTR_LENGTH(op) :                    \
        ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
  #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                    ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3)
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15743:22: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                      (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                       ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
        ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
               ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15743:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                      (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                       ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
         PyUnicode_WSTR_LENGTH(op)))
         ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
  #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                    ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3)
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15743:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                      (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                     ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
        PyUnicode_WSTR_LENGTH(op) :                    \
        ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
  #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                    ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3)
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15743:52: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                      (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                     ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
        ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
               ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15743:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                      (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                     ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
         PyUnicode_WSTR_LENGTH(op)))
         ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
  #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                    ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3)
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15759:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
        PyUnicode_WSTR_LENGTH(op) :                    \
        ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
  #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                    ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3)
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15759:26: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
        ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
               ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15759:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
         PyUnicode_WSTR_LENGTH(op)))
         ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
  #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                    ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3)
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15759:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                            ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
        PyUnicode_WSTR_LENGTH(op) :                    \
        ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
  #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                    ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3)
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15759:59: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                            ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
        ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
               ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:15759:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                            ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
         PyUnicode_WSTR_LENGTH(op)))
         ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
  #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                    ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3)
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:17096:9: warning: 'PyCFunction_Call' is deprecated [-Wdeprecated-declarations]
          return PyCFunction_Call(func, arg, kw);
                 ^
  /usr/local/anaconda3/envs/ox/include/python3.9/methodobject.h:33:1: note: 'PyCFunction_Call' has been explicitly marked deprecated here
  Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:17161:41: warning: 'PyCFunction_Call' is deprecated [-Wdeprecated-declarations]
      __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
                                          ^
  /usr/local/anaconda3/envs/ox/include/python3.9/methodobject.h:33:1: note: 'PyCFunction_Call' has been explicitly marked deprecated here
  Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:17575:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]
          return PyUnicode_FromUnicode(NULL, 0);
                 ^
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
  Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
  ^
  /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
  #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                       ^
  convertbng/cutil.c:17618:21: error: no member named 'exc_type' in 'struct _ts'
      *type = tstate->exc_type;
              ~~~~~~  ^
  convertbng/cutil.c:17619:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      *value = tstate->exc_value;
                       ^~~~~~~~~
                       curexc_value
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  convertbng/cutil.c:17620:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      *tb = tstate->exc_traceback;
                    ^~~~~~~~~~~~~
                    curexc_traceback
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:81:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  convertbng/cutil.c:17627:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  convertbng/cutil.c:17628:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  convertbng/cutil.c:17629:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:81:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  convertbng/cutil.c:17630:13: error: no member named 'exc_type' in 'struct _ts'
      tstate->exc_type = type;
      ~~~~~~  ^
  convertbng/cutil.c:17631:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tstate->exc_value = value;
              ^~~~~~~~~
              curexc_value
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  convertbng/cutil.c:17632:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tstate->exc_traceback = tb;
              ^~~~~~~~~~~~~
              curexc_traceback
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:81:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  convertbng/cutil.c:17687:24: error: no member named 'exc_type' in 'struct _ts'
      tmp_type = tstate->exc_type;
                 ~~~~~~  ^
  convertbng/cutil.c:17688:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tmp_value = tstate->exc_value;
                          ^~~~~~~~~
                          curexc_value
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  convertbng/cutil.c:17689:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
      tmp_tb = tstate->exc_traceback;
                       ^~~~~~~~~~~~~
                       curexc_traceback
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:81:15: note: 'curexc_traceback' declared here
      PyObject *curexc_traceback;
                ^
  convertbng/cutil.c:17690:13: error: no member named 'exc_type' in 'struct _ts'
      tstate->exc_type = local_type;
      ~~~~~~  ^
  convertbng/cutil.c:17691:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
      tstate->exc_value = local_value;
              ^~~~~~~~~
              curexc_value
  /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
      PyObject *curexc_value;
                ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  15 warnings and 20 errors generated.
  error: command '/usr/bin/clang' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for convertbng
  Running setup.py clean for convertbng
Failed to build convertbng
Installing collected packages: convertbng
    Running setup.py install for convertbng ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/anaconda3/envs/ox/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-install-s41uf3lb/convertbng_58adb7d95e09486fb5ede4ee063e7f51/setup.py'"'"'; __file__='"'"'/private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-install-s41uf3lb/convertbng_58adb7d95e09486fb5ede4ee063e7f51/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'"'"'))' install --record /private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-record-qng84efr/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/anaconda3/envs/ox/include/python3.9/convertbng
         cwd: /private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-install-s41uf3lb/convertbng_58adb7d95e09486fb5ede4ee063e7f51/
    Complete output (321 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.9
    creating build/lib.macosx-10.9-x86_64-3.9/convertbng
    copying convertbng/util.py -> build/lib.macosx-10.9-x86_64-3.9/convertbng
    copying convertbng/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/convertbng
    running egg_info
    writing convertbng.egg-info/PKG-INFO
    writing dependency_links to convertbng.egg-info/dependency_links.txt
    writing requirements to convertbng.egg-info/requires.txt
    writing top-level names to convertbng.egg-info/top_level.txt
    reading manifest file 'convertbng.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'license.txt'
    warning: no files found matching 'README.md'
    warning: no files found matching 'ostn002_s.gif'
    writing manifest file 'convertbng.egg-info/SOURCES.txt'
    copying convertbng/convertbng_p.pxd -> build/lib.macosx-10.9-x86_64-3.9/convertbng
    copying convertbng/cutil.c -> build/lib.macosx-10.9-x86_64-3.9/convertbng
    copying convertbng/cutil.pyx -> build/lib.macosx-10.9-x86_64-3.9/convertbng
    copying convertbng/liblonlat_bng.dylib -> build/lib.macosx-10.9-x86_64-3.9/convertbng
    copying convertbng/liblonlat_bng.so -> build/lib.macosx-10.9-x86_64-3.9/convertbng
    copying convertbng/rlib.h -> build/lib.macosx-10.9-x86_64-3.9/convertbng
    running build_ext
    building 'convertbng.cutil' extension
    creating build/temp.macosx-10.9-x86_64-3.9
    creating build/temp.macosx-10.9-x86_64-3.9/convertbng
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /usr/local/anaconda3/envs/ox/include -fPIC -O2 -isystem /usr/local/anaconda3/envs/ox/include -I/usr/local/opt/icu4c/include -I. -Iconvertbng -I/usr/local/anaconda3/envs/ox/include/python3.9 -c convertbng/cutil.c -o build/temp.macosx-10.9-x86_64-3.9/convertbng/cutil.o -O3
    convertbng/cutil.c:15295:94: error: no member named 'tp_print' in 'struct _typeobject'
      __pyx_type_10convertbng_5cutil___pyx_scope_struct____pyx_f_10convertbng_5cutil_ffi_wrapper.tp_print = 0;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    convertbng/cutil.c:15300:26: error: no member named 'tp_print' in 'struct _typeobject'
      __pyx_type___pyx_array.tp_print = 0;
      ~~~~~~~~~~~~~~~~~~~~~~ ^
    convertbng/cutil.c:15304:32: error: no member named 'tp_print' in 'struct _typeobject'
      __pyx_type___pyx_MemviewEnum.tp_print = 0;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    convertbng/cutil.c:15315:31: error: no member named 'tp_print' in 'struct _typeobject'
      __pyx_type___pyx_memoryview.tp_print = 0;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    convertbng/cutil.c:15324:36: error: no member named 'tp_print' in 'struct _typeobject'
      __pyx_type___pyx_memoryviewslice.tp_print = 0;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    convertbng/cutil.c:15743:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                        (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                         ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
          PyUnicode_WSTR_LENGTH(op) :                    \
          ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
    #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                      ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3)
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15743:22: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                        (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                         ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
          ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                 ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15743:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                        (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                         ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
           PyUnicode_WSTR_LENGTH(op)))
           ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
    #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                      ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3)
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15743:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                        (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                       ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
          PyUnicode_WSTR_LENGTH(op) :                    \
          ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
    #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                      ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3)
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15743:52: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                        (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                       ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
          ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                 ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15743:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                        (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                       ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
           PyUnicode_WSTR_LENGTH(op)))
           ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
    #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                      ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3)
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15759:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                            (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                             ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
          PyUnicode_WSTR_LENGTH(op) :                    \
          ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
    #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                      ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3)
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15759:26: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                            (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                             ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
          ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                 ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15759:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                            (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                             ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
           PyUnicode_WSTR_LENGTH(op)))
           ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
    #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                      ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3)
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15759:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                            (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                              ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
          PyUnicode_WSTR_LENGTH(op) :                    \
          ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
    #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                      ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3)
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15759:59: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                            (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                              ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
          ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                 ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:15759:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                            (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                              ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
           PyUnicode_WSTR_LENGTH(op)))
           ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
    #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                      ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3)
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:17096:9: warning: 'PyCFunction_Call' is deprecated [-Wdeprecated-declarations]
            return PyCFunction_Call(func, arg, kw);
                   ^
    /usr/local/anaconda3/envs/ox/include/python3.9/methodobject.h:33:1: note: 'PyCFunction_Call' has been explicitly marked deprecated here
    Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:17161:41: warning: 'PyCFunction_Call' is deprecated [-Wdeprecated-declarations]
        __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
                                            ^
    /usr/local/anaconda3/envs/ox/include/python3.9/methodobject.h:33:1: note: 'PyCFunction_Call' has been explicitly marked deprecated here
    Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:17575:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]
            return PyUnicode_FromUnicode(NULL, 0);
                   ^
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
    Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
    ^
    /usr/local/anaconda3/envs/ox/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
    #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                         ^
    convertbng/cutil.c:17618:21: error: no member named 'exc_type' in 'struct _ts'
        *type = tstate->exc_type;
                ~~~~~~  ^
    convertbng/cutil.c:17619:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        *value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17620:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        *tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:81:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17627:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    convertbng/cutil.c:17628:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17629:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:81:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17630:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = type;
        ~~~~~~  ^
    convertbng/cutil.c:17631:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = value;
                ^~~~~~~~~
                curexc_value
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17632:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:81:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17687:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    convertbng/cutil.c:17688:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17689:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:81:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17690:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = local_type;
        ~~~~~~  ^
    convertbng/cutil.c:17691:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = local_value;
                ^~~~~~~~~
                curexc_value
    /usr/local/anaconda3/envs/ox/include/python3.9/cpython/pystate.h:80:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    15 warnings and 20 errors generated.
    error: command '/usr/bin/clang' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/anaconda3/envs/ox/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-install-s41uf3lb/convertbng_58adb7d95e09486fb5ede4ee063e7f51/setup.py'"'"'; __file__='"'"'/private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-install-s41uf3lb/convertbng_58adb7d95e09486fb5ede4ee063e7f51/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'"'"'))' install --record /private/var/folders/69/yzd_1s491f11q4sy0w00msy80000gn/T/pip-record-qng84efr/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/anaconda3/envs/ox/include/python3.9/convertbng Check the logs for full command output.

Instructions for installation on FreeBSD please

Hi,

I am attempting to install this on FreeBSD and I am having some trouble: could instructions be given for how to do this please?

My first attempt was a simple pip install --user convertbng which produced the following output:

Collecting convertbng
  Downloading convertbng-0.4.14.tar.gz (11.4 MB)
     |████████████████████████████████| 11.4 MB 5.9 MB/s 
Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.7/site-packages (from convertbng) (1.16.6)
Using legacy 'setup.py install' for convertbng, since package 'wheel' is not installed.
Installing collected packages: convertbng
    Running setup.py install for convertbng ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0w8bv9zb/convertbng/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0w8bv9zb/convertbng/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-iqzv5ow2/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/foobar/.local/include/python3.7m/convertbng
         cwd: /tmp/pip-install-0w8bv9zb/convertbng/
    Complete output (138 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7
    creating build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/__init__.py -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/util.py -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    running egg_info
    writing convertbng.egg-info/PKG-INFO
    writing dependency_links to convertbng.egg-info/dependency_links.txt
    writing requirements to convertbng.egg-info/requires.txt
    writing top-level names to convertbng.egg-info/top_level.txt
    reading manifest file 'convertbng.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'license.txt'
    warning: no files found matching 'README.md'
    warning: no files found matching 'ostn002_s.gif'
    writing manifest file 'convertbng.egg-info/SOURCES.txt'
    copying convertbng/convertbng_p.pxd -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/cutil.c -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/cutil.pyx -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/liblonlat_bng.dylib -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/liblonlat_bng.so -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/rlib.h -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    running build_ext
    building 'convertbng.cutil' extension
    creating build/temp.freebsd-12.2-RELEASE-p3-amd64-3.7
    creating build/temp.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -march=native -fstack-protector-strong -fno-strict-aliasing -fPIC -I./convertbng -I. -Iconvertbng -I/usr/local/include/python3.7m -c convertbng/cutil.c -o build/temp.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng/cutil.o -O3
    convertbng/cutil.c:17618:21: error: no member named 'exc_type' in 'struct _ts'
        *type = tstate->exc_type;
                ~~~~~~  ^
    convertbng/cutil.c:17619:22: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        *value = tstate->exc_value;
                         ^~~~~~~~~
                         curexc_value
    /usr/local/include/python3.7m/pystate.h:241:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17620:19: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        *tb = tstate->exc_traceback;
                      ^~~~~~~~~~~~~
                      curexc_traceback
    /usr/local/include/python3.7m/pystate.h:242:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17627:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    convertbng/cutil.c:17628:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /usr/local/include/python3.7m/pystate.h:241:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17629:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /usr/local/include/python3.7m/pystate.h:242:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17630:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = type;
        ~~~~~~  ^
    convertbng/cutil.c:17631:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = value;
                ^~~~~~~~~
                curexc_value
    /usr/local/include/python3.7m/pystate.h:241:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17632:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /usr/local/include/python3.7m/pystate.h:242:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17687:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    convertbng/cutil.c:17688:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /usr/local/include/python3.7m/pystate.h:241:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17689:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /usr/local/include/python3.7m/pystate.h:242:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17690:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = local_type;
        ~~~~~~  ^
    convertbng/cutil.c:17691:13: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tstate->exc_value = local_value;
                ^~~~~~~~~
                curexc_value
    /usr/local/include/python3.7m/pystate.h:241:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17692:13: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tstate->exc_traceback = local_tb;
                ^~~~~~~~~~~~~
                curexc_traceback
    /usr/local/include/python3.7m/pystate.h:242:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17714:24: error: no member named 'exc_type' in 'struct _ts'
        tmp_type = tstate->exc_type;
                   ~~~~~~  ^
    convertbng/cutil.c:17715:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
        tmp_value = tstate->exc_value;
                            ^~~~~~~~~
                            curexc_value
    /usr/local/include/python3.7m/pystate.h:241:15: note: 'curexc_value' declared here
        PyObject *curexc_value;
                  ^
    convertbng/cutil.c:17716:22: error: no member named 'exc_traceback' in 'struct _ts'; did you mean 'curexc_traceback'?
        tmp_tb = tstate->exc_traceback;
                         ^~~~~~~~~~~~~
                         curexc_traceback
    /usr/local/include/python3.7m/pystate.h:242:15: note: 'curexc_traceback' declared here
        PyObject *curexc_traceback;
                  ^
    convertbng/cutil.c:17717:13: error: no member named 'exc_type' in 'struct _ts'
        tstate->exc_type = *type;
        ~~~~~~  ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    error: command 'cc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0w8bv9zb/convertbng/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0w8bv9zb/convertbng/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-iqzv5ow2/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/foobar/.local/include/python3.7m/convertbng Check the logs for full command output.

I suspected that it was not compatible with the default compiler, so I set $CC to "/usr/local/bin/gcc10" and tried again, which produced the following output:

Collecting convertbng
  Using cached convertbng-0.4.14.tar.gz (11.4 MB)
Requirement already satisfied: numpy>=1.9.0 in /usr/local/lib/python3.7/site-packages (from convertbng) (1.16.6)
Using legacy 'setup.py install' for convertbng, since package 'wheel' is not installed.
Installing collected packages: convertbng
    Running setup.py install for convertbng ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1ja939i9/convertbng/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1ja939i9/convertbng/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-k4sou7is/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/foobar/.local/include/python3.7m/convertbng
         cwd: /tmp/pip-install-1ja939i9/convertbng/
    Complete output (119 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7
    creating build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/__init__.py -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/util.py -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    running egg_info
    writing convertbng.egg-info/PKG-INFO
    writing dependency_links to convertbng.egg-info/dependency_links.txt
    writing requirements to convertbng.egg-info/requires.txt
    writing top-level names to convertbng.egg-info/top_level.txt
    reading manifest file 'convertbng.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'license.txt'
    warning: no files found matching 'README.md'
    warning: no files found matching 'ostn002_s.gif'
    writing manifest file 'convertbng.egg-info/SOURCES.txt'
    copying convertbng/convertbng_p.pxd -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/cutil.c -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/cutil.pyx -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/liblonlat_bng.dylib -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/liblonlat_bng.so -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    copying convertbng/rlib.h -> build/lib.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    running build_ext
    building 'convertbng.cutil' extension
    creating build/temp.freebsd-12.2-RELEASE-p3-amd64-3.7
    creating build/temp.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng
    /usr/local/bin/gcc10 -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -march=native -fstack-protector-strong -fno-strict-aliasing -fPIC -I./convertbng -I. -Iconvertbng -I/usr/local/include/python3.7m -c convertbng/cutil.c -o build/temp.freebsd-12.2-RELEASE-p3-amd64-3.7/convertbng/cutil.o -O3
    convertbng/cutil.c: In function '__Pyx__ExceptionSave':
    convertbng/cutil.c:17618:21: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
    17618 |     *type = tstate->exc_type;
          |                     ^~~~~~~~
          |                     curexc_type
    convertbng/cutil.c:17619:22: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
    17619 |     *value = tstate->exc_value;
          |                      ^~~~~~~~~
          |                      curexc_value
    convertbng/cutil.c:17620:19: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
    17620 |     *tb = tstate->exc_traceback;
          |                   ^~~~~~~~~~~~~
          |                   curexc_traceback
    convertbng/cutil.c: In function '__Pyx__ExceptionReset':
    convertbng/cutil.c:17627:24: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
    17627 |     tmp_type = tstate->exc_type;
          |                        ^~~~~~~~
          |                        curexc_type
    convertbng/cutil.c:17628:25: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
    17628 |     tmp_value = tstate->exc_value;
          |                         ^~~~~~~~~
          |                         curexc_value
    convertbng/cutil.c:17629:22: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
    17629 |     tmp_tb = tstate->exc_traceback;
          |                      ^~~~~~~~~~~~~
          |                      curexc_traceback
    convertbng/cutil.c:17630:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
    17630 |     tstate->exc_type = type;
          |             ^~~~~~~~
          |             curexc_type
    convertbng/cutil.c:17631:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
    17631 |     tstate->exc_value = value;
          |             ^~~~~~~~~
          |             curexc_value
    convertbng/cutil.c:17632:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
    17632 |     tstate->exc_traceback = tb;
          |             ^~~~~~~~~~~~~
          |             curexc_traceback
    convertbng/cutil.c: In function '__Pyx__GetException':
    convertbng/cutil.c:17687:24: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
    17687 |     tmp_type = tstate->exc_type;
          |                        ^~~~~~~~
          |                        curexc_type
    convertbng/cutil.c:17688:25: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
    17688 |     tmp_value = tstate->exc_value;
          |                         ^~~~~~~~~
          |                         curexc_value
    convertbng/cutil.c:17689:22: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
    17689 |     tmp_tb = tstate->exc_traceback;
          |                      ^~~~~~~~~~~~~
          |                      curexc_traceback
    convertbng/cutil.c:17690:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
    17690 |     tstate->exc_type = local_type;
          |             ^~~~~~~~
          |             curexc_type
    convertbng/cutil.c:17691:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
    17691 |     tstate->exc_value = local_value;
          |             ^~~~~~~~~
          |             curexc_value
    convertbng/cutil.c:17692:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
    17692 |     tstate->exc_traceback = local_tb;
          |             ^~~~~~~~~~~~~
          |             curexc_traceback
    convertbng/cutil.c: In function '__Pyx__ExceptionSwap':
    convertbng/cutil.c:17714:24: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
    17714 |     tmp_type = tstate->exc_type;
          |                        ^~~~~~~~
          |                        curexc_type
    convertbng/cutil.c:17715:25: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
    17715 |     tmp_value = tstate->exc_value;
          |                         ^~~~~~~~~
          |                         curexc_value
    convertbng/cutil.c:17716:22: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
    17716 |     tmp_tb = tstate->exc_traceback;
          |                      ^~~~~~~~~~~~~
          |                      curexc_traceback
    convertbng/cutil.c:17717:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?
    17717 |     tstate->exc_type = *type;
          |             ^~~~~~~~
          |             curexc_type
    convertbng/cutil.c:17718:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_value'; did you mean 'curexc_value'?
    17718 |     tstate->exc_value = *value;
          |             ^~~~~~~~~
          |             curexc_value
    convertbng/cutil.c:17719:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
    17719 |     tstate->exc_traceback = *tb;
          |             ^~~~~~~~~~~~~
          |             curexc_traceback
    error: command '/usr/local/bin/gcc10' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1ja939i9/convertbng/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1ja939i9/convertbng/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-k4sou7is/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/foobar/.local/include/python3.7m/convertbng Check the logs for full command output.

Do you have any ideas for how to solve this?

Thank you

Windows 10 64 bits installation trouble

Hi, on windows i try without success to install directly frmo github like you say in the install notes.

i'm with python 3.8.0 and a venv

Below is a copy of my console screen
best regards
Lou

`(venv) C:\Users\Lou\PycharmProjects\pythonpur\venv>pip install git+git://github.com/urschrei/convertbng.git
Collecting git+git://github.com/urschrei/convertbng.git
Cloning git://github.com/urschrei/convertbng.git to c:\users\lou\appdata\local\temp\pip-req-build-61jmj1ne
Running command git clone -q git://github.com/urschrei/convertbng.git 'C:\Users\Lou\AppData\Local\Temp\pip-req-build-61jmj1ne'
Requirement already satisfied: numpy>=1.11.0 in c:\users\lou\pycharmprojects\pythonpur\venv\lib\site-packages (from convertbng==0.6.18) (1.19.0)
Using legacy setup.py install for convertbng, since package 'wheel' is not installed.
Installing collected packages: convertbng
Running setup.py install for convertbng ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\lou\pycharmprojects\pythonpur\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Lou\AppData\Local\Temp\pip-req-build-61jmj1ne\setup.py'"'"'; file='"'"'C:
\Users\Lou\AppData\Local\Temp\pip-req-build-61jmj1ne\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"')
)' install --record 'C:\Users\Lou\AppData\Local\Temp\pip-record-l26whna_\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lou\pycharmprojects\pythonpur\venv\include\site\python3.8\convert
bng'
cwd: C:\Users\Lou\AppData\Local\Temp\pip-req-build-61jmj1ne
Complete output (42 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\convertbng
copying convertbng\util.py -> build\lib.win32-3.8\convertbng
copying convertbng_init_.py -> build\lib.win32-3.8\convertbng
creating build\lib.win32-3.8\convertbng\test
copying convertbng\test\test_convertbng.py -> build\lib.win32-3.8\convertbng\test
copying convertbng\test_init_.py -> build\lib.win32-3.8\convertbng\test
running egg_info
creating convertbng.egg-info
writing convertbng.egg-info\PKG-INFO
writing dependency_links to convertbng.egg-info\dependency_links.txt
writing requirements to convertbng.egg-info\requires.txt
writing top-level names to convertbng.egg-info\top_level.txt
writing manifest file 'convertbng.egg-info\SOURCES.txt'
reading manifest file 'convertbng.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.rst'
warning: no files found matching '.so' under directory 'convertbng'
warning: no files found matching '
.dylib' under directory 'convertbng'
warning: no files found matching '.dll' under directory 'convertbng'
warning: no files found matching '
.lib' under directory 'convertbng'
writing manifest file 'convertbng.egg-info\SOURCES.txt'
copying convertbng\convertbng_p.pxd -> build\lib.win32-3.8\convertbng
copying convertbng\cutil.c -> build\lib.win32-3.8\convertbng
copying convertbng\cutil.pyx -> build\lib.win32-3.8\convertbng
copying convertbng\header.h -> build\lib.win32-3.8\convertbng
copying convertbng\stdbool.h -> build\lib.win32-3.8\convertbng
running build_ext
building 'convertbng.cutil' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\convertbng
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Iconvertbng -Ic:\users\lou\pycharmprojects\pythonpur\venv\include -IC:\Users\Lo
u\AppData\Local\Programs\Python\Python38-32\include -IC:\Users\Lou\AppData\Local\Programs\Python\Python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program
Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits
10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcconvertbng/cutil.c /Fobuild\temp.win32-3.8\Release\convertbng/cutil.obj -O3
clÿ: Ligne de commande warning D9002ÿ: option '-O3' inconnue ignor‚e
cutil.c
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:convertbng /LIBPATH:c:\users\lou
pycharmprojects\pythonpur\venv\libs /LIBPATH:C:\Users\Lou\AppData\Local\Programs\Python\Python38-32\libs /LIBPATH:C:\Users\Lou\AppData\Local\Programs\Python\Python38-32 /LIBPATH:c:\users\lou\pycharmprojects\pythonpur\venv\PCbuild\wi
n32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kit
s\10\lib\10.0.18362.0\um\x86" lonlat_bng.lib /EXPORT:PyInit_cutil build\temp.win32-3.8\Release\convertbng/cutil.obj /OUT:build\lib.win32-3.8\convertbng\cutil.cp38-win32.pyd /IMPLIB:build\temp.win32-3.8\Release\convertbng\cutil.cp38-
win32.lib
LINK : fatal error LNK1181: impossible d'ouvrir le fichier en entr‚e 'lonlat_bng.lib'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\link.exe' failed with exit status 1181
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\lou\pycharmprojects\pythonpur\venv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Lou\AppData\Local\Temp\pip-req-build-61jmj1ne
\setup.py'"'"'; file='"'"'C:\Users\Lou\AppData\Local\Temp\pip-req-build-61jmj1ne\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compil
e(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Lou\AppData\Local\Temp\pip-record-l26whna_\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\lou\pycharmprojects\pythonpur\ve
nv\include\site\python3.8\convertbng' Check the logs for full command output.

`

pip install fails on Fedora with Python 3.9

Hello!
I've just tried to install with pip install convertbng on a Fedora 34 system with Python 3.9.7 and pip 21.0.1
But instead of getting a precompiled wheel I get the error below:

Collecting convertbng
  Downloading convertbng-0.4.14.tar.gz (11.4 MB)
     || 11.4 MB 15.6 MB/s 
Requirement already satisfied: numpy>=1.9.0 in /usr/lib64/python3.9/site-packages (from convertbng) (1.20.1)
Building wheels for collected packages: convertbng
  Building wheel for convertbng (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_ufjipy2/convertbng_204bed7928eb4be98740af3d324000c8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_ufjipy2/convertbng_204bed7928eb4be98740af3d324000c8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-pxo19kn1
       cwd: /tmp/pip-install-_ufjipy2/convertbng_204bed7928eb4be98740af3d324000c8/
  Complete output (273 lines):
  running bdist_wheel
  The [wheel] section is deprecated. Use [bdist_wheel] instead.
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  creating build/lib.linux-x86_64-3.9/convertbng
  copying convertbng/util.py -> build/lib.linux-x86_64-3.9/convertbng
  copying convertbng/__init__.py -> build/lib.linux-x86_64-3.9/convertbng
  running egg_info
  writing convertbng.egg-info/PKG-INFO
  writing dependency_links to convertbng.egg-info/dependency_links.txt
  writing requirements to convertbng.egg-info/requires.txt
  writing top-level names to convertbng.egg-info/top_level.txt
  reading manifest file 'convertbng.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching 'license.txt'
  warning: no files found matching 'README.md'
  warning: no files found matching 'ostn002_s.gif'
  writing manifest file 'convertbng.egg-info/SOURCES.txt'
  copying convertbng/convertbng_p.pxd -> build/lib.linux-x86_64-3.9/convertbng
  copying convertbng/cutil.c -> build/lib.linux-x86_64-3.9/convertbng
  copying convertbng/cutil.pyx -> build/lib.linux-x86_64-3.9/convertbng
  copying convertbng/liblonlat_bng.dylib -> build/lib.linux-x86_64-3.9/convertbng
  copying convertbng/liblonlat_bng.so -> build/lib.linux-x86_64-3.9/convertbng
  copying convertbng/rlib.h -> build/lib.linux-x86_64-3.9/convertbng
  running build_ext
  building 'convertbng.cutil' extension
  creating build/temp.linux-x86_64-3.9
  creating build/temp.linux-x86_64-3.9/convertbng
  gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I./convertbng -I. -Iconvertbng -I/usr/include/python3.9 -c convertbng/cutil.c -o build/temp.linux-x86_64-3.9/convertbng/cutil.o -O3
  convertbng/cutil.c: In function ‘PyInit_cutil’:
  convertbng/cutil.c:15295:93: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  15295 |   __pyx_type_10convertbng_5cutil___pyx_scope_struct____pyx_f_10convertbng_5cutil_ffi_wrapper.tp_print = 0;
        |                                                                                             ^
  convertbng/cutil.c:15300:25: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  15300 |   __pyx_type___pyx_array.tp_print = 0;
        |                         ^
  convertbng/cutil.c:15304:31: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  15304 |   __pyx_type___pyx_MemviewEnum.tp_print = 0;
        |                               ^
  convertbng/cutil.c:15315:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  15315 |   __pyx_type___pyx_memoryview.tp_print = 0;
        |                              ^
  convertbng/cutil.c:15324:35: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
  15324 |   __pyx_type___pyx_memoryviewslice.tp_print = 0;
        |                                   ^
  convertbng/cutil.c: In function ‘__Pyx_ParseOptionalKeywords’:
  convertbng/cutil.c:15743:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  15743 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15743:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  15743 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15743:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  15743 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15743:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  15743 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15743:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  15743 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15743:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  15743 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                     ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15759:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  15759 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15759:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  15759 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15759:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  15759 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15759:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  15759 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15759:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
  15759 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here
    580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
        |                                             ^~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c:15759:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
  15759 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
        |                         ^
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
    446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
        |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c: In function ‘__Pyx_CyFunction_Call’:
  convertbng/cutil.c:17096:9: warning: ‘PyCFunction_Call’ is deprecated [-Wdeprecated-declarations]
  17096 |         return PyCFunction_Call(func, arg, kw);
        |         ^~~~~~
  In file included from /usr/include/python3.9/Python.h:120,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/methodobject.h:33:43: note: declared here
     33 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
        |                                           ^~~~~~~~~~~~~~~~
  convertbng/cutil.c: In function ‘__pyx_CyFunction_init’:
  convertbng/cutil.c:17161:5: warning: ‘PyCFunction_Call’ is deprecated [-Wdeprecated-declarations]
  17161 |     __pyx_CyFunctionType_type.tp_call = PyCFunction_Call;
        |     ^~~~~~~~~~~~~~~~~~~~~~~~~
  In file included from /usr/include/python3.9/Python.h:120,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/methodobject.h:33:43: note: declared here
     33 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
        |                                           ^~~~~~~~~~~~~~~~
  convertbng/cutil.c: In function ‘__Pyx_decode_c_string’:
  convertbng/cutil.c:17575:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]
  17575 |         return PyUnicode_FromUnicode(NULL, 0);
        |         ^~~~~~
  In file included from /usr/include/python3.9/unicodeobject.h:1026,
                   from /usr/include/python3.9/Python.h:106,
                   from convertbng/cutil.c:32:
  /usr/include/python3.9/cpython/unicodeobject.h:551:42: note: declared here
    551 | Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
        |                                          ^~~~~~~~~~~~~~~~~~~~~
  convertbng/cutil.c: In function ‘__Pyx__ExceptionSave’:
  convertbng/cutil.c:17618:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
  17618 |     *type = tstate->exc_type;
        |                     ^~~~~~~~
        |                     curexc_type
  convertbng/cutil.c:17619:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
  17619 |     *value = tstate->exc_value;
        |                      ^~~~~~~~~
        |                      curexc_value
  convertbng/cutil.c:17620:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
  17620 |     *tb = tstate->exc_traceback;
        |                   ^~~~~~~~~~~~~
        |                   curexc_traceback
  convertbng/cutil.c: In function ‘__Pyx__ExceptionReset’:
  convertbng/cutil.c:17627:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
  17627 |     tmp_type = tstate->exc_type;
        |                        ^~~~~~~~
        |                        curexc_type
  convertbng/cutil.c:17628:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
  17628 |     tmp_value = tstate->exc_value;
        |                         ^~~~~~~~~
        |                         curexc_value
  convertbng/cutil.c:17629:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
  17629 |     tmp_tb = tstate->exc_traceback;
        |                      ^~~~~~~~~~~~~
        |                      curexc_traceback
  convertbng/cutil.c:17630:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
  17630 |     tstate->exc_type = type;
        |             ^~~~~~~~
        |             curexc_type
  convertbng/cutil.c:17631:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
  17631 |     tstate->exc_value = value;
        |             ^~~~~~~~~
        |             curexc_value
  convertbng/cutil.c:17632:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
  17632 |     tstate->exc_traceback = tb;
        |             ^~~~~~~~~~~~~
        |             curexc_traceback
  convertbng/cutil.c: In function ‘__Pyx__GetException’:
  convertbng/cutil.c:17687:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
  17687 |     tmp_type = tstate->exc_type;
        |                        ^~~~~~~~
        |                        curexc_type
  convertbng/cutil.c:17688:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
  17688 |     tmp_value = tstate->exc_value;
        |                         ^~~~~~~~~
        |                         curexc_value
  convertbng/cutil.c:17689:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
  17689 |     tmp_tb = tstate->exc_traceback;
        |                      ^~~~~~~~~~~~~
        |                      curexc_traceback
  convertbng/cutil.c:17690:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
  17690 |     tstate->exc_type = local_type;
        |             ^~~~~~~~
        |             curexc_type
  convertbng/cutil.c:17691:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
  17691 |     tstate->exc_value = local_value;
        |             ^~~~~~~~~
        |             curexc_value
  convertbng/cutil.c:17692:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
  17692 |     tstate->exc_traceback = local_tb;
        |             ^~~~~~~~~~~~~
        |             curexc_traceback
  convertbng/cutil.c: In function ‘__Pyx__ExceptionSwap’:
  convertbng/cutil.c:17714:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
  17714 |     tmp_type = tstate->exc_type;
        |                        ^~~~~~~~
        |                        curexc_type
  convertbng/cutil.c:17715:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
  17715 |     tmp_value = tstate->exc_value;
        |                         ^~~~~~~~~
        |                         curexc_value
  convertbng/cutil.c:17716:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
  17716 |     tmp_tb = tstate->exc_traceback;
        |                      ^~~~~~~~~~~~~
        |                      curexc_traceback
  convertbng/cutil.c:17717:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
  17717 |     tstate->exc_type = *type;
        |             ^~~~~~~~
        |             curexc_type
  convertbng/cutil.c:17718:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
  17718 |     tstate->exc_value = *value;
        |             ^~~~~~~~~
        |             curexc_value
  convertbng/cutil.c:17719:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
  17719 |     tstate->exc_traceback = *tb;
        |             ^~~~~~~~~~~~~
        |             curexc_traceback
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for convertbng

Am I doing something wrong?

Intermittent Segmentation faults on Ubuntu-20.04 LTS on WSL2

Hi, I've been using this for a while on both Ubuntu-20.04 within WSL2.

I've recently noticed that the Python script aborts with "Segmentation fault" in some cases, but unfortunately it's a little intermittent - it only occurs during one long processing run, but sometimes happens earlier or later. This involves lots of individual calls to convert shorter line strings (supplied as lists to convert_bng).

If I make individual calls with each of these linestrings within the same venv, these work fine - the problem only arises when the processing script runs as a whole.

All the 0.6.* versions seem to have this same behaviour. The latest prior version that I seem to be able to install is 0.4.4, which appears to work fine, but uses OSTN02.

Details:

  • System installed Python 3.8.5.
  • Additional libraries including this one installed in virtualenv using pip.
  • No other problems to date with NumPy or any other Python libraries I can think of.

I appreciate it's not much to go on, but let me know if you would like some more information!

pip install convertbng fails on Python 3.11

pip install convertbng fails on Python 3.11 with error:

      convertbng/cutil.c:77:12: fatal error: 'longintrepr.h' file not found
        #include "longintrepr.h"

This seems to be due to a change to cython, e.g. see here: aio-libs/aiohttp#6600

Switching to Python 3.10 fixed this.

This was experienced on macOS using conda with arm hardware, but it looks like it's more general than that.

pip install fails on Python 3.9.7 (Sep 16 2021) Windows 10

Collecting convertbng
Downloading convertbng-0.4.14.tar.gz (11.4 MB)
|████████████████████████████████| 11.4 MB 6.8 MB/s
Requirement already satisfied: numpy>=1.9.0 in c:\software\anaconda3\lib\site-packages (from convertbng) (1.20.3)
Building wheels for collected packages: convertbng
Building wheel for convertbng (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\software\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\User\AppData\Local\Temp\pip-install-ledaapm_\convertbng_4444f6d4434a49edbac4bacf9b4ff854\setup.py'"'"'; file='"'"'C:\Users\User\AppData\Local\Temp\pip-install-ledaapm_\convertbng_4444f6d4434a49edbac4bacf9b4ff854\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'"'"'))' bdist_wheel -d 'C:\Users\User\AppData\Local\Temp\pip-wheel-fpqcoz6p'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-ledaapm_\convertbng_4444f6d4434a49edbac4bacf9b4ff854
Complete output (29 lines):
running bdist_wheel
The [wheel] section is deprecated. Use [bdist_wheel] instead.
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\convertbng
copying convertbng\util.py -> build\lib.win-amd64-3.9\convertbng
copying convertbng_init_.py -> build\lib.win-amd64-3.9\convertbng
running egg_info
writing convertbng.egg-info\PKG-INFO
writing dependency_links to convertbng.egg-info\dependency_links.txt
writing requirements to convertbng.egg-info\requires.txt
writing top-level names to convertbng.egg-info\top_level.txt
reading manifest file 'convertbng.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'license.txt'
warning: no files found matching 'README.md'
warning: no files found matching 'ostn002_s.gif'
writing manifest file 'convertbng.egg-info\SOURCES.txt'
copying convertbng\convertbng_p.pxd -> build\lib.win-amd64-3.9\convertbng
copying convertbng\cutil.c -> build\lib.win-amd64-3.9\convertbng
copying convertbng\cutil.pyx -> build\lib.win-amd64-3.9\convertbng
copying convertbng\liblonlat_bng.dylib -> build\lib.win-amd64-3.9\convertbng
copying convertbng\liblonlat_bng.so -> build\lib.win-amd64-3.9\convertbng
copying convertbng\rlib.h -> build\lib.win-amd64-3.9\convertbng
running build_ext
building 'convertbng.cutil' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

ERROR: Failed building wheel for convertbng
Running setup.py clean for convertbng
Failed to build convertbng
Installing collected packages: convertbng
Running setup.py install for convertbng ... error
ERROR: Command errored out with exit status 1:
command: 'C:\software\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\User\AppData\Local\Temp\pip-install-ledaapm_\convertbng_4444f6d4434a49edbac4bacf9b4ff854\setup.py'"'"'; file='"'"'C:\Users\User\AppData\Local\Temp\pip-install-ledaapm_\convertbng_4444f6d4434a49edbac4bacf9b4ff854\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'"'"'))' install --record 'C:\Users\User\AppData\Local\Temp\pip-record-f99gapzq\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\software\Anaconda3\Include\convertbng'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-ledaapm_\convertbng_4444f6d4434a49edbac4bacf9b4ff854
Complete output (28 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\convertbng
copying convertbng\util.py -> build\lib.win-amd64-3.9\convertbng
copying convertbng_init_.py -> build\lib.win-amd64-3.9\convertbng
running egg_info
writing convertbng.egg-info\PKG-INFO
writing dependency_links to convertbng.egg-info\dependency_links.txt
writing requirements to convertbng.egg-info\requires.txt
writing top-level names to convertbng.egg-info\top_level.txt
reading manifest file 'convertbng.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'license.txt'
warning: no files found matching 'README.md'
warning: no files found matching 'ostn002_s.gif'
writing manifest file 'convertbng.egg-info\SOURCES.txt'
copying convertbng\convertbng_p.pxd -> build\lib.win-amd64-3.9\convertbng
copying convertbng\cutil.c -> build\lib.win-amd64-3.9\convertbng
copying convertbng\cutil.pyx -> build\lib.win-amd64-3.9\convertbng
copying convertbng\liblonlat_bng.dylib -> build\lib.win-amd64-3.9\convertbng
copying convertbng\liblonlat_bng.so -> build\lib.win-amd64-3.9\convertbng
copying convertbng\rlib.h -> build\lib.win-amd64-3.9\convertbng
running build_ext
building 'convertbng.cutil' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\software\Anaconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\User\AppData\Local\Temp\pip-install-ledaapm_\convertbng_4444f6d4434a49edbac4bacf9b4ff854\setup.py'"'"'; file='"'"'C:\Users\User\AppData\Local\Temp\pip-install-ledaapm_\convertbng_4444f6d4434a49edbac4bacf9b4ff854\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'"'"'))' install --record 'C:\Users\User\AppData\Local\Temp\pip-record-f99gapzq\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\software\Anaconda3\Include\convertbng' Check the logs for full command output.

Ubuntu 16.04 64bit: trap invalid opcode ... in liblonlat_bng-783571af.so

Hi there,

I have a flask application which uses convertbng to convert some OSGB36 eastings northings returned from a sqlite query into WGS84 coordinates. I just experimentally redeployed the production code running fine on Ubuntu 14.04 64bit (E3-1225 v2) onto a Ubuntu 16.04 64bit environment (i5-3570S).

The version of Python is 2.7.12, the version of convertbng is 0.5.5. The kernel is Linux 4.4.0-64-generic #85-Ubuntu.

Everything works fine, except this conversion:

    Feb 26 22:28:28 (hostname) kernel: [180221.207469] traps: uwsgi[22644] trap invalid opcode ip:7f32a27968f2 sp:7fff2f6a6bc8 error:0 in liblonlat_bng-783571af.so[7f32a272d000+1d2a000]

This in turn causes an Illegal instruction (core dumped) by Python, and in turn causes a remote host closing connection prematurely by NGINX which is running reverse proxy of the flask application.

While I don't speak Rust, it appears that this is something to do with the Rust binary called by the library?

For reference, the Python code that can reproduce this error is:

from convertbng.util import convert_lonlat

def bng_to_longlat(bng):
    """ Given a pair of BNG coordinates return its long and lat coordinates. """
    
    try:
        easting = [int(bng[0])]
        northing = [int(bng[1])]
        coordinates = convert_lonlat(easting, northing)
        coordinate_long = coordinates[0][0]
        coordinate_lat = coordinates[1][0]

        if isnan(coordinate_long) or isnan(coordinate_lat):
            return False
    
        return (coordinate_long, coordinate_lat)
    
    except ValueError:
        return False
 
bng_to_longlat((20000,20000))

Thanks.

Load fails on Windows 10 x64

After installation when I try to import:

from convertbng.util import convert_bng
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\convertbng\util.py", line 52, in
lib = cdll.LoadLibrary(os.path.join('..', file_path, '%slonlat_bng.%s' % (prefix, ext)))
File "C:\Python27\lib\ctypes__init__.py", line 443, in LoadLibrary
return self.dlltype(name)
File "C:\Python27\lib\ctypes__init
_.py", line 365, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

Windows fails to load lonlat_bng.dll.

Windows 10 x64.

Minor documentation typo

Minor issue with the readme.md. It currently gives the bounding box as

Latitude:
East: 1.7800
West: -7.5600
Longitude:
North: 60.8400
South: 49.9600

But "Latitude" and "Longitude" are the wrong way around.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.