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:
commit
0811f6eef4
|
@ -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'))"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue