Cannot build glue on Python 3.12
This project does not build on Python 3.12, fundamentally because the PyUnicode_GetSize
function has finally been removed.
I don't really want anyone to fix this, I would rather push on with Remove glue.ligolw (#33 - closed).
The full build traceback is as follows:
$ python3 -m build --wheel
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools>=30.3.0, wheel)
* Getting build dependencies for wheel...
/private/var/folders/jl/fzzqnlqd3752qmr12xjb1qfr0000gt/T/build-env-z3_uowq3/lib/python3.12/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!
********************************************************************************
The license_file parameter is deprecated, use license_files instead.
By 2023-Oct-30, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
parsed = self.parsers.get(option_name, lambda x: x)(value)
running egg_info
creating lscsoft_glue.egg-info
writing lscsoft_glue.egg-info/PKG-INFO
writing dependency_links to lscsoft_glue.egg-info/dependency_links.txt
writing requirements to lscsoft_glue.egg-info/requires.txt
writing top-level names to lscsoft_glue.egg-info/top_level.txt
writing manifest file 'lscsoft_glue.egg-info/SOURCES.txt'
reading manifest file 'lscsoft_glue.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'man/man1/*'
adding license file 'LICENSE'
writing manifest file 'lscsoft_glue.egg-info/SOURCES.txt'
* Installing packages in isolated environment... (wheel)
* Building wheel...
/private/var/folders/jl/fzzqnlqd3752qmr12xjb1qfr0000gt/T/build-env-z3_uowq3/lib/python3.12/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!
********************************************************************************
The license_file parameter is deprecated, use license_files instead.
By 2023-Oct-30, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
parsed = self.parsers.get(option_name, lambda x: x)(value)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-cpython-312
creating build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/text_progress_bar.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/pidfile.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/LDBDWClient.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/iterutils.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/gpstime.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/markup.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/utils.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/pipeline.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/lal.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/git_version.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
copying glue/ldbd.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue
creating build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
copying glue/ligolw/ligolw.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
copying glue/ligolw/ilwd.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
copying glue/ligolw/lsctables.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
copying glue/ligolw/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
copying glue/ligolw/param.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
copying glue/ligolw/types.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
copying glue/ligolw/dbtables.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
copying glue/ligolw/table.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
copying glue/ligolw/array.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw
creating build/lib.macosx-10.9-x86_64-cpython-312/glue/segmentdb
copying glue/segmentdb/query_engine.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/segmentdb
copying glue/segmentdb/segmentdb_utils.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/segmentdb
copying glue/segmentdb/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/segmentdb
creating build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/coalesce_db.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/ligolw_add.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/search_summary.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/segments.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/__init__.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/ligolw_sqlite.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/coincs.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/print_tables.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/process.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
copying glue/ligolw/utils/time_slide.py -> build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/utils
running build_ext
building 'glue.ligolw.tokenizer' extension
creating build/temp.macosx-10.9-x86_64-cpython-312
creating build/temp.macosx-10.9-x86_64-cpython-312/glue
creating build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw
clang -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -Isrc -Iglue/ligolw -I/private/var/folders/jl/fzzqnlqd3752qmr12xjb1qfr0000gt/T/build-env-z3_uowq3/include -I/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12 -c glue/ligolw/tokenizer.RowBuilder.c -o build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw/tokenizer.RowBuilder.o
glue/ligolw/tokenizer.RowBuilder.c:240: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 }, \
^
glue/ligolw/tokenizer.RowBuilder.c:240:2: warning: 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) \
^~~~~~
2 warnings generated.
clang -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -Isrc -Iglue/ligolw -I/private/var/folders/jl/fzzqnlqd3752qmr12xjb1qfr0000gt/T/build-env-z3_uowq3/include -I/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12 -c glue/ligolw/tokenizer.RowDumper.c -o build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw/tokenizer.RowDumper.o
glue/ligolw/tokenizer.RowDumper.c:283: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 }, \
^
glue/ligolw/tokenizer.RowDumper.c:283:2: warning: 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) \
^~~~~~
2 warnings generated.
clang -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -Isrc -Iglue/ligolw -I/private/var/folders/jl/fzzqnlqd3752qmr12xjb1qfr0000gt/T/build-env-z3_uowq3/include -I/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12 -c glue/ligolw/tokenizer.Tokenizer.c -o build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw/tokenizer.Tokenizer.o
glue/ligolw/tokenizer.Tokenizer.c:739: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 }, \
^
glue/ligolw/tokenizer.Tokenizer.c:739:2: warning: 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) \
^~~~~~
2 warnings generated.
clang -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -Isrc -Iglue/ligolw -I/private/var/folders/jl/fzzqnlqd3752qmr12xjb1qfr0000gt/T/build-env-z3_uowq3/include -I/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12 -c glue/ligolw/tokenizer.c -o build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw/tokenizer.o
clang -bundle -undefined dynamic_lookup -Wl,-rpath,/Users/duncanmacleod/opt/mambaforge/envs/py312/lib -L/Users/duncanmacleod/opt/mambaforge/envs/py312/lib -Wl,-rpath,/Users/duncanmacleod/opt/mambaforge/envs/py312/lib -L/Users/duncanmacleod/opt/mambaforge/envs/py312/lib build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw/tokenizer.RowBuilder.o build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw/tokenizer.RowDumper.o build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw/tokenizer.Tokenizer.o build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw/tokenizer.o -o build/lib.macosx-10.9-x86_64-cpython-312/glue/ligolw/tokenizer.cpython-312-darwin.so
building 'glue.ligolw._ilwd' extension
clang -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -fPIC -O2 -isystem /Users/duncanmacleod/opt/mambaforge/envs/py312/include -Isrc -Iglue/ligolw -I/private/var/folders/jl/fzzqnlqd3752qmr12xjb1qfr0000gt/T/build-env-z3_uowq3/include -I/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12 -c glue/ligolw/ilwd.c -o build/temp.macosx-10.9-x86_64-cpython-312/glue/ligolw/ilwd.o
glue/ligolw/ilwd.c:299:24: error: implicit declaration of function 'PyUnicode_GetSize' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
Py_ssize_t tbl_len = PyUnicode_GetSize(tbl);
^
glue/ligolw/ilwd.c:299:24: note: did you mean 'PyUnicode_Resize'?
/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12/unicodeobject.h:208:17: note: 'PyUnicode_Resize' declared here
PyAPI_FUNC(int) PyUnicode_Resize(
^
glue/ligolw/ilwd.c:302:24: warning: incompatible pointer types passing 'PyUnicodeObject *' to parameter of type 'PyObject *' (aka 'struct _object *') [-Wincompatible-pointer-types]
PyUnicode_AsWideChar((PyUnicodeObject *) tbl, buff, tbl_len);
^~~~~~~~~~~~~~~~~~~~~~~
/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12/unicodeobject.h:286:15: note: passing argument to parameter 'unicode' here
PyObject *unicode, /* Unicode object */
^
glue/ligolw/ilwd.c:304:24: warning: incompatible pointer types passing 'PyUnicodeObject *' to parameter of type 'PyObject *' (aka 'struct _object *') [-Wincompatible-pointer-types]
PyUnicode_AsWideChar((PyUnicodeObject *) col, buff + tbl_len + 1, col_len);
^~~~~~~~~~~~~~~~~~~~~~~
/Users/duncanmacleod/opt/mambaforge/envs/py312/include/python3.12/unicodeobject.h:286:15: note: passing argument to parameter 'unicode' here
PyObject *unicode, /* Unicode object */
^
glue/ligolw/ilwd.c:391: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 }, \
^
glue/ligolw/ilwd.c:391:2: warning: 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) \
^~~~~~
4 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
ERROR Backend subprocess exited when trying to invoke build_wheel