mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-29 01:42:37 +02:00
fix install with pip10 (#341)
* fix the docker build with pip10 * maj tricks https://github.com/spiral-project/ihatemoney/pull/341
This commit is contained in:
parent
61f0fdde84
commit
f9cc4e5623
1 changed files with 8 additions and 11 deletions
19
setup.py
19
setup.py
|
@ -2,16 +2,6 @@
|
||||||
import codecs
|
import codecs
|
||||||
import os
|
import os
|
||||||
from setuptools import setup, find_packages
|
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__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
@ -23,6 +13,13 @@ def read_file(filename):
|
||||||
return content
|
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')
|
README = read_file('README.rst')
|
||||||
CHANGELOG = read_file('CHANGELOG.rst')
|
CHANGELOG = read_file('CHANGELOG.rst')
|
||||||
|
|
||||||
|
@ -59,5 +56,5 @@ setup(name='ihatemoney',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
install_requires=install_requires,
|
install_requires=parse_requirements('requirements.txt'),
|
||||||
entry_points=ENTRY_POINTS)
|
entry_points=ENTRY_POINTS)
|
||||||
|
|
Loading…
Reference in a new issue