INCF / MUSIC

MUSIC, the MUltiSimulation Coordinator
GNU General Public License v3.0
37 stars 37 forks source link

In Python 3.12, the distutils package is removed #74

Closed musicinmybrain closed 1 year ago

musicinmybrain commented 1 year ago

In Python 3.12, the distutils package is removed: https://github.com/python/cpython/issues/92584


Currently, you can still get import distutils by installing setuptools, so one workaround would be to simply document that setuptools 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 to setuptools would also be pretty straightforward.

hroncok commented 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').

mdjurfeldt commented 1 year ago

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.