Hi,
I noticed that the Python wrapper for PLUMED on PyPI hasn't been updated since the 2.9.0 release in 2023.
I want to install recent versions of PLUMED into our software stack for the Canadian HPC Infrastructure for which we install Python bindings for several versions of Python, so that one PLUMED module can be combined with several Python modules allowing a more flexible workflow for our users.
When trying to install the plumed-2.9.0.tar.gz bindings from PyPI while using Python 3.13 I get errors like "plumed.c:48774:27: error: too few arguments to function ‘_PyLong_AsByteArray’" which from what I can tell are due to an API change in Python 3.13 (see full traceback below).
I see that the "plumed.c" in that source release was "Generated by Cython 0.29.34" (released a few months before Cython 3.0.0).
According to
this issue this should be resolved with using newer versions of Cython.
Would you please upload new versions (3.9.4 and 3.10.0) of the Python bindings that use a newer Cython (~3.1.x) to PyPI?
Thanks,
Oliver
$ CFLAGS=" -w " pip install plumed
Looking in links: /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo2023/x86-64-v3, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/gentoo2023/generic, /cvmfs/soft.computecanada.ca/custom/python/wheelhouse/generic
Collecting plumed
Using cached plumed-2.9.0.tar.gz (293 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: plumed
Building wheel for plumed (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for plumed (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [56 lines of output]
/tmp/pip-build-env-_c6bxmm3/overlay/lib/python3.13/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
/tmp/pip-build-env-_c6bxmm3/overlay/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
Module name plumed
Version number 2.9.0
using available plumed.c file
running bdist_wheel
running build
running build_ext
building 'plumed' extension
creating build/temp.linux-x86_64-cpython-313
gcc -w -fPIC -I./include -I/home/stuekero/easybuild-easyconfigs/easybuild/easyconfigs/p/PLUMED/venv_3.13/include -I/cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Compiler/gcccore/python/3.13.2/include/python3.13 -c plumed.c -o build/temp.linux-x86_64-cpython-313/plumed.o -D_
_PLUMED_HAS_DLOPEN -D__PLUMED_WRAPPER_LINK_RUNTIME=1 -D__PLUMED_WRAPPER_IMPLEMENTATION=1 -D__PLUMED_WRAPPER_EXTERN=0
plumed.c: In function ‘__Pyx_PyInt_As_size_t’:
plumed.c:48774:27: error: too few arguments to function ‘_PyLong_AsByteArray’
48774 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
| ^~~~~~~~~~~~~~~~~~~
In file included from /cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Compiler/gcccore/python/3.13.2/include/python3.13/longobject.h:107,
from /cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Compiler/gcccore/python/3.13.2/include/python3.13/Python.h:81,
from plumed.c:31:
/cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Compiler/gcccore/python/3.13.2/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
| ^~~~~~~~~~~~~~~~~~~
plumed.c: In function ‘__Pyx_PyInt_As_int’:
plumed.c:49008:27: error: too few arguments to function ‘_PyLong_AsByteArray’
49008 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
| ^~~~~~~~~~~~~~~~~~~
/cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Compiler/gcccore/python/3.13.2/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
| ^~~~~~~~~~~~~~~~~~~
plumed.c: In function ‘__Pyx_PyInt_As_long’:
plumed.c:49204:27: error: too few arguments to function ‘_PyLong_AsByteArray’
49204 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
| ^~~~~~~~~~~~~~~~~~~
/cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Compiler/gcccore/python/3.13.2/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
| ^~~~~~~~~~~~~~~~~~~
plumed.c: In function ‘__Pyx_PyInt_As_char’:
plumed.c:49400:27: error: too few arguments to function ‘_PyLong_AsByteArray’
49400 | int ret = _PyLong_AsByteArray((PyLongObject *)v,
| ^~~~~~~~~~~~~~~~~~~
/cvmfs/soft.computecanada.ca/easybuild/software/2023/x86-64-v3/Compiler/gcccore/python/3.13.2/include/python3.13/cpython/longobject.h:111:17: note: declared here
111 | PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
| ^~~~~~~~~~~~~~~~~~~
error: command '/cvmfs/soft.computecanada.ca/gentoo/2023/x86-64-v3/usr/x86_64-pc-linux-gnu/gcc-bin/12/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for plumed