From 9c5f1ea6ebc9a7cfdbf095cc36edf123be076f2a Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Wed, 5 Sep 2012 17:05:46 +0200 Subject: [PATCH] Fix setup.py compatibility with Pypy. Closes GH-394. --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 941280ae2..78a5f9808 100644 --- a/setup.py +++ b/setup.py @@ -70,8 +70,9 @@ try: os.unlink(os.path.join('src', 'version.py')) except OSError: # Does not exist pass -open(os.path.join('src', 'version.py'), 'a').write( - "version = '0.83.4.1+limnoria %s'\n" % version) +fd = open(os.path.join('src', 'version.py'), 'a') +fd.write("version = '0.83.4.1+limnoria %s'\n" % version) +fd.close() def normalizeWhitespace(s): return ' '.join(s.split())