[arch-commits] Commit in molecule/repos (2 files)

Felix Yan felixonmars at archlinux.org
Tue Nov 10 04:04:21 UTC 2020


    Date: Tuesday, November 10, 2020 @ 04:04:20
  Author: felixonmars
Revision: 748442

archrelease: copy trunk to community-staging-any

Added:
  molecule/repos/community-staging-any/
  molecule/repos/community-staging-any/PKGBUILD
    (from rev 748437, molecule/trunk/PKGBUILD)

----------+
 PKGBUILD |   71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

Copied: molecule/repos/community-staging-any/PKGBUILD (from rev 748437, molecule/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-11-10 04:04:20 UTC (rev 748442)
@@ -0,0 +1,71 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=molecule
+pkgver=3.1.5
+pkgrel=2
+pkgdesc="Aids in the development and testing of Ansible roles"
+arch=('any')
+url="https://github.com/ansible-community/molecule"
+license=('MIT')
+depends=('ansible' 'python-cerberus' 'python-click' 'python-click-completion'
+'python-click-help-colors' 'python-colorama' 'python-cookiecutter'
+'python-jinja' 'python-packaging' 'python-paramiko' 'python-pexpect'
+'python-pluggy' 'python-rich' 'python-selinux' 'python-sh' 'python-tabulate'
+'python-tree-format' 'python-yaml' 'yamllint')
+makedepends=('python-setuptools-scm' 'python-simplejson')
+# TODO: python-pytest-plus
+checkdepends=('ansible-lint' 'python-ansi2html' 'python-mock' 'python-pytest'
+'python-pytest-cov' 'python-pytest-helpers-namespace' 'python-pytest-html'
+'python-pytest-mock' 'python-pytest-verbose-parametrize'
+'python-pytest-verbose-parametrize' 'python-pytest-xdist' 'python-testinfra')
+optdepends=('molecule-docker: for the docker driver'
+            'molecule-podman: for the podman driver'
+            'molecule-vagrant: for the vagrant driver'
+            'python-pywinrm: for Windows support'
+            'python-testinfra: for the testinfra verifier')
+source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz")
+sha512sums=('0c9709f09bb5a5555cadd2c00e00ddad2a8cdae727aacde86e2f930efe3506a2681e500ead612aa3c68f5119b7c936c64be32dffd2e844b0c7819c55ffe00eb7')
+b2sums=('4ba9cb2fd549dc1b43fb0247a1872002120ff471d90fedced0f9f17e42e2bb192aa05633170d7225c8b9f4d490d1494f170f9a073e75b8217f6711deb4aa5fff')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  # python-pre-commit is absolutely not a runtime dependency
+  # remove additional pytest options
+  # unpin python-sh
+  sed -e '/pre-commit/d' \
+      -e '/addopts/d' \
+      -e 's/, < 1.14//g' \
+      -i setup.cfg
+}
+
+build() {
+  cd "$pkgname-$pkgver"
+  python setup.py build
+}
+
+check() {
+  cd "$pkgname-$pkgver"
+  # installing into test location, so pytest can pick up the executable
+  mkdir -vp test_dir
+  python setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="test_dir"
+  local python_version="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')"
+  export PYTHONPATH="${PWD}/test_dir/usr/lib/python${python_version}/site-packages/:${PYTHONPATH}"
+  export PATH="${PWD}/test_dir/usr/bin:${PATH}"
+  # do not run functional tests
+  pytest -v \
+         --ignore='lib/molecule/test/functional/conftest.py' \
+         --ignore='lib/molecule/test/functional/test_command.py'
+}
+
+package() {
+  cd "$pkgname-$pkgver"
+  python setup.py install --skip-build \
+                          --optimize=1 \
+                          --root="${pkgdir}"
+  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -vDm 644 README.rst \
+    -t "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list