Skip to content

Commit

Permalink
Fix setup.py and requirements files.
Browse files Browse the repository at this point in the history
  • Loading branch information
gskudder-leadtosale committed Jul 24, 2019
1 parent abd703a commit 0017294
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 13 deletions.
24 changes: 21 additions & 3 deletions reqs/dev.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
-r lint.in
-r test.in
-r ql.in
bandit
black
doc8
flake8
flake8-bugbear
flake8-builtins
flake8-commas
flake8-comprehensions
isort
sphinx

coverage
coveralls
flake8
pytest
pytest-cov
pytest-django
tox
versioneer

djangoql

pip-tools
sphinx
Expand Down
7 changes: 5 additions & 2 deletions reqs/requirements.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
Django>=1.11
-r requirements-no-django.in
Django>=1.11
cryptography
pyjwt
requests
requests-oauthlib
18 changes: 10 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

import versioneer

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

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("#")]


BASE_DIR = path.abspath(path.dirname(__file__))
Expand All @@ -35,8 +35,10 @@

requirements = {}
for req, req_file in req_files.items():
reqs = parse_requirements(req_file, session="fake")
requirements[req] = [str(req.req) for req in reqs]
reqs = parse_requirements(req_file)
requirements[req] = reqs

print(requirements)

setup(
name="django_microsoft_auth",
Expand Down

0 comments on commit 0017294

Please sign in to comment.