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
No related tags found
No related merge requests found
import os import os
from setuptools import setup, find_packages 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() 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() ...@@ -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))) 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( setup(
name='django-ssoauth', name='django-ssoauth',
...@@ -20,10 +28,7 @@ setup( ...@@ -20,10 +28,7 @@ setup(
author='Art Lukyanchyk', author='Art Lukyanchyk',
author_email='artiom.lukyanchyk@hs-hannover.de', author_email='artiom.lukyanchyk@hs-hannover.de',
zip_safe=False, zip_safe=False,
install_requires=[ install_requires=get_requirements_list(),
'python3-saml',
'Django>=1.11,<2.0'
],
classifiers=[ classifiers=[
'Environment :: Web Environment', 'Environment :: Web Environment',
'Framework :: Django', 'Framework :: Django',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment