diff --git a/README.rst b/README.rst index 91823b8e..dbcca813 100644 --- a/README.rst +++ b/README.rst @@ -29,4 +29,5 @@ Contributing Do you wish to contribute to IHateMoney? Fantastic! There's a lot of very useful help on the official `contributing -`_ page. \ No newline at end of file +`_ page. + diff --git a/setup.py b/setup.py index ad441c04..63596c4e 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,13 @@ # -*- coding: utf-8 -*- import os +import sys + +from io import open from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) -def read_file(filename): - """Open a related file and return its content.""" - with open(os.path.join(here, filename), "r") as f: - return f.read() - - def parse_requirements(filename): """ load requirements from a pip requirements file """ with open(filename) as lines: @@ -18,7 +15,12 @@ def parse_requirements(filename): return [line for line in lineiter if line and not line.startswith("#")] -README = read_file('README.rst') +README = open('README.rst', encoding='utf-8').read() +CHANGELOG = open('CHANGELOG.rst', encoding='utf-8').read() + +description = u'\n'.join([README, CHANGELOG]) +if sys.version_info.major < 3: + description = description.encode('utf-8') ENTRY_POINTS = { 'paste.app_factory': [ @@ -33,7 +35,7 @@ ENTRY_POINTS = { setup(name='ihatemoney', version='4.1', description='A simple shared budget manager web application.', - long_description=README, + long_description=description, license='Custom BSD Beerware', classifiers=[ "Programming Language :: Python",