Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/ansible-lint/files/
Date: Wed, 21 Sep 2022 23:54:41
Message-Id: 1663804447.dd8f54d330af2e37385d6d65521b7294711b4b62.marecki@gentoo
1 commit: dd8f54d330af2e37385d6d65521b7294711b4b62
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 21 23:51:36 2022 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 21 23:54:07 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd8f54d3
7
8 app-admin/ansible-lint: add omitted patch
9
10 Closes: https://bugs.gentoo.org/872245
11 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
12
13 .../ansible-lint-6.6.1_test-module-check.patch | 32 ++++++++++++++++++++++
14 1 file changed, 32 insertions(+)
15
16 diff --git a/app-admin/ansible-lint/files/ansible-lint-6.6.1_test-module-check.patch b/app-admin/ansible-lint/files/ansible-lint-6.6.1_test-module-check.patch
17 new file mode 100644
18 index 000000000000..0f6e9aadde9e
19 --- /dev/null
20 +++ b/app-admin/ansible-lint/files/ansible-lint-6.6.1_test-module-check.patch
21 @@ -0,0 +1,32 @@
22 +--- a/conftest.py
23 ++++ b/conftest.py
24 +@@ -7,29 +7,6 @@
25 + import pytest
26 + from ansible.module_utils.common.yaml import HAS_LIBYAML
27 +
28 +-# checking if user is running pytest without installing test dependencies:
29 +-missing = []
30 +-for module in ["ansible", "black", "flake8", "flaky", "mypy", "pylint"]:
31 +- if not importlib.util.find_spec(module):
32 +- missing.append(module)
33 +-if missing:
34 +- print(
35 +- f"FATAL: Missing modules: {', '.join(missing)} -- probably you missed installing test requirements with: pip install -e '.[test]'",
36 +- file=sys.stderr,
37 +- )
38 +- sys.exit(1)
39 +-
40 +-if not HAS_LIBYAML and sys.version_info >= (3, 9, 0):
41 +- # While presence of libyaml is not required for runtime, we keep this error
42 +- # fatal here in order to be sure that we spot libyaml errors during testing.
43 +- #
44 +- # For 3.8.x we do not do this check, as libyaml does not have an arm64 build for py38.
45 +- print(
46 +- "FATAL: For testing, we require pyyaml to be installed with its native extension, missing it would make testing 3x slower and risk missing essential bugs.",
47 +- file=sys.stderr,
48 +- )
49 +- sys.exit(1)
50 +-
51 +
52 + os.environ["NO_COLOR"] = "1"
53 +