aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-06-25 13:49:58 -0400
committerGitHub <noreply@github.com>2018-06-25 13:49:58 -0400
commit5c816483500519a07a3db4364daaced379780eb7 (patch)
tree80969e02705d41d9a48c7dcc244661bd594e593e
parent818ba40529993d8f318fe282bdb8420455dbf926 (diff)
parentd8bd6dde9378c58daf71bf88d805ae0d4b5e03dc (diff)
downloadexternal_python_setuptools-5c816483500519a07a3db4364daaced379780eb7.tar.gz
external_python_setuptools-5c816483500519a07a3db4364daaced379780eb7.tar.bz2
external_python_setuptools-5c816483500519a07a3db4364daaced379780eb7.zip
Merge pull request #1398 from wimglenn/wimglenn-patch-1
Avoid resource warning from dev scripts installed editable
-rw-r--r--setuptools/script (dev).tmpl3
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/script (dev).tmpl b/setuptools/script (dev).tmpl
index d58b1bb5..39a24b04 100644
--- a/setuptools/script (dev).tmpl
+++ b/setuptools/script (dev).tmpl
@@ -2,4 +2,5 @@
__requires__ = %(spec)r
__import__('pkg_resources').require(%(spec)r)
__file__ = %(dev_path)r
-exec(compile(open(__file__).read(), __file__, 'exec'))
+with open(__file__) as f:
+ exec(compile(f.read(), __file__, 'exec'))