Skip to content

Commit 3bc66d0

Browse files
zbika73gonchik
andauthored
let's use requirements file early on wheel build (#1298)
Co-authored-by: Gonchik Tsymzhitov <gonchik.tsymzhitov@atlassiancommunity.com>
1 parent 4f8c6f1 commit 3bc66d0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

setup.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88
with open("README.rst") as file:
99
long_description = file.read()
1010

11+
12+
def get_install_requires():
13+
"""Lets read requirements.txt and properly set dependencies.
14+
We keep only one source of required packages, no need to change this file here.
15+
16+
Another advantage: build will fail if requirements file contains wrong libraries"""
17+
18+
with open('requirements.txt', 'r') as f:
19+
lines = [a.strip('\n').strip() for a in f.readlines() if not a.startswith('#')]
20+
return [a for a in lines if a]
21+
22+
1123
setup(
1224
name="atlassian-python-api",
1325
description="Python Atlassian REST API Wrapper",
@@ -25,7 +37,7 @@
2537
package_dir={"atlassian": "atlassian"},
2638
include_package_data=True,
2739
zip_safe=False,
28-
install_requires=["deprecated", "requests", "six", "oauthlib", "requests_oauthlib", "jmespath", "beautifulsoup4"],
40+
install_requires=get_install_requires(),
2941
extras_require={"kerberos": ["requests-kerberos"]},
3042
platforms="Platform Independent",
3143
classifiers=[

0 commit comments

Comments
 (0)