Correct setup.py

On Debian Jessie with pip install :

Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-o_ERWm-build/setup.py", line 16, in <module>
        with open('requirements.txt', encoding='utf-8') as reqs:
    TypeError: 'encoding' is an invalid keyword argument for this function
This commit is contained in:
Julien Sabatier 2015-10-15 15:15:48 +02:00 committed by Yohan Boniface
parent 6fe7119cbb
commit 637cfc3126

View file

@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import codecs
import io
from setuptools import setup, find_packages
@ -13,7 +14,7 @@ long_description = codecs.open('README.md', "r", "utf-8").read()
def is_pkg(line):
return line and not line.startswith(('--', 'git', '#'))
with open('requirements.txt', encoding='utf-8') as reqs:
with io.open('requirements.txt', encoding='utf-8') as reqs:
install_requires = [l for l in reqs.read().split('\n') if is_pkg(l)]
setup(