diff options
| author | mduret <mathieu.duret@gmail.com> | 2018-07-16 22:08:15 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2018-07-16 22:08:15 +0200 |
| commit | f9cc4e56230ce04f58d457bfc8f468d56e53cb36 (patch) | |
| tree | 057897b36c2742d2ce24fdac5476487714f12d59 | |
| parent | 61f0fdde84a193e117e82052df536e658c91f3e5 (diff) | |
| download | ihatemoney-mirror-f9cc4e56230ce04f58d457bfc8f468d56e53cb36.zip ihatemoney-mirror-f9cc4e56230ce04f58d457bfc8f468d56e53cb36.tar.gz ihatemoney-mirror-f9cc4e56230ce04f58d457bfc8f468d56e53cb36.tar.bz2 | |
fix install with pip10 (#341)
* fix the docker build with pip10
* maj tricks https://github.com/spiral-project/ihatemoney/pull/341
| -rw-r--r-- | setup.py | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -2,16 +2,6 @@ import codecs import os from setuptools import setup, find_packages -try: - from pip.req import parse_requirements - from pip.download import PipSession -except ImportError: - print('Cannot find pip.') - raise - -# Get requirements from the requirements.txt file. -pip_requirements = parse_requirements("requirements.txt", session=PipSession()) -install_requires = [str(ir.req) for ir in pip_requirements] here = os.path.abspath(os.path.dirname(__file__)) @@ -23,6 +13,13 @@ def read_file(filename): return content +def parse_requirements(filename): + """ load requirements from a pip requirements file """ + with open(filename) as lines: + lineiter = (line.strip() for line in lines) + return [line for line in lineiter if line and not line.startswith("#")] + + README = read_file('README.rst') CHANGELOG = read_file('CHANGELOG.rst') @@ -59,5 +56,5 @@ setup(name='ihatemoney', packages=find_packages(), include_package_data=True, zip_safe=False, - install_requires=install_requires, + install_requires=parse_requirements('requirements.txt'), entry_points=ENTRY_POINTS) |
