diff --git a/VERSION b/VERSION index 9084fa2..26aaba0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.0 +1.2.0 diff --git a/setup.py b/setup.py index 5308077..16cc7c7 100644 --- a/setup.py +++ b/setup.py @@ -4,24 +4,21 @@ import os import sys from setuptools import setup, find_packages -try: # for pip >= 10 - from pip._internal.req import parse_requirements -except ImportError: # for pip <= 9.0.3 - from pip.req import parse_requirements -import pkg_resources here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'VERSION')) as f: VERSION = f.read().strip() -pr_kwargs = {"session": False} +# Read requirements without using pip internals +def read_requirements(filename): + with open(os.path.join(here, filename)) as f: + return [line.strip() for line in f + if line.strip() and not line.startswith('#') and not line.startswith('-r')] -install_reqs = parse_requirements( - os.path.join( - here, - './requirements.txt' if not sys.argv[1] in ['develop', 'test'] else './requirements-dev.txt' - ), **pr_kwargs) +install_reqs = read_requirements( + './requirements.txt' if not sys.argv[1] in ['develop', 'test'] else './requirements-dev.txt' +) setup( name='discovery', @@ -30,7 +27,7 @@ author_email='tech-notify@clever.com', url='https://github.com/Clever/discovery-python/', packages=['discovery'], - install_requires=[str(ir.requirement) for ir in install_reqs], + install_requires=install_reqs, setup_requires=['nose>=1.0'], test_suite='nose.collector', long_description="""\