Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip10+ compatibility #3

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
import os
import sys
import re
import pip

from setuptools import setup, find_packages
from pip.req import parse_requirements

try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError: # for pip <= 9.0.3
from pip.req import parse_requirements

if sys.argv[-1] == "publish":
os.system("python setup.py sdist upload")
Expand All @@ -19,11 +22,11 @@

# Handle requirements
requires = parse_requirements("requirements/install.txt",
session=pip.download.PipSession())
session='pip10hack')
install_requires = [str(ir.req) for ir in requires]

requires = parse_requirements("requirements/tests.txt",
session=pip.download.PipSession())
session='pip10hack')
tests_require = [str(ir.req) for ir in requires]

# Convert markdown to rst
Expand Down