Closed musicinmybrain closed 1 year ago
Rather than from setuptools import sysconfig
, I suggest using the sysconfig
module from Python standard library. In the case of this configure.ac script, distutils.sysconfig.get_python_inc()
can be replaced by sysconfig.get_path('include')
.
Many thanks!
This should now be fixed in commit d49d1a2e. I will create a new release + new Debian packages within a couple of days.
The directory pymusic-old remains there only for reference and is not used.
In Python 3.12, the distutils package is removed: https://github.com/python/cpython/issues/92584
Currently, you can still get
import distutils
by installingsetuptools
, so one workaround would be to simply document thatsetuptools
is needed. I’ve confirmed that this is sufficient to make the Fedora Linux package compatible with the Python 3.12.0a5 pre-release.Migrating from
distutils
tosetuptools
would also be pretty straightforward.configure.ac
,from distutils import sysconfig
can becomefrom setuptools import sysconfig
import sysconfig
.pymusic/setup.py.in
,from distutils.core import setup
can becomefrom setuptools import setup
.pymusic-old/setup.py
,from distutils.core import setup
andfrom distutils.extension import Extension
can be replaced byfrom setuptools import Extension, setup
.pymusic/pymusic.pyx
andpymusic/pybuffer.pyx
, the# distutils: language = c++
comments should still be correctly interpreted by Cython even without distutils.pymusic/tests.py
, the replacement ofdistutils.version import LooseVersion
is a little less straightforward. The easiest thing to do would be to introduce a test dependency onpackaging
: https://packaging.pypa.io/en/stable/version.html