From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/ansible-lint/files/, app-admin/ansible-lint/
Date: Fri, 1 Apr 2022 08:18:26 +0000 (UTC) [thread overview]
Message-ID: <1648801096.278b221bcab2832838c0fd619ea31204109dba76.marecki@gentoo> (raw)
commit: 278b221bcab2832838c0fd619ea31204109dba76
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 30 09:25:22 2022 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Fri Apr 1 08:18:16 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=278b221b
app-admin/ansible-lint: add 6.0.2
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
app-admin/ansible-lint/Manifest | 1 +
app-admin/ansible-lint/ansible-lint-6.0.2.ebuild | 64 ++++++++++++++++++++++
.../ansible-lint-6.0.2_test-module-check.patch | 23 ++++++++
3 files changed, 88 insertions(+)
diff --git a/app-admin/ansible-lint/Manifest b/app-admin/ansible-lint/Manifest
index 349a47f494d5..5f77818c06af 100644
--- a/app-admin/ansible-lint/Manifest
+++ b/app-admin/ansible-lint/Manifest
@@ -1 +1,2 @@
DIST ansible-lint-5.4.0.tar.gz 349353 BLAKE2B 9f41abdf1e9485afa4c8ed9498627b0dcbdcf57916f3b57c9886de8bd806e4e5b34e7e9c2e66b44ac8009a0afcea4d8566900ee8d391eaca61081fa23323c41c SHA512 f1bbbb49eb77991d60b6087646c695a938d328d719bba67707af4ed858de857d383b78490bcf0930cffebd13a0b0abde20269a47e47e4713a37da715a28c5da0
+DIST ansible-lint-6.0.2.tar.gz 195044 BLAKE2B 3334049dd1dc05444c6c362601da8d7e808c6b3473e87613b8892651cecb76058cb0aa370aa5d00cf6bc76ee3b096480fdce52facee4f043c01d6c76084860ba SHA512 a47e79c59dfcf3e36654247bd206581798f2559261142e3943b60e0688d75b5a6332832a9f9127f99b2faa6afff959a33c55fbc80aa5881f064725998420f679
diff --git a/app-admin/ansible-lint/ansible-lint-6.0.2.ebuild b/app-admin/ansible-lint/ansible-lint-6.0.2.ebuild
new file mode 100644
index 000000000000..4acb496bb6ba
--- /dev/null
+++ b/app-admin/ansible-lint/ansible-lint-6.0.2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+DISTUTILS_USE_PEP517=setuptools
+
+inherit distutils-r1
+
+DESCRIPTION="Checks ansible playbooks for practices and behaviour that can be improved"
+HOMEPAGE="https://github.com/ansible/ansible-lint"
+# PyPI tarballs do not contain all the data files needed by the tests
+SRC_URI="https://github.com/ansible/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~riscv"
+
+RDEPEND="
+ >=app-admin/ansible-base-2.12.0[${PYTHON_USEDEP}]
+ >=dev-python/ansible-compat-2.0.2[${PYTHON_USEDEP}]
+ >=dev-python/enrich-1.2.6[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ >=dev-python/rich-9.5.1[${PYTHON_USEDEP}]
+ >=dev-python/ruamel-yaml-0.15.37[${PYTHON_USEDEP}]
+ >=dev-python/wcmatch-7.0[${PYTHON_USEDEP}]
+ >=dev-util/yamllint-1.25.0[${PYTHON_USEDEP}]"
+BDEPEND="
+ >=dev-python/setuptools_scm-3.5.0[${PYTHON_USEDEP}]
+ >=dev-python/setuptools_scm_git_archive-1.0[${PYTHON_USEDEP}]
+ test? (
+ >=dev-python/flaky-3.7.0[${PYTHON_USEDEP}]
+ >=dev-python/pytest-xdist-2.5.0[${PYTHON_USEDEP}]
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.2_test-module-check.patch
+)
+
+# Skip problematic tests:
+# - test_call_from_outside_venv doesn't play nicely with the sandbox
+# - all test_eco and some test_prerun tests require Internet access
+# - as of 5.4.0, test_cli_auto_detect fails even when run manually with tox
+EPYTEST_DESELECT=(
+ test/test_eco.py
+ test/test_main.py::test_call_from_outside_venv
+ test/test_prerun.py::test_install_collection
+ test/test_prerun.py::test_prerun_reqs_v1
+ test/test_prerun.py::test_prerun_reqs_v2
+ test/test_prerun.py::test_require_collection_wrong_version
+ test/test_utils.py::test_cli_auto_detect
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+ # As of 6.0.2, without this the test suite gets confused by the presence of ansible-lint modules
+ # in both ${ED} and ${S}.
+ cd "${S}" || die
+
+ epytest test
+}
diff --git a/app-admin/ansible-lint/files/ansible-lint-6.0.2_test-module-check.patch b/app-admin/ansible-lint/files/ansible-lint-6.0.2_test-module-check.patch
new file mode 100644
index 000000000000..4288bb897c1e
--- /dev/null
+++ b/app-admin/ansible-lint/files/ansible-lint-6.0.2_test-module-check.patch
@@ -0,0 +1,23 @@
+Let the package managers handle dependencies, m'kay?
+
+--- a/conftest.py
++++ b/conftest.py
+@@ -3,18 +3,6 @@
+ import os
+ import sys
+
+-# checking if user is running pytest without installing test dependencies:
+-missing = []
+-for module in ["ansible", "black", "flake8", "flaky", "mypy", "pylint", "pytest_cov"]:
+- 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)
+-
+
+ os.environ["NO_COLOR"] = "1"
+ pytest_plugins = ["ansiblelint.testing.fixtures"]
next reply other threads:[~2022-04-01 8:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 8:18 Marek Szuba [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-03-06 22:06 [gentoo-commits] repo/gentoo:master commit in: app-admin/ansible-lint/files/, app-admin/ansible-lint/ Marek Szuba
2022-11-10 0:42 Marek Szuba
2022-09-21 18:33 Marek Szuba
2022-09-02 0:48 Marek Szuba
2020-02-10 13:29 Tony Vroon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1648801096.278b221bcab2832838c0fd619ea31204109dba76.marecki@gentoo \
--to=marecki@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox