summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2012-06-13 23:45:42 +0200
committerFlorent Xicluna <florent.xicluna@gmail.com>2012-06-13 23:45:42 +0200
commit7a051649b03cdda160fe47376b4aa10ec8cdb5c2 (patch)
treef9298257f8f81050b85d97963f2751fb0636b85a /setup.py
parent3778850caaa1193755dc1b798b1dc69cf4980301 (diff)
downloadpep8-7a051649b03cdda160fe47376b4aa10ec8cdb5c2.tar.gz
Update setup.py
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/setup.py b/setup.py
index cdf137c..fd25e1c 100644
--- a/setup.py
+++ b/setup.py
@@ -1,24 +1,20 @@
+# -*- coding: utf-8 -*-
+from __future__ import with_statement
from setuptools import setup, find_packages
def get_version():
- f = open('pep8.py')
- try:
+ with open('pep8.py') as f:
for line in f:
if line.startswith('__version__'):
return eval(line.split('=')[-1])
- finally:
- f.close()
def get_long_description():
descr = []
for fname in 'README.rst', 'CHANGES.txt': # , 'TODO.txt'
- f = open(fname)
- try:
+ with open(fname) as f:
descr.append(f.read())
- finally:
- f.close()
return '\n\n'.join(descr)