kip-hart / MicroStructPy

Microstructure modeling, mesh generation, analysis, and visualization.
https://docs.microstructpy.org
MIT License
68 stars 19 forks source link

add python 3.11 support #77

Closed kip-hart closed 10 months ago

kip-hart commented 1 year ago

adds support for 3.11

kip-hart commented 1 year ago

SciPy 1.9.1 did not install with rc.2. I'll look into this again once 3.11.0 releases and SciPy updates to 1.9.2.

kip-hart commented 1 year ago

pyvoro-mmalahe, pyvoro, and tess all suffer from the same legacy install error.

 × Running setup.py install for pyvoro-mmalahe did not run successfully.
  │ exit code: 1
  ╰─> [176 lines of output]
      /opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/setuptools/dist.py:771: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
        warnings.warn(
      running install
      /opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/pyvoro
      copying pyvoro/__init__.py -> build/lib.linux-x86_64-cpython-311/pyvoro
      running build_ext
      building 'pyvoro.voroplusplus' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/pyvoro
      creating build/temp.linux-x86_64-cpython-311/src
      gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Isrc -I/opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11 -c pyvoro/voroplusplus.cpp -o build/temp.linux-x86_64-cpython-311/pyvoro/voroplusplus.o
      In file included from /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/Python.h:44,
                       from pyvoro/voroplusplus.cpp:16:
      pyvoro/voroplusplus.cpp: In function ‘int __Pyx_ListComp_Append(PyObject*, PyObject*)’:
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/object.h:145:30: error: lvalue required as left operand of assignment
        145 | #  define Py_SIZE(ob) Py_SIZE(_PyObject_CAST(ob))
            |                       ~~~~~~~^~~~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:571:9: note: in expansion of macro ‘Py_SIZE’
        571 |         Py_SIZE(list) = len+1;
            |         ^~~~~~~
      pyvoro/voroplusplus.cpp: In function ‘int __Pyx_PyList_Append(PyObject*, PyObject*)’:
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/object.h:145:30: error: lvalue required as left operand of assignment
        145 | #  define Py_SIZE(ob) Py_SIZE(_PyObject_CAST(ob))
            |                       ~~~~~~~^~~~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:592:9: note: in expansion of macro ‘Py_SIZE’
        592 |         Py_SIZE(list) = len+1;
            |         ^~~~~~~
      pyvoro/voroplusplus.cpp: In function ‘PyObject* __pyx_pf_6pyvoro_12voroplusplus_2compute_voronoi(PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*)’:
      pyvoro/voroplusplus.cpp:1936:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
       1936 |     for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_25; __pyx_v_j++) {
            |                         ~~~~~~~~~~^~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:2099:37: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
       2099 |       for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_25; __pyx_v_k++) {
            |                           ~~~~~~~~~~^~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:2241:37: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
       2241 |       for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_25; __pyx_v_k++) {
            |                           ~~~~~~~~~~^~~~~~~~~~~~
      pyvoro/voroplusplus.cpp: In function ‘int __Pyx_InitCachedConstants()’:
      pyvoro/voroplusplus.cpp:2557:247: error: invalid conversion from ‘int’ to ‘PyObject*’ {aka ‘_object*’} [-fpermissive]
       2557 |   __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_wendell_code_pyvoro2_pyvor, __pyx_n_s_get_constructor, 45, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            |                                                                                                                                                                                                                                                       ^~
            |                                                                                                                                                                                                                                                       |
            |                                                                                                                                                                                                                                                       int
      pyvoro/voroplusplus.cpp:70:72: note: in definition of macro ‘__Pyx_PyCode_New’
         70 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
            |                                                                        ^~~~~
      pyvoro/voroplusplus.cpp:2557:251: error: invalid conversion from ‘PyObject*’ {aka ‘_object*’} to ‘int’ [-fpermissive]
       2557 |   __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_wendell_code_pyvoro2_pyvor, __pyx_n_s_get_constructor, 45, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            |                                                                                                                                                                                                                                                           ^~~~~~~~~~~~~~~~~
            |                                                                                                                                                                                                                                                           |
            |                                                                                                                                                                                                                                                           PyObject* {aka _object*}
      pyvoro/voroplusplus.cpp:70:79: note: in definition of macro ‘__Pyx_PyCode_New’
         70 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
            |                                                                               ^~~~
      pyvoro/voroplusplus.cpp:70:21: error: too few arguments to function ‘PyCodeObject* PyCode_New(int, int, int, int, int, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*)’
         70 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
            |           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:2557:33: note: in expansion of macro ‘__Pyx_PyCode_New’
       2557 |   __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__4, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_wendell_code_pyvoro2_pyvor, __pyx_n_s_get_constructor, 45, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            |                                 ^~~~~~~~~~~~~~~~
      In file included from /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/Python.h:71,
                       from pyvoro/voroplusplus.cpp:16:
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/code.h:148:28: note: declared here
        148 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
            |                            ^~~~~~~~~~
      pyvoro/voroplusplus.cpp:2569:248: error: invalid conversion from ‘int’ to ‘PyObject*’ {aka ‘_object*’} [-fpermissive]
       2569 |   __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(5, 0, 27, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_wendell_code_pyvoro2_pyvor, __pyx_n_s_compute_voronoi, 61, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            |                                                                                                                                                                                                                                                        ^~
            |                                                                                                                                                                                                                                                        |
            |                                                                                                                                                                                                                                                        int
      pyvoro/voroplusplus.cpp:70:72: note: in definition of macro ‘__Pyx_PyCode_New’
         70 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
            |                                                                        ^~~~~
      pyvoro/voroplusplus.cpp:2569:252: error: invalid conversion from ‘PyObject*’ {aka ‘_object*’} to ‘int’ [-fpermissive]
       2569 |   __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(5, 0, 27, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_wendell_code_pyvoro2_pyvor, __pyx_n_s_compute_voronoi, 61, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            |                                                                                                                                                                                                                                                            ^~~~~~~~~~~~~~~~~
            |                                                                                                                                                                                                                                                            |
            |                                                                                                                                                                                                                                                            PyObject* {aka _object*}
      pyvoro/voroplusplus.cpp:70:79: note: in definition of macro ‘__Pyx_PyCode_New’
         70 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
            |                                                                               ^~~~
      pyvoro/voroplusplus.cpp:70:21: error: too few arguments to function ‘PyCodeObject* PyCode_New(int, int, int, int, int, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*)’
         70 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
            |           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:2569:33: note: in expansion of macro ‘__Pyx_PyCode_New’
       2569 |   __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(5, 0, 27, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_wendell_code_pyvoro2_pyvor, __pyx_n_s_compute_voronoi, 61, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
            |                                 ^~~~~~~~~~~~~~~~
      In file included from /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/Python.h:71,
                       from pyvoro/voroplusplus.cpp:16:
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/code.h:148:28: note: declared here
        148 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
            |                            ^~~~~~~~~~
      In file included from /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/unicodeobject.h:1042,
                       from /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/Python.h:51,
                       from pyvoro/voroplusplus.cpp:16:
      pyvoro/voroplusplus.cpp: In function ‘int __Pyx_ParseOptionalKeywords(PyObject*, PyObject***, PyObject*, PyObject**, Py_ssize_t, const char*)’:
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/unicodeobject.h:664:52: warning: ‘Py_ssize_t PyUnicode_GET_SIZE(PyObject*)’ is deprecated [-Wdeprecated-declarations]
        664 | #  define PyUnicode_GET_SIZE(op) PyUnicode_GET_SIZE(_PyObject_CAST(op))
            |                                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:3052:22: note: in expansion of macro ‘PyUnicode_GET_SIZE’
       3052 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                      ^~~~~~~~~~~~~~~~~~
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/unicodeobject.h:652:26: note: declared here
        652 | static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
            |                          ^~~~~~~~~~~~~~~~~~
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/unicodeobject.h:664:52: warning: ‘Py_ssize_t PyUnicode_GET_SIZE(PyObject*)’ is deprecated [-Wdeprecated-declarations]
        664 | #  define PyUnicode_GET_SIZE(op) PyUnicode_GET_SIZE(_PyObject_CAST(op))
            |                                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:3052:52: note: in expansion of macro ‘PyUnicode_GET_SIZE’
       3052 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                                                    ^~~~~~~~~~~~~~~~~~
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/unicodeobject.h:652:26: note: declared here
        652 | static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
            |                          ^~~~~~~~~~~~~~~~~~
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/unicodeobject.h:664:52: warning: ‘Py_ssize_t PyUnicode_GET_SIZE(PyObject*)’ is deprecated [-Wdeprecated-declarations]
        664 | #  define PyUnicode_GET_SIZE(op) PyUnicode_GET_SIZE(_PyObject_CAST(op))
            |                                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:3068:26: note: in expansion of macro ‘PyUnicode_GET_SIZE’
       3068 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                          ^~~~~~~~~~~~~~~~~~
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/unicodeobject.h:652:26: note: declared here
        652 | static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
            |                          ^~~~~~~~~~~~~~~~~~
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/unicodeobject.h:664:52: warning: ‘Py_ssize_t PyUnicode_GET_SIZE(PyObject*)’ is deprecated [-Wdeprecated-declarations]
        664 | #  define PyUnicode_GET_SIZE(op) PyUnicode_GET_SIZE(_PyObject_CAST(op))
            |                                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:3068:59: note: in expansion of macro ‘PyUnicode_GET_SIZE’
       3068 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                                                           ^~~~~~~~~~~~~~~~~~
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/unicodeobject.h:652:26: note: declared here
        652 | static inline Py_ssize_t PyUnicode_GET_SIZE(PyObject *op)
            |                          ^~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp: In function ‘PyCodeObject* __Pyx_CreateCodeObjectForTraceback(const char*, int, int, const char*)’:
      pyvoro/voroplusplus.cpp:3666:9: error: invalid conversion from ‘int’ to ‘PyObject*’ {aka ‘_object*’} [-fpermissive]
       3666 |         py_line,
            |         ^~~~~~~
            |         |
            |         int
      pyvoro/voroplusplus.cpp:70:72: note: in definition of macro ‘__Pyx_PyCode_New’
         70 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
            |                                                                        ^~~~~
      pyvoro/voroplusplus.cpp:3667:9: error: invalid conversion from ‘PyObject*’ {aka ‘_object*’} to ‘int’ [-fpermissive]
       3667 |         __pyx_empty_bytes  /*PyObject *lnotab*/
            |         ^~~~~~~~~~~~~~~~~
            |         |
            |         PyObject* {aka _object*}
      pyvoro/voroplusplus.cpp:70:79: note: in definition of macro ‘__Pyx_PyCode_New’
         70 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
            |                                                                               ^~~~
      pyvoro/voroplusplus.cpp:70:21: error: too few arguments to function ‘PyCodeObject* PyCode_New(int, int, int, int, int, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, int, PyObject*, PyObject*)’
         70 |           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
            |           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      pyvoro/voroplusplus.cpp:3652:15: note: in expansion of macro ‘__Pyx_PyCode_New’
       3652 |     py_code = __Pyx_PyCode_New(
            |               ^~~~~~~~~~~~~~~~
      In file included from /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/Python.h:71,
                       from pyvoro/voroplusplus.cpp:16:
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/cpython/code.h:148:28: note: declared here
        148 | PyAPI_FUNC(PyCodeObject *) PyCode_New(
            |                            ^~~~~~~~~~
      pyvoro/voroplusplus.cpp: In function ‘void __Pyx_AddTraceback(const char*, int, int, const char*)’:
      pyvoro/voroplusplus.cpp:3695:13: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
       3695 |     py_frame->f_lineno = py_line;
            |             ^~
      In file included from /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/Python.h:42,
                       from pyvoro/voroplusplus.cpp:16:
      /opt/hostedtoolcache/Python/3.11.3/x64/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyvoro-mmalahe

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
Error: Process completed with exit code 1.

This seems to be related: https://github.com/enthought/enable/issues/375

kip-hart commented 1 year ago

upgrading to latest cython did not fix the issue

carlosal1015 commented 10 months ago

pyvoro-mmalahe, pyvoro, and tess all suffer from the same legacy install error.

Hi, thanks for the last update. I had the same trouble with python-pyvoro-mmalahe, my solution was cythonize voroplusplus.pyx, 1.3.3 comes from branch feature/python3.6.

==> Making package: python-pyvoro-mmalahe 1.3.3-3 (Mon Aug  7 17:43:54 2023)
==> Retrieving sources...
  -> Cloning pyvoro git repo...
Cloning into bare repository '/home/aur/.cache/yay/python-pyvoro-mmalahe/pyvoro'...
remote: Enumerating objects: 573, done.
remote: Total 573 (delta 0), reused 0 (delta 0), pack-reused 573
Receiving objects: 100% (573/573), 805.23 KiB | 3.20 MiB/s, done.
Resolving deltas: 100% (273/273), done.
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha512sums...
    pyvoro ... Skipped
:: Remove make dependencies after install? [y/N] y
:: (1/1) Parsing SRCINFO: python-pyvoro-mmalahe
resolving dependencies...
looking for conflicting packages...

Packages (1) cython-3.0.0-1

Total Download Size:    3.43 MiB
Total Installed Size:  17.97 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 cython-3.0.0-1-x86_64 downloading...
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing cython...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
==> Making package: python-pyvoro-mmalahe 1.3.3-3 (Mon Aug  7 17:43:59 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating pyvoro git repo...
==> Validating source files with sha512sums...
    pyvoro ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of pyvoro git repo...
Cloning into 'pyvoro'...
done.
Switched to a new branch 'makepkg'
==> Starting prepare()...
/usr/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/makepkg/python-pyvoro-mmalahe/src/pyvoro/pyvoro/voroplusplus.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
==> Sources are ready.
==> Making package: python-pyvoro-mmalahe 1.3.3-3 (Mon Aug  7 17:44:02 2023)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
* Building wheel...
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-311
creating build/lib.linux-x86_64-cpython-311/pyvoro
copying pyvoro/__init__.py -> build/lib.linux-x86_64-cpython-311/pyvoro
running build_ext
building 'pyvoro.voroplusplus' extension
creating build/temp.linux-x86_64-cpython-311
creating build/temp.linux-x86_64-cpython-311/pyvoro
creating build/temp.linux-x86_64-cpython-311/src
gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fPIC -Isrc -I/usr/include/python3.11 -c pyvoro/voroplusplus.cpp -o build/temp.linux-x86_64-cpython-311/pyvoro/voroplusplus.o
pyvoro/voroplusplus.cpp: In function ‘PyObject* __pyx_pf_6pyvoro_12voroplusplus_2compute_voronoi(PyObject*, PyObject*, PyObject*, PyObject*, PyObject*, PyObject*)’:
pyvoro/voroplusplus.cpp:3853:35: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<double>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 3853 |     for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_25; __pyx_v_j++) {
      |                         ~~~~~~~~~~^~~~~~~~~~~~
pyvoro/voroplusplus.cpp:4011:37: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 4011 |       for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_27; __pyx_v_k++) {
      |                           ~~~~~~~~~~^~~~~~~~~~~~
pyvoro/voroplusplus.cpp:4148:37: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
 4148 |       for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_27; __pyx_v_k++) {
      |                           ~~~~~~~~~~^~~~~~~~~~~~
gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fPIC -Isrc -I/usr/include/python3.11 -c pyvoro/vpp.cpp -o build/temp.linux-x86_64-cpython-311/pyvoro/vpp.o
pyvoro/vpp.cpp: In function ‘void** compute_voronoi_tesselation(void*, int)’:
pyvoro/vpp.cpp:74:9: warning: deleting object of polymorphic class type ‘voro::voronoicell_neighbor’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
   74 |         delete (voronoicell_neighbor*)vorocells[i];
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pyvoro/vpp.cpp: In function ‘void dispose_all(void*, void**, int)’:
pyvoro/vpp.cpp:165:5: warning: deleting object of polymorphic class type ‘voro::voronoicell_neighbor’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
  165 |     delete (voronoicell_neighbor*)vorocells[i];
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gcc -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fPIC -Isrc -I/usr/include/python3.11 -c src/voro++.cc -o build/temp.linux-x86_64-cpython-311/src/voro++.o
In file included from src/voro++.cc:10:
src/cell.cc: In member function ‘void voro::voronoicell_base::add_memory_vorder(vc_class&)’:
src/cell.cc:211:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
  211 |         for(j=0;j<current_vertex_order;j++) p1[j]=mem[j];while(j<i) p1[j++]=0;
      |         ^~~
src/cell.cc:211:58: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  211 |         for(j=0;j<current_vertex_order;j++) p1[j]=mem[j];while(j<i) p1[j++]=0;
      |                                                          ^~~~~
src/cell.cc:217:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
  217 |         for(j=0;j<current_vertex_order;j++) p1[j]=mec[j];while(j<i) p1[j++]=0;
      |         ^~~
src/cell.cc:217:58: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  217 |         for(j=0;j<current_vertex_order;j++) p1[j]=mec[j];while(j<i) p1[j++]=0;
      |                                                          ^~~~~
src/cell.cc: In member function ‘void voro::voronoicell_base::init_base(double, double, double, double, double, double)’:
src/cell.cc:258:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
  258 |         for(int i=0;i<current_vertex_order;i++) mec[i]=0;up=0;
      |         ^~~
src/cell.cc:258:58: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  258 |         for(int i=0;i<current_vertex_order;i++) mec[i]=0;up=0;
      |                                                          ^~
src/cell.cc: In member function ‘void voro::voronoicell_base::init_octahedron_base(double)’:
src/cell.cc:287:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
  287 |         for(int i=0;i<current_vertex_order;i++) mec[i]=0;up=0;
      |         ^~~
src/cell.cc:287:58: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  287 |         for(int i=0;i<current_vertex_order;i++) mec[i]=0;up=0;
      |                                                          ^~
src/cell.cc: In member function ‘void voro::voronoicell_base::init_tetrahedron_base(double, double, double, double, double, double, double, double, double, double, double, double)’:
src/cell.cc:313:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
  313 |         for(int i=0;i<current_vertex_order;i++) mec[i]=0;up=0;
      |         ^~~
src/cell.cc:313:58: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  313 |         for(int i=0;i<current_vertex_order;i++) mec[i]=0;up=0;
      |                                                          ^~
In file included from src/voro++.cc:17:
src/v_compute.cc: In member function ‘void voro::voro_compute<c_class>::add_list_memory(int*&, int*&)’:
src/v_compute.cc:977:17: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation]
  977 |                 while(qu_s<qu_l) *(qu_c++)=*(qu_s++);qu_s=qu;
      |                 ^~~~~
src/v_compute.cc:977:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’
  977 |                 while(qu_s<qu_l) *(qu_c++)=*(qu_s++);qu_s=qu;
      |                                                      ^~~~
g++ -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=auto -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection build/temp.linux-x86_64-cpython-311/pyvoro/voroplusplus.o build/temp.linux-x86_64-cpython-311/pyvoro/vpp.o build/temp.linux-x86_64-cpython-311/src/voro++.o -L/usr/lib -o build/lib.linux-x86_64-cpython-311/pyvoro/voroplusplus.cpython-311-x86_64-linux-gnu.so
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/pyvoro
copying build/lib.linux-x86_64-cpython-311/pyvoro/__init__.py -> build/bdist.linux-x86_64/wheel/pyvoro
copying build/lib.linux-x86_64-cpython-311/pyvoro/voroplusplus.cpython-311-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/pyvoro
running install_egg_info
running egg_info
creating pyvoro.egg-info
writing pyvoro.egg-info/PKG-INFO
writing dependency_links to pyvoro.egg-info/dependency_links.txt
writing top-level names to pyvoro.egg-info/top_level.txt
writing manifest file 'pyvoro.egg-info/SOURCES.txt'
reading manifest file 'pyvoro.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
adding license file 'LICENSE.txt'
writing manifest file 'pyvoro.egg-info/SOURCES.txt'
Copying pyvoro.egg-info to build/bdist.linux-x86_64/wheel/pyvoro-1.3.3-py3.11.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/pyvoro-1.3.3.dist-info/WHEEL
creating '/tmp/makepkg/python-pyvoro-mmalahe/src/pyvoro/dist/.tmp-hdnm4q1i/pyvoro-1.3.3-cp311-cp311-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'pyvoro/__init__.py'
adding 'pyvoro/voroplusplus.cpython-311-x86_64-linux-gnu.so'
adding 'pyvoro-1.3.3.dist-info/LICENSE'
adding 'pyvoro-1.3.3.dist-info/LICENSE.txt'
adding 'pyvoro-1.3.3.dist-info/METADATA'
adding 'pyvoro-1.3.3.dist-info/WHEEL'
adding 'pyvoro-1.3.3.dist-info/top_level.txt'
adding 'pyvoro-1.3.3.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built pyvoro-1.3.3-cp311-cp311-linux_x86_64.whl
==> Starting check()...
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
/usr/lib/python3.11/site-packages/setuptools/command/test.py:194: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  ir_d = dist.fetch_build_eggs(dist.install_requires)
/usr/lib/python3.11/site-packages/setuptools/command/test.py:195: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  tr_d = dist.fetch_build_eggs(dist.tests_require or [])
/usr/lib/python3.11/site-packages/setuptools/command/test.py:196: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

        ********************************************************************************
        Requirements should be satisfied by a PEP 517 installer.
        If you are using pip, you can try `pip install --use-pep517`.
        ********************************************************************************

!!
  er_d = dist.fetch_build_eggs(
running egg_info
writing pyvoro.egg-info/PKG-INFO
writing dependency_links to pyvoro.egg-info/dependency_links.txt
writing top-level names to pyvoro.egg-info/top_level.txt
reading manifest file 'pyvoro.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
adding license file 'LICENSE.txt'
writing manifest file 'pyvoro.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-cpython-311/pyvoro/voroplusplus.cpython-311-x86_64-linux-gnu.so -> pyvoro
test_adjacency (test.pyvoro_test.Test2D.test_adjacency) ... ok
test_faces (test.pyvoro_test.Test2D.test_faces) ... ok
test_positions (test.pyvoro_test.Test2D.test_positions) ... ok
test_vertices (test.pyvoro_test.Test2D.test_vertices) ... ok
test_volume (test.pyvoro_test.Test2D.test_volume) ... ok
test_adjacency (test.pyvoro_test.Test3D.test_adjacency) ... ok
test_faces (test.pyvoro_test.Test3D.test_faces) ... ok
test_positions (test.pyvoro_test.Test3D.test_positions) ... ok
test_vertices (test.pyvoro_test.Test3D.test_vertices) ... ok
test_volume (test.pyvoro_test.Test3D.test_volume) ... ok

----------------------------------------------------------------------
Ran 10 tests in 0.004s

OK
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "python-pyvoro-mmalahe"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: python-pyvoro-mmalahe 1.3.3-3 (Mon Aug  7 17:44:26 2023)
==> Cleaning up...
loading packages...
resolving dependencies...
looking for conflicting packages...

Packages (1) python-pyvoro-mmalahe-1.3.3-3

Total Installed Size:  0.41 MiB

:: Proceed with installation? [Y/n] 
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
:: Processing package changes...
installing python-pyvoro-mmalahe...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
checking dependencies...

Packages (1) cython-3.0.0-1

Total Removed Size:  17.97 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
removing cython...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

After that, the system-wide installation is done.

.BUILDINFO
.MTREE
.PKGINFO
usr/
usr/lib/
usr/lib/python3.11/
usr/lib/python3.11/site-packages/
usr/lib/python3.11/site-packages/pyvoro/
usr/lib/python3.11/site-packages/pyvoro-1.3.3.dist-info/
usr/lib/python3.11/site-packages/pyvoro-1.3.3.dist-info/LICENSE
usr/lib/python3.11/site-packages/pyvoro-1.3.3.dist-info/LICENSE.txt
usr/lib/python3.11/site-packages/pyvoro-1.3.3.dist-info/METADATA
usr/lib/python3.11/site-packages/pyvoro-1.3.3.dist-info/RECORD
usr/lib/python3.11/site-packages/pyvoro-1.3.3.dist-info/WHEEL
usr/lib/python3.11/site-packages/pyvoro-1.3.3.dist-info/top_level.txt
usr/lib/python3.11/site-packages/pyvoro/__init__.py
usr/lib/python3.11/site-packages/pyvoro/voroplusplus.cpython-311-x86_64-linux-gnu.so
usr/share/
usr/share/licenses/
usr/share/licenses/python-pyvoro-mmalahe/
usr/share/licenses/python-pyvoro-mmalahe/LICENSE.txt
kip-hart commented 10 months ago

pyvoro-mmalahe, pyvoro, and tess all suffer from the same legacy install error.

Hi, thanks for the last update. I had the same trouble with python-pyvoro-mmalahe, my solution was cythonize voroplusplus.pyx, 1.3.3 comes from branch feature/python3.6.

Hi @carlosal1015 that's great thank you! I'll take a look at it this weekend. I haven't worked with Cython before. Do you mind if I reach out if I get stuck?

carlosal1015 commented 10 months ago

Thanks, I am open to help. I will try keep in touch with pyvoro-mmalahe maintainer @mmalahe for remind that could cythonize again voroplusplus.pyx in order to upload new voroplusplus.cpp to pypi. This will be easy solution.

See https://github.com/mmalahe/pyvoro/pull/1