Skip to content

Replaced distutils in test_image_access.py#4814

Merged
hugovk merged 2 commits intopython-pillow:masterfrom
radarhere:sysconfig
Jul 29, 2020
Merged

Replaced distutils in test_image_access.py#4814
hugovk merged 2 commits intopython-pillow:masterfrom
radarhere:sysconfig

Conversation

@radarhere
Copy link
Copy Markdown
Member

For #4796, similar to #4809

Replaces

from distutils import sysconfig

with

import sysconfig

and

sysconfig.get_python_inc()

with

sysconfig.get_config_var("INCLUDEPY")

Also removes a print statement.

However, this test is skipped on CIs, so this PR passing is not good evidence that my changes are correct. Instead, I created radarhere@73f8d40 to check that the values with and without distutils are the same - passing on AppVeyor and MSYS2 MINGW32.

@radarhere
Copy link
Copy Markdown
Member Author

In a move that's up for debate, I've added another commit, so that distutils is no longer explicitly imported - instead, I'm importing the distutils function from where it is imported in setuptools.

@radarhere radarhere changed the title Replaced distutils sysconfig in test_image_access.py Replaced distutils in test_image_access.py Jul 26, 2020
@hugovk hugovk merged commit 48c7d84 into python-pillow:master Jul 29, 2020
@hugovk
Copy link
Copy Markdown
Member

hugovk commented Jul 29, 2020

Thank you!

@hugovk hugovk mentioned this pull request Jul 29, 2020
@radarhere radarhere deleted the sysconfig branch July 29, 2020 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants