1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 pkgname=molecule-plugins
6 pkgdesc="Collection of molecule plugins"
8 url="https://github.com/ansible-community/molecule-plugins"
13 python-boto3 # for ec2 driver
14 python-cryptography # for ec2 driver
16 python-packaging # required for podman driver
31 python-google-api-python-client
35 python-pytest-helpers-namespace
40 'python-pycryptodome: for GCE playbooks'
41 'python-google-auth: for GCE playbooks'
42 'python-google-api-python-client: for GCE playbooks'
43 'python-vagrant: for vagrant module'
58 https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz
59 $pkgname-23.4.1-molecule_internals.patch
61 sha512sums=('5c158e278318402006f9f86f4143dac27d0cf6e95912963414e9c06720f9b5572240a6b6ddaccbd2872bb594144215a4a5ec434f4414e692fb72a3d97de175d3'
62 '11822fbd65ba7ccc796e454c015fe765a811e82bd89dc0727201cd45495907df3f808be967d73f45473c073816f9db5c072f32dbcab807229d7c7cf82de9101c')
63 b2sums=('e0261d189e55b0705ff2e967620146dd6ef0bc4182a6e87d5ffdaf8e1298dc0bc9e9bb188669300b63cf692f822ad6b0d4c8038fc1cff6afbf7f79b61dfbc184'
64 '62bb11057e5c429229a033ca8911b836817c456270077469decf608c9c9927c425e1c647a54f5370b4cabb644cfb0a1e44e0166b6a4f21912ce4e430f6b56a8f')
67 # fix issues with vagrant plugin using molecule internals that are now gone:
68 # https://github.com/ansible-community/molecule-plugins/pull/142
69 # https://bugs.archlinux.org/task/78447
70 patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-23.4.1-molecule_internals.patch
75 python -m build --wheel --no-isolation
79 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
80 local pytest_options=(
81 --deselect test/azure/functional/test_azure.py::test_command_init_scenario
82 --deselect test/containers/functional/test_containers.py::test_command_init_scenario
83 --deselect test/podman/test_func.py::test_command_init_scenario
84 --deselect test/podman/test_func.py::test_sample
85 --deselect test/podman/test_func.py::test_dockerfile
86 --deselect test/vagrant/functional/test_func.py::test_command_init_scenario
87 --deselect test/vagrant/functional/test_func.py::test_invalid_settings
88 --deselect test/vagrant/functional/test_func.py::test_vagrant_root[vagrant_root]
89 --deselect test/vagrant/functional/test_func.py::test_vagrant_root[config_options]
90 --deselect test/vagrant/functional/test_func.py::test_vagrant_root[provider_config_options]
91 --deselect test/vagrant/functional/test_func.py::test_vagrant_root[default]
92 --deselect test/vagrant/functional/test_func.py::test_vagrant_root[default-compat]
93 --deselect test/vagrant/functional/test_func.py::test_vagrant_root[network]
94 --deselect test/vagrant/functional/test_func.py::test_vagrant_root[hostname]
95 --deselect test/vagrant/functional/test_func.py::test_multi_node
100 # install to temporary location, as importlib is used
101 python -m installer --destdir=test_dir dist/*.whl
102 export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
103 # skip tests that would fail because of missing interpreters: https://github.com/pdm-project/pdm/issues/1175
104 pytest "${pytest_options[@]}"
109 python -m installer --destdir="$pkgdir" dist/*.whl
110 install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
111 install -vDm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
112 install -vDm 644 doc/ec2/*.rst -t "$pkgdir/usr/share/doc/$pkgname/ec2"
113 install -vDm 644 doc/vagrant/*.rst -t "$pkgdir/usr/share/doc/$pkgname/vagrant"