Skip to content
Snippets Groups Projects
Commit b83c0e8d authored by schulmax's avatar schulmax
Browse files

Removes requirements.txt and no longer auto-parses requirements in setup.py

This is because pip version >= 10 no longer supports use of "parse_requirements".
Instead you can use the packaging library.
Further info in this issue in the pip repo:
https://github.com/pypa/pip/issues/5248
parent 2a41e7ba
Branches
No related tags found
No related merge requests found
Django>=1.11,<3.0
python3-saml
# binary dependencies:
# sudo apt install libxml2-dev libxslt1-dev xmlsec1 libxmlsec1-dev pkg-config
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()
...@@ -9,13 +7,6 @@ README = open(os.path.join(os.path.dirname(__file__), "README.md")).read() ...@@ -9,13 +7,6 @@ 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',
version='1.0', version='1.0',
...@@ -28,7 +19,10 @@ setup( ...@@ -28,7 +19,10 @@ 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=get_requirements_list(), install_requires=[
'python3-saml',
'Django>=1.11,<3.0'
],
classifiers=[ classifiers=[
'Environment :: Web Environment', 'Environment :: Web Environment',
'Framework :: Django', 'Framework :: Django',
...@@ -42,4 +36,5 @@ setup( ...@@ -42,4 +36,5 @@ setup(
], ],
) )
# binary dependencies:
# sudo apt install libxml2-dev libxslt1-dev xmlsec1 libxmlsec1-dev pkg-config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment