diff options
| author | Alexis M <alexis@notmyidea.org> | 2019-09-16 18:54:10 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2019-09-17 11:25:09 +0200 |
| commit | bef973d85e3a81979a003a9bac8d17043af7a82d (patch) | |
| tree | 5a5d2e7e306e4b45f8c6a7a1f795af91cdcf329f /setup.py | |
| parent | fabceefececd0978460ba2446ba43821ceee14a7 (diff) | |
| download | ihatemoney-mirror-bef973d85e3a81979a003a9bac8d17043af7a82d.zip ihatemoney-mirror-bef973d85e3a81979a003a9bac8d17043af7a82d.tar.gz ihatemoney-mirror-bef973d85e3a81979a003a9bac8d17043af7a82d.tar.bz2 | |
Fix setup.py encoding to be py2 and py3 compatible.
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -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", |
