From 19a6a9952f69ab4bcf712d69d3cf1a663c865988 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Mon, 1 Apr 2024 15:15:53 +0200 Subject: [PATCH] Requirements files --- requirements.txt | 1 + requirements_test.txt | 1 + setup.py | 8 +++++--- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 requirements.txt create mode 100644 requirements_test.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f229360 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +requests diff --git a/requirements_test.txt b/requirements_test.txt new file mode 100644 index 0000000..e079f8a --- /dev/null +++ b/requirements_test.txt @@ -0,0 +1 @@ +pytest diff --git a/setup.py b/setup.py index 71f0201..9c59985 100644 --- a/setup.py +++ b/setup.py @@ -15,8 +15,9 @@ with open(PACKAGE_NAME + '/_version.py') as f: del match, text -def read_requirements(path: str): - return f.read().strip().split('\n') +def read_requirements(path: str = 'requirements.txt'): + with open(path) as f: + return f.read().strip().split('\n') def get_short_description(readme: str): @@ -39,9 +40,10 @@ setup( author_email='jonjmaa@gmail.com', url='https://gitfub.space/Jmaa/' + PACKAGE_NAME, packages=[PACKAGE_NAME], - install_requires=['requests'], + install_requires=read_requirements(), extras_require={ 'Request ratelimiting': ['requests_ratelimiter'], 'Request caching': ['requests_cache'], + 'test': read_requirements('requirements_test.txt'), }, )