Skip to content

Commit

Permalink
Merge pull request #9 from ssable/fix-new-pip
Browse files Browse the repository at this point in the history
Fix setup to work with pip 10
  • Loading branch information
cyprieng authored May 20, 2018
2 parents cbd4c26 + 940de2c commit b59705f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from pip.req import parse_requirements
try:
from setuptools import setup
except ImportError:
from distutils.core import setup

def parse_requirements(filename):
""" load requirements from a pip requirements file """
lineiter = (line.strip() for line in open(filename))
return [line for line in lineiter if line and not line.startswith("#")]

with open('README.rst') as readme_file:
readme = readme_file.read()

with open('HISTORY.rst') as history_file:
history = history_file.read()

requirements = [str(i.req) for i in parse_requirements('requirements.txt', session=False)]
test_requirements = [str(i.req) for i in parse_requirements('requirements_dev.txt', session=False)]
requirements = parse_requirements('requirements.txt')
test_requirements = parse_requirements('requirements_dev.txt')

setup(
name='swagger_stub',
Expand Down

0 comments on commit b59705f

Please sign in to comment.