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-molecule/
Date: Mon, 14 Jun 2021 12:39:15
Message-Id: 1623674326.2ae540420bf2a539eafce511e3542ec86ae6a6e4.marecki@gentoo
1 commit: 2ae540420bf2a539eafce511e3542ec86ae6a6e4
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 14 12:22:14 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 14 12:38:46 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ae54042
7
8 app-admin/ansible-molecule: initial import
9
10 No python3_10 support due to incomplete dependency chain.
11
12 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
13
14 app-admin/ansible-molecule/Manifest | 1 +
15 .../ansible-molecule/ansible-molecule-3.3.4.ebuild | 84 ++++++++++++++++++++++
16 app-admin/ansible-molecule/metadata.xml | 13 ++++
17 3 files changed, 98 insertions(+)
18
19 diff --git a/app-admin/ansible-molecule/Manifest b/app-admin/ansible-molecule/Manifest
20 new file mode 100644
21 index 00000000000..e44313be1e7
22 --- /dev/null
23 +++ b/app-admin/ansible-molecule/Manifest
24 @@ -0,0 +1 @@
25 +DIST molecule-3.3.4.tar.gz 280980 BLAKE2B af704a8a8d709323441e6e6057bf7a62b0d89aa582eff4d9139b521ed0729c36836f324cd1741f441fae4ed4b9c148de76c2502a01ce5a7b142bfe32bc7fd391 SHA512 8ccc6e121d028bc9d477504a3e5067486d4a3e37f2c27a9686b068c9dac2185db7f965960affb4f9e958bb68d3c3a72786459ea3d221d781377d899b0d75d5a5
26
27 diff --git a/app-admin/ansible-molecule/ansible-molecule-3.3.4.ebuild b/app-admin/ansible-molecule/ansible-molecule-3.3.4.ebuild
28 new file mode 100644
29 index 00000000000..5655e622e75
30 --- /dev/null
31 +++ b/app-admin/ansible-molecule/ansible-molecule-3.3.4.ebuild
32 @@ -0,0 +1,84 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{8..9} )
39 +DISTUTILS_SINGLE_IMPL=1
40 +DISTUTILS_USE_SETUPTOOLS="rdepend"
41 +
42 +inherit distutils-r1
43 +
44 +MY_PN="${PN#ansible-}"
45 +MY_P="${MY_PN}-${PV}"
46 +
47 +DESCRIPTION="A toolkit designed to aid in the development and testing of Ansible roles"
48 +HOMEPAGE="https://pypi.org/project/molecule/ https://github.com/ansible-community/molecule/"
49 +SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
50 +
51 +LICENSE="MIT"
52 +SLOT="0"
53 +KEYWORDS="~amd64"
54 +IUSE="selinux"
55 +
56 +RDEPEND="$(python_gen_cond_dep '
57 + >=app-admin/ansible-lint-5.0.12[${PYTHON_USEDEP}]
58 + <dev-python/cerberus-1.3.3[${PYTHON_USEDEP}]
59 + >=dev-python/click-8.0[${PYTHON_USEDEP}]
60 + dev-python/click-help-colors[${PYTHON_USEDEP}]
61 + dev-python/enrich[${PYTHON_USEDEP}]
62 + dev-python/jinja[${PYTHON_USEDEP}]
63 + dev-python/packaging[${PYTHON_USEDEP}]
64 + <dev-python/paramiko-3[${PYTHON_USEDEP}]
65 + <dev-python/pluggy-1.0[${PYTHON_USEDEP}]
66 + <dev-python/pyyaml-6[${PYTHON_USEDEP}]
67 + dev-python/rich[${PYTHON_USEDEP}]
68 + dev-python/subprocess-tee[${PYTHON_USEDEP}]
69 + >=dev-util/cookiecutter-1.7.3[${PYTHON_USEDEP}]
70 + selinux? ( sys-libs/libselinux[python,${PYTHON_USEDEP}] )
71 +')"
72 +BDEPEND="$(python_gen_cond_dep '
73 + dev-python/setuptools_scm[${PYTHON_USEDEP}]
74 + dev-python/setuptools_scm_git_archive[${PYTHON_USEDEP}]
75 + doc? (
76 + dev-python/simplejson[${PYTHON_USEDEP}]
77 + )
78 + test? (
79 + dev-python/ansi2html[${PYTHON_USEDEP}]
80 + <dev-python/pexpect-5[${PYTHON_USEDEP}]
81 + dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
82 + >=dev-python/pytest-html-3.0.0[${PYTHON_USEDEP}]
83 + dev-python/pytest-mock[${PYTHON_USEDEP}]
84 + dev-python/pytest-plus[${PYTHON_USEDEP}]
85 + dev-python/pytest-testinfra[${PYTHON_USEDEP}]
86 + dev-python/pytest-verbose-parametrize[${PYTHON_USEDEP}]
87 + dev-python/pytest-xdist[${PYTHON_USEDEP}]
88 + )
89 +')"
90 +
91 +S="${WORKDIR}"/${MY_P}
92 +
93 +distutils_enable_sphinx docs '>=dev-python/sphinx-notfound-page-0.7.1' 'dev-python/sphinx_ansible_theme'
94 +distutils_enable_tests --install pytest
95 +
96 +src_prepare() {
97 + default
98 +
99 + if ! use selinux; then
100 + sed -i "/^\s\+selinux/d" setup.cfg || die "Failed to remove dependency on SELinux"
101 + fi
102 +
103 + # Several issues with tests from this file:
104 + # - quite a few of these use the network;
105 + # - test_command_dependency[shell] only works if Molecule has previously been installed;
106 + # - tests involving creation of a new scenario fail on ansible-lint errors, even though
107 + # a config file is deployed which should skip expected issues.
108 + rm -f src/molecule/test/functional/test_command.py
109 + # Uses unpackaged yamllint
110 + rm -f src/molecule/test/unit/cookiecutter/test_molecule.py
111 +}
112 +
113 +python_test() {
114 + distutils_install_for_testing --via-venv
115 + distutils-r1_python_test
116 +}
117
118 diff --git a/app-admin/ansible-molecule/metadata.xml b/app-admin/ansible-molecule/metadata.xml
119 new file mode 100644
120 index 00000000000..4c6fab1b1f5
121 --- /dev/null
122 +++ b/app-admin/ansible-molecule/metadata.xml
123 @@ -0,0 +1,13 @@
124 +<?xml version="1.0" encoding="UTF-8"?>
125 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
126 +<pkgmetadata>
127 + <maintainer type="person">
128 + <email>marecki@g.o</email>
129 + <name>Marek Szuba</name>
130 + </maintainer>
131 + <stabilize-allarches/>
132 + <upstream>
133 + <remote-id type="pypi">molecule</remote-id>
134 + <remote-id type="github">ansible-community/molecule</remote-id>
135 + </upstream>
136 +</pkgmetadata>