From 9e3d510d9903c12ca506103426637a6bffb9ee74 Mon Sep 17 00:00:00 2001 From: Julian Coy Date: Tue, 26 Dec 2023 11:37:48 -0500 Subject: [PATCH] Fixed documentation for package requirements. (#54) (#56) Co-authored-by: Chris Spencer --- .gitignore | 2 ++ MANIFEST.in | 2 ++ setup.py | 16 +++++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 MANIFEST.in diff --git a/.gitignore b/.gitignore index 9ad3be5..3c0058f 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,5 @@ docs/_build/ godaddypy.iml .cache/ venv*/ +*.out +*.geany diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..2c6e426 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include requirements.txt +include requirements-dev.txt diff --git a/setup.py b/setup.py index 20d56be..6799625 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,22 @@ #!/usr/bin/env python +import os import re from setuptools import setup +CURRENT_DIR = os.path.abspath(os.path.dirname(__file__)) + +def get_reqs(*fns): + lst = [] + for fn in fns: + for package in open(os.path.join(CURRENT_DIR, fn)).readlines(): + package = package.strip() + if not package: + continue + lst.append(package.strip()) + return lst + with open("godaddypy/__init__.py", "r") as f: version_match = re.search(r"^__version__\s*=\s*[\'\"]([^\'\"]*)[\'\"]", f.read(), re.MULTILINE) @@ -24,7 +37,8 @@ author_email="julian.calvin.coy@gmail.com", url="https://github.com/eXamadeus/godaddypy", packages=["godaddypy"], - install_requires=["requests>=2.4"], + install_requires=get_reqs('requirements.txt'), + tests_require=get_reqs('requirements-dev.txt'), classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers",