[arch-commits] Commit in molecule/trunk (PKGBUILD)

David Runge dvzrv at archlinux.org
Wed Dec 2 22:46:36 UTC 2020


    Date: Wednesday, December 2, 2020 @ 22:46:36
  Author: dvzrv
Revision: 769363

upgpkg: molecule 3.2.0-1: Upgrade to 3.2.0.

Add and remove dependencies, as changed by upstream.
Switch to using python-pytest-testinfra (used to be python-testinfra).
Simplify check() by only running unit tests.
Report bug to upstream irt test collection problems.

Modified:
  molecule/trunk/PKGBUILD

----------+
 PKGBUILD |   55 +++++++++++++++++++++++++++----------------------------
 1 file changed, 27 insertions(+), 28 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-12-02 22:03:27 UTC (rev 769362)
+++ PKGBUILD	2020-12-02 22:46:36 UTC (rev 769363)
@@ -1,41 +1,36 @@
 # Maintainer: David Runge <dvzrv at archlinux.org>
 
 pkgname=molecule
-pkgver=3.1.5
-pkgrel=3
+pkgver=3.2.0
+pkgrel=1
 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-click-help-colors' 'python-cookiecutter' 'python-enrich' 'python-jinja'
+'python-packaging' 'python-paramiko' 'python-pluggy' 'python-rich'
+'python-selinux' 'python-subprocess-tee' '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')
+checkdepends=('ansible-lint' 'python-ansi2html' 'python-mock' 'python-pexpect'
+'python-pytest' 'python-pytest-helpers-namespace' 'python-pytest-html'
+'python-pytest-mock' 'python-pytest-testinfra'
+'python-pytest-verbose-parametrize' 'python-pytest-verbose-parametrize'
+'python-pytest-xdist')
 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')
+            'python-pytest-testinfra: for the testinfra verifier')
 source=("https://files.pythonhosted.org/packages/source/${pkgname::1}/${pkgname}/${pkgname}-${pkgver}.tar.gz")
-sha512sums=('0c9709f09bb5a5555cadd2c00e00ddad2a8cdae727aacde86e2f930efe3506a2681e500ead612aa3c68f5119b7c936c64be32dffd2e844b0c7819c55ffe00eb7')
-b2sums=('4ba9cb2fd549dc1b43fb0247a1872002120ff471d90fedced0f9f17e42e2bb192aa05633170d7225c8b9f4d490d1494f170f9a073e75b8217f6711deb4aa5fff')
+sha512sums=('3dc25f910d1b12659267c8acac404c1a23fb54cb54c134f6cc649305b87ed8419792b7446bf5b38d83665f00bfa570e2667dbb2b47cf41d7018cef3911d25a29')
+b2sums=('34db52d36a4085ac23287b824be50b02cad9e8d6defc25c8f39e47c063c1654ec6320ebd32952d52fbd85255a1c32c2dfb28b3fb11c01910d91a9cc084e75099')
 
 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
+  sed -e '/addopts/d' -i setup.cfg
 }
 
 build() {
@@ -45,19 +40,23 @@
 
 check() {
   cd "$pkgname-$pkgver"
-  # installing into test location, so pytest can pick up the executable
-  mkdir -vp test_dir
+  local _python_version="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')"
+  local _test_dir='test_dir'
+
+  # install into test location
+  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}"
+    --root="${_test_dir}"
+
+  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
+
+  # skip collection of broken pkg_resources tests: https://github.com/ansible-community/molecule/issues/3004
   pytest -v \
-         --ignore='lib/molecule/test/functional/conftest.py' \
-         --ignore='lib/molecule/test/functional/test_command.py'
+         --ignore="${_test_dir}/usr/lib/python${_python_version}/site-packages/molecule/test/unit/command/test_converge.py" \
+         --ignore="${_test_dir}/usr/lib/python${_python_version}/site-packages/molecule/test/unit/test_shell.py" \
+         "${_test_dir}/usr/lib/python${_python_version}/site-packages/molecule/test/unit/"
 }
 
 package() {



More information about the arch-commits mailing list