Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Bindings distutils depricated #2619

Open
samthebest699 opened this issue May 22, 2022 · 6 comments
Open

Python Bindings distutils depricated #2619

samthebest699 opened this issue May 22, 2022 · 6 comments

Comments

@samthebest699
Copy link

samthebest699 commented May 22, 2022

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.

@jorgeajimenezl
Copy link

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

@jorgeajimenezl
Copy link

@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
Copy link

jorgeajimenezl commented Jun 11, 2022

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@jorgeajimenezl @samthebest699 and others