From 1ac6b67551025381cfeabae91ada452fc6ab095c Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Mon, 3 Oct 2022 15:11:44 +0200 Subject: [PATCH] Improve requirements reader --- setup.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 7c00ef18..d9248638 100644 --- a/setup.py +++ b/setup.py @@ -21,13 +21,26 @@ README = (HERE / "README.md").read_text() with open(HERE / "requirements/base.txt") as f: - requirements = f.read().splitlines() + requirements = [ + line + for line in f.read().splitlines() + if not line.startswith(("#", "-")) and len(line) + ] with open(HERE / "requirements/development.txt") as f: - requirements_dev = f.read().splitlines() + requirements_dev = [ + line + for line in f.read().splitlines() + if not line.startswith(("#", "-")) and len(line) + ] + with open(HERE / "requirements/documentation.txt") as f: - requirements_docs = f.read().splitlines() + requirements_docs = [ + line + for line in f.read().splitlines() + if not line.startswith(("#", "-")) and len(line) + ] # ############################################################################