From 826fa5d9b96bfc715a27deb2fa2592478b112eb2 Mon Sep 17 00:00:00 2001 From: Andrew Doroschenko Date: Mon, 8 Feb 2016 12:51:01 +0300 Subject: [PATCH] Simple form of data reading in README.rst You can read the files with the information increasingly clear --- setup.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 2e6dc9e..a79aec5 100644 --- a/setup.py +++ b/setup.py @@ -18,16 +18,14 @@ if sys.argv[-1] == 'publish': requires = ['psycopg2', 'tablib'] version = '0.1.0' -with open('README.rst', 'r', 'utf-8') as f: - readme = f.read() -with open('HISTORY.rst', 'r', 'utf-8') as f: - history = f.read() +def read(f): + return open(f, encoding='utf-8').read() setup( name='records', version=version, description='SQL for Humans', - long_description=readme + '\n\n' + history, + long_description=read('README.rst') + '\n\n' + read('HISTORY.rst'), author='Kenneth Reitz', author_email='me@kennethreitz.org', url='https://github.com/kennethreitz/records',