Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.2.0
21 changes: 9 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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="""\
Expand Down