From f319b6ad44a83e5c27817861761cafa7ac910e28 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 20 Aug 2018 12:47:28 -0700 Subject: [PATCH] Add the ability to make the dev package depend on extras Sometimes we move libraries with API to extras, so the dev package should cause it to be installed. Signed-off-by: Thiago Macieira --- autospec/config.py | 1 + autospec/specfiles.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/autospec/config.py b/autospec/config.py index 80bcbf1..c5caadd 100644 --- a/autospec/config.py +++ b/autospec/config.py @@ -119,6 +119,7 @@ config_options = { "verify_required": "require package verification for build", "security_sensitive": "set flags for security-sensitive builds", "so_to_lib": "add .so files to the lib package instead of dev", + "dev_requires_extras": "dev package requires the extras to be installed", "autoupdate": "this package is trusted enough to automatically update " "(used by other tools)", "compat": "this package is a library compatability package and only " diff --git a/autospec/specfiles.py b/autospec/specfiles.py index d0786da..f13c08c 100644 --- a/autospec/specfiles.py +++ b/autospec/specfiles.py @@ -245,6 +245,8 @@ class Specfile(object): deps["lib"] = ["data", "license"] deps["lib32"] = ["data", "license"] deps["python"] = ["python3"] + if config.config_opts['dev_requires_extras']: + deps["dev"].append("extras") # migration workaround; if we have a python3 or legacypython package # we add an artificial python package