1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #3824 from haypo/setuptools_res_warn

Fix a ResourceWarning in setuptools_build
This commit is contained in:
Xavier Fernandez 2016-07-21 13:35:58 +02:00 committed by GitHub
commit 0811f6eef4

View file

@ -1,6 +1,8 @@
# Shim to wrap setup.py invocation with setuptools
SETUPTOOLS_SHIM = (
"import setuptools, tokenize;__file__=%r;"
"exec(compile(getattr(tokenize, 'open', open)(__file__).read()"
".replace('\\r\\n', '\\n'), __file__, 'exec'))"
"f=getattr(tokenize, 'open', open)(__file__);"
"code=f.read().replace('\\r\\n', '\\n');"
"f.close();"
"exec(compile(code, __file__, 'exec'))"
)