Build fails with Python 3.12 and clang 15 on macOS
The build of ligo-segments
fails when using Python 3.12.0rc3 and clang 15.0.7:
$ sw_vers
ProductName: macOS
ProductVersion: 11.7.9
BuildVersion: 20G1426
$ git describe
v1.0.0-126-gcd4d83f
$ python3 --version
Python 3.12.0rc3
$ clang --version
clang version 15.0.7
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Users/duncanmacleod/opt/mambaforge/envs/py312/bin
$ python3 setup.py build
/Users/duncanmacleod/opt/mambaforge/envs/py312/lib/python3.12/site-packages/setuptools/dist.py:700: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
!!
********************************************************************************
Please replace its usage with implicit namespaces (PEP 420).
See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
********************************************************************************
!!
ep.load()(self, ep.name, value)
src/infinity.c:271:2: warning: suggest braces around initialization of subobject [-Wmissing-braces]
PyObject_HEAD_INIT(NULL)
^~~~~~~~~~~~~~~~~~~~~~~~
/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12/object.h:141:11: note: expanded from macro 'PyObject_HEAD_INIT'
{ 1 }, \
^
src/infinity.c:271:2: error: incompatible pointer to integer conversion initializing 'Py_ssize_t' (aka 'long') with an expression of type 'void *' [-Wint-conversion]
PyObject_HEAD_INIT(NULL)
^~~~~~~~~~~~~~~~~~~~~~~~
/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12/object.h:142:9: note: expanded from macro 'PyObject_HEAD_INIT'
(type) \
^~~~~~
1 warning and 1 error generated.
error: command '/Users/duncanmacleod/opt/mambaforge/envs/py312/bin/x86_64-apple-darwin13.4.0-clang' failed with exit code 1