meganz/sdk

Python Bindings distutils depricated

AnotherSamWithADream opened this issue · 3 comments

When building the python bindings after running:
./configure --disable-silent-rules --enable-python --disable-examples
I get this error:
configure: error: cannot import Python module "distutils". Please check your Python installation. The error was: <string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
According to the error you should be using setuptools not distutils.
I do not do any C based languages (C, C++, C#) so I wont be able to make the changes.

If you have setuptools installed, use this variable export PYTHONWARNINGS="ignore"

@missemily2022 Even if you have setuptools installed, the configure.sh, what it does is to check that running python -c "import distutils" does not generate output. In recent versions of distutils, this generates a warning, so it does not pass the test, however, using PYTHONWARNINGS="ignore", the interpreter will not generate warnings and should pass the configuration tests.

@jorgeajimenezl Thanks for the Answer.I now need to somehow implement it in GitHub Actions

Well, u can just create a shell script (that export the env variable) that u execute on GitHub Actions