From 3317ee05a9fa64ed8caacc22f8fa3d04562c2840 Mon Sep 17 00:00:00 2001 From: Zbigniew KACPRZAK Date: Tue, 16 Jan 2024 14:30:42 +0100 Subject: [PATCH] let's use requirements file early on wheel build --- setup.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e47ed1d2c..20b4b01ac 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,18 @@ with open("README.rst") as file: long_description = file.read() + +def get_install_requires(): + """Lets read requirements.txt and properly set dependencies. + We keep only one source of required packages, no need to change this file here. + + Another advantage: build will fail if requirements file contains wrong libraries""" + + with open('requirements.txt', 'r') as f: + lines = [a.strip('\n').strip() for a in f.readlines() if not a.startswith('#')] + return [a for a in lines if a] + + setup( name="atlassian-python-api", description="Python Atlassian REST API Wrapper", @@ -25,7 +37,7 @@ package_dir={"atlassian": "atlassian"}, include_package_data=True, zip_safe=False, - install_requires=["deprecated", "requests", "six", "oauthlib", "requests_oauthlib", "jmespath"], + install_requires=get_install_requires(), extras_require={"kerberos": ["requests-kerberos"]}, platforms="Platform Independent", classifiers=[