summaryrefslogtreecommitdiff
path: root/app-admin/ansible-lint/files/ansible-lint-6.5.2_test-module-check.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-09-02 10:16:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-09-02 10:16:02 +0100
commit02fbebe9426ee05ab39e9b5a56e3529e64160ef6 (patch)
tree4c2a5db6966711f46fbc73aece931b17625e27b7 /app-admin/ansible-lint/files/ansible-lint-6.5.2_test-module-check.patch
parentb052fbf151106a4f47cac7fdf0ffff983decb773 (diff)
gentoo auto-resync : 02:09:2022 - 10:16:01
Diffstat (limited to 'app-admin/ansible-lint/files/ansible-lint-6.5.2_test-module-check.patch')
-rw-r--r--app-admin/ansible-lint/files/ansible-lint-6.5.2_test-module-check.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/app-admin/ansible-lint/files/ansible-lint-6.5.2_test-module-check.patch b/app-admin/ansible-lint/files/ansible-lint-6.5.2_test-module-check.patch
new file mode 100644
index 000000000000..8e6cb512b633
--- /dev/null
+++ b/app-admin/ansible-lint/files/ansible-lint-6.5.2_test-module-check.patch
@@ -0,0 +1,32 @@
+Let the package managers handle dependencies, m'kay?
+
+--- a/conftest.py
++++ b/conftest.py
+@@ -7,27 +7,6 @@
+ import pytest
+ from ansible.module_utils.common.yaml import HAS_LIBYAML
+
+-# checking if user is running pytest without installing test dependencies:
+-missing = []
+-for module in ["ansible", "black", "flake8", "flaky", "mypy", "pylint"]:
+- if not importlib.util.find_spec(module):
+- missing.append(module)
+-if missing:
+- print(
+- f"FATAL: Missing modules: {', '.join(missing)} -- probably you missed installing test requirements with: pip install -e '.[test]'",
+- file=sys.stderr,
+- )
+- sys.exit(1)
+-
+-if not HAS_LIBYAML:
+- # While presence of libyaml is not required for runtime, we keep this error
+- # fatal here in order to be sure that we spot libyaml errors during testing.
+- print(
+- "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.",
+- file=sys.stderr,
+- )
+- sys.exit(1)
+-
+
+ os.environ["NO_COLOR"] = "1"
+