pothosware / SoapySDR

Vendor and platform neutral SDR support library.
https://github.com/pothosware/SoapySDR/wiki
Boost Software License 1.0
1.12k stars 179 forks source link

Remove deprecated use of distutils, fix for Python 3.12+ #424

Closed ryanvolz closed 5 months ago

ryanvolz commented 1 year ago

This switches to using sysconfig from distutils, which is necessary for Python 3.12+ since distutils is deprecated and has been removed.

It is necessary to specify the install scheme when a prefix other than the Python default is used so that changes to the default scheme made by distributions (e.g. Debian, Fedora) do not produce an incorrect Python installation directory. For example, Debian patches the default scheme to prepend the path with '/local', but if a user specifies a prefix of '/usr/local', then the path using the default scheme would be '/usr/local/local/...' with a duplicated 'local' directory. Specifying an unmodified install scheme fixes that. This comes from experience in having to do a similar change with GNU Radio.

I tried this with the conda-forge package on top of the latest release (0.8.1), and it got the build passing for Python 3.12.

Fixes #375.