PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
1.97k stars 460 forks source link

distutils was deprecated in Python 3.10 #621

Closed tirkarthi closed 1 year ago

tirkarthi commented 2 years ago

https://github.com/PyWavelets/pywt/blob/b3d9d41b5da9fb83a1a4b4c05d298c66af1981fa/setup.py#L10

Ref : https://www.python.org/dev/peps/pep-0632/#migration-advice

Something like below can be used with sysconfig that is compatible.

>>> import os, sysconfig
>>> os.path.dirname(sysconfig.get_config_h_filename())
'/usr/include/python3.8'
>>> import distutils
>>> distutils.sysconfig.get_python_inc()
'/usr/include/python3.8
rgommers commented 2 years ago

@tirkarthi thanks, we are very much aware of the deprecation of distutils. We only seem to be using it directly in two places in setup.py, so it should not be hard to fix that up - let's do that before the next release.

I assume that you're just seeing a warning, and nothing actually broke?

tirkarthi commented 2 years ago

Yes, it's only a deprecation warning during function calls. I am just raising issues in top pypi projects regarding distutils and pywt was one of them.