Skip to content

Conversation

@YakoYakoYokuYoku
Copy link
Member

PR Description

What type of PR is this? (Check one of the boxes below)

  • Bug fix (non-breaking change which fixes an issue)

What does this pull request do?

Running QMake to generate the Makefiles displays various DeprecationWarnings under Python 3.10 due to the usage of distutils, which is indeed deprecated. Replacing the usage of the module with site maintains compatibility with Python 2.7.

Show a few screenshots (if this is a visual change)

>>> from distutils.sysconfig import get_python_lib
<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
<string>:1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead
>>> print(get_python_lib())
/usr/lib/python3.10/site-packages
>>> # Although ``site`` fits the bill
>>> import site
>>> print(site.getsitepackages()[0])
/usr/lib/python3.10/site-packages

Have you tested your changes (if applicable)? If so, how?

By building Natron.

Futher details of this pull request

I'm planning to do the same for the initialization process by using both site and sysconfig.

@devernay devernay merged commit 73f1ffe into RB-2.5 Feb 1, 2022
@YakoYakoYokuYoku YakoYakoYokuYoku deleted the site-info-global branch June 18, 2022 18:53
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

Successfully merging this pull request may close these issues.

3 participants