From 37bfe3415c675ea8019d1d4c411cb8961f705987 Mon Sep 17 00:00:00 2001 From: William Douglas Date: Wed, 17 Oct 2018 10:38:38 -0700 Subject: [PATCH] Don't add python test buildreqs Python package's test requirements can often require alternate versions of packages in Clear Linux and can introduce dependency cycles. To avoid this, exclude sections marked for tests from build dependency consideration. --- autospec/buildreq.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autospec/buildreq.py b/autospec/buildreq.py index 9d21728..3fb46d9 100644 --- a/autospec/buildreq.py +++ b/autospec/buildreq.py @@ -434,6 +434,13 @@ def grab_python_requirements(descfile): lines = f.readlines() for line in lines: + # don't add the test section + if clean_python_req(line) == '[test]': + break + if clean_python_req(line) == '[testing]': + break + if clean_python_req(line) == '[dev]': + break add_requires(clean_python_req(line))