Skip to content
Snippets Groups Projects
Commit 688d9a0c authored by Art's avatar Art :lizard:
Browse files

Fix setup.py (yes, another commit) to read from requirements.txt

parent 2703c51a
Branches
Tags
No related merge requests found
import os
from setuptools import setup, find_packages
from pip.req.req_file import parse_requirements
from pip.download import PipSession
README = open(os.path.join(os.path.dirname(__file__), "README.md")).read()
......@@ -7,6 +9,12 @@ README = open(os.path.join(os.path.dirname(__file__), "README.md")).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
def get_requirements_list():
filename = os.path.join(os.path.dirname(__file__), "requirements.txt")
objects = list(parse_requirements(filename, session=PipSession()))
strings = [str(o.req) for o in objects]
return strings
setup(
name='django-ssoauth',
......@@ -20,10 +28,7 @@ setup(
author='Art Lukyanchyk',
author_email='artiom.lukyanchyk@hs-hannover.de',
zip_safe=False,
install_requires=[
'python3-saml',
'Django>=1.11,<2.0'
],
install_requires=get_requirements_list(),
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment