From d6c2e8c8c324ad5577ca88ceb5d6d66e72ed0816 Mon Sep 17 00:00:00 2001 From: Draper <27962761+Drapersniper@users.noreply.github.com> Date: Sat, 10 Oct 2020 00:32:29 +0100 Subject: [PATCH] Add bundled install extras. (#4443) * add an `[all]` extras_requires * can go here * add a [dev] which includes [all] + development extras (style, test, docs) * special case all and dev in update message * Optimize by changing the place of the check for "special" extras Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- redbot/core/events.py | 2 +- setup.cfg | 7 +++++++ tools/dev-requirements.txt | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/redbot/core/events.py b/redbot/core/events.py index edf994c08..8d47c5cf9 100644 --- a/redbot/core/events.py +++ b/redbot/core/events.py @@ -119,7 +119,7 @@ def init_events(bot, cli_flags): if expected_version(current_python, py_version_req): installed_extras = [] for extra, reqs in red_pkg._dep_map.items(): - if extra is None: + if extra is None or extra in {"dev", "all"}: continue try: pkg_resources.require(req.name for req in reqs) diff --git a/setup.cfg b/setup.cfg index 51a6c75b8..1a5d3313c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -111,6 +111,13 @@ test = six==1.15.0 toml==0.10.1 wrapt==1.12.1 +all = + %(postgres)s +dev = + %(all)s + %(docs)s + %(style)s + %(test)s [options.entry_points] console_scripts = diff --git a/tools/dev-requirements.txt b/tools/dev-requirements.txt index c2422e23d..962b6480a 100644 --- a/tools/dev-requirements.txt +++ b/tools/dev-requirements.txt @@ -1,3 +1,3 @@ packaging tox --e .[docs,postgres,style,test] +-e .[dev]