From 7167a7c626f86bcce881a98931803f72c949a2b1 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Fri, 10 Sep 2021 17:52:01 +0800 Subject: [PATCH] alvistack/3.5.1 git clean -xdf tar zcvf ../python-molecule_3.5.1.orig.tar.gz --exclude=.git . debuild -uc -us cp python-molecule.spec ../python-molecule_3.5.1-1.spec mv ../python*-molecule*3.5.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-3.5.1/ rm -rf ../python*-molecule*3.5.1*.* Signed-off-by: Wong Hoi Sing Edison --- .gitignore | 1 + .../molecule.bash-completion.sh | 29 ++++ debian/.gitignore | 6 + debian/changelog | 5 + debian/control | 45 +++++ debian/copyright | 0 debian/python3-molecule.lintian-overrides | 6 + debian/rules | 17 ++ debian/source/format | 1 + debian/source/lintian-overrides | 3 + python-molecule.spec | 164 ++++++++++++++++++ setup.cfg | 12 +- setup.py | 5 +- 13 files changed, 280 insertions(+), 14 deletions(-) create mode 100644 asset/bash_completion/molecule.bash-completion.sh create mode 100644 debian/.gitignore create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/python3-molecule.lintian-overrides create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/lintian-overrides create mode 100644 python-molecule.spec diff --git a/.gitignore b/.gitignore index 0f685ad73d..6aaeab3298 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ pip-wheel-metadata docs/docstree .docker molecule/** +.pybuild/ diff --git a/asset/bash_completion/molecule.bash-completion.sh b/asset/bash_completion/molecule.bash-completion.sh new file mode 100644 index 0000000000..d6015715b5 --- /dev/null +++ b/asset/bash_completion/molecule.bash-completion.sh @@ -0,0 +1,29 @@ +_molecule_completion() { + local IFS=$'\n' + local response + + response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD _MOLECULE_COMPLETE=bash_complete $1) + + for completion in $response; do + IFS=',' read type value <<< "$completion" + + if [[ $type == 'dir' ]]; then + COMREPLY=() + compopt -o dirnames + elif [[ $type == 'file' ]]; then + COMREPLY=() + compopt -o default + elif [[ $type == 'plain' ]]; then + COMPREPLY+=($value) + fi + done + + return 0 +} + +_molecule_completion_setup() { + complete -o nosort -F _molecule_completion molecule +} + +_molecule_completion_setup; + diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000000..7dbf6695fe --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,6 @@ +*.substvars +*debhelper* +.debhelper +files +python3-molecule +tmp diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000000..7cc0941524 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python-molecule (100:3.5.1-1) UNRELEASED; urgency=medium + + * https://github.com/ansible-community/molecule/releases/tag/3.5.1 + + -- Wong Hoi Sing Edison Sat, 04 Sep 2021 13:02:32 +0800 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000000..c8c3eff923 --- /dev/null +++ b/debian/control @@ -0,0 +1,45 @@ +Source: python-molecule +Section: python +Priority: optional +Standards-Version: 4.5.0 +Maintainer: Wong Hoi Sing Edison +Homepage: https://github.com/ansible-community/molecule/releases +Vcs-Browser: https://github.com/alvistack/ansible-community-molecule +Vcs-Git: https://github.com/alvistack/ansible-community-molecule.git +Build-Depends: + debhelper, + debhelper-compat (= 10), + dh-python, + fdupes, + python3-all, + python3-dev, + python3-setuptools, + +Package: python3-molecule +Architecture: all +Description: Molecule aids in the development and testing of Ansible roles + Molecule project is designed to aid in the development and testing of + Ansible roles. Molecule provides support for testing with multiple + instances, operating systems and distributions, virtualization + providers, test frameworks and testing scenarios. Molecule encourages an + approach that results in consistently developed roles that are + well-written, easily understood and maintained. +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + ${python3:Depends}, + ansible-lint (>= 5.1.1), + python3, + python3-cerberus (>= 1.3.1), + python3-click (>= 8.0), + python3-click-help-colors (>= 0.9), + python3-cookiecutter (>= 1.7.3), + python3-dataclasses, + python3-enrich (>= 1.2.5), + python3-jinja2 (>= 2.11.3), + python3-packaging, + python3-paramiko (>= 2.5.0), + python3-pluggy (>= 0.7.1), + python3-rich (>= 9.5.1), + python3-subprocess-tee (>= 0.3.2), + python3-yaml (>= 5.1), diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000000..e69de29bb2 diff --git a/debian/python3-molecule.lintian-overrides b/debian/python3-molecule.lintian-overrides new file mode 100644 index 0000000000..cd26d57213 --- /dev/null +++ b/debian/python3-molecule.lintian-overrides @@ -0,0 +1,6 @@ +python3-molecule: copyright-without-copyright-notice +python3-molecule: initial-upload-closes-no-bugs +python3-molecule: no-manual-page +python3-molecule: script-not-executable +python3-molecule: unusual-interpreter +python3-molecule: zero-byte-file-in-doc-directory diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000000..66e1c22f7a --- /dev/null +++ b/debian/rules @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +SHELL := /bin/bash + +override_dh_auto_install: + dh_auto_install + mkdir -p debian/python3-molecule/usr/share/bash-completion/completions + install -Dpm644 asset/bash_completion/molecule.bash-completion.sh debian/python3-molecule/usr/share/bash-completion/completions/molecule + find debian/python3-molecule/usr/lib/python*/*-packages -type f -name '*.pyc' -exec rm -rf {} \; + fdupes -s debian/python3-molecule/usr/lib/python*/*-packages + +override_dh_auto_test: + +override_dh_auto_clean: + +%: + dh $@ --buildsystem=pybuild --with python3 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000000..163aaf8d82 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000000..e2b758e07f --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,3 @@ +python-molecule source: no-debian-changes +python-molecule source: source-contains-prebuilt-windows-binary +python-molecule source: source-package-encodes-python-version diff --git a/python-molecule.spec b/python-molecule.spec new file mode 100644 index 0000000000..4a553791cc --- /dev/null +++ b/python-molecule.spec @@ -0,0 +1,164 @@ +%global debug_package %{nil} + +Name: python-molecule +Epoch: 100 +Version: 3.5.1 +Release: 1%{?dist} +BuildArch: noarch +Summary: Molecule aids in the development and testing of Ansible roles +License: MIT +URL: https://github.com/ansible-community/molecule/releases +Source0: %{name}_%{version}.orig.tar.gz +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%description +Molecule project is designed to aid in the development and testing of +Ansible roles. Molecule provides support for testing with multiple +instances, operating systems and distributions, virtualization +providers, test frameworks and testing scenarios. Molecule encourages an +approach that results in consistently developed roles that are +well-written, easily understood and maintained. + +%prep +%autosetup -T -c -n %{name}_%{version}-%{release} +tar -zx -f %{S:0} --strip-components=1 -C . + +%build +%py3_build + +%install +%py3_install +mkdir -p %{buildroot}%{_prefix}/share/bash-completion/completions +install -Dpm644 asset/bash_completion/molecule.bash-completion.sh %{buildroot}%{_prefix}/share/bash-completion/completions/molecule +find %{buildroot}%{python3_sitelib} -type f -name '*.pyc' -exec rm -rf {} \; +%fdupes -s %{buildroot}%{python3_sitelib} + +%check + +%if 0%{?suse_version} > 1500 +%package -n python%{python3_version_nodots}-molecule +Summary: Molecule aids in the development and testing of Ansible roles +Requires: python3 +Requires: python3-ansible-lint >= 5.1.1 +Requires: python3-Cerberus >= 1.3.1 +Requires: python3-click >= 8.0 +Requires: python3-click-help-colors >= 0.9 +Requires: python3-cookiecutter >= 1.7.3 +Requires: python3-dataclasses +Requires: python3-enrich >= 1.2.5 +Requires: python3-Jinja2 >= 2.11.3 +Requires: python3-packaging +Requires: python3-paramiko >= 2.5.0 +Requires: python3-pluggy >= 0.7.1 +Requires: python3-PyYAML >= 5.1 +Requires: python3-rich >= 9.5.1 +Requires: python3-subprocess-tee >= 0.3.2 +Provides: python3-molecule = %{epoch}:%{version}-%{release} +Provides: python3dist(molecule) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-molecule = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(molecule) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-molecule = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(molecule) = %{epoch}:%{version}-%{release} + +%description -n python%{python3_version_nodots}-molecule +Molecule project is designed to aid in the development and testing of +Ansible roles. Molecule provides support for testing with multiple +instances, operating systems and distributions, virtualization +providers, test frameworks and testing scenarios. Molecule encourages an +approach that results in consistently developed roles that are +well-written, easily understood and maintained. + +%files -n python%{python3_version_nodots}-molecule +%license LICENSE +%{_bindir}/mol +%{_bindir}/molecule +%{python3_sitelib}/molecule* +%{_prefix}/share/bash-completion/completions/molecule +%endif + +%if 0%{?sle_version} > 150000 +%package -n python3-molecule +Summary: Molecule aids in the development and testing of Ansible roles +Requires: python3 +Requires: python3-ansible-lint >= 5.1.1 +Requires: python3-Cerberus >= 1.3.1 +Requires: python3-click >= 8.0 +Requires: python3-click-help-colors >= 0.9 +Requires: python3-cookiecutter >= 1.7.3 +Requires: python3-dataclasses +Requires: python3-enrich >= 1.2.5 +Requires: python3-Jinja2 >= 2.11.3 +Requires: python3-packaging +Requires: python3-paramiko >= 2.5.0 +Requires: python3-pluggy >= 0.7.1 +Requires: python3-PyYAML >= 5.1 +Requires: python3-rich >= 9.5.1 +Requires: python3-subprocess-tee >= 0.3.2 +Provides: python3-molecule = %{epoch}:%{version}-%{release} +Provides: python3dist(molecule) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-molecule = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(molecule) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-molecule = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(molecule) = %{epoch}:%{version}-%{release} + +%description -n python3-molecule +Molecule project is designed to aid in the development and testing of +Ansible roles. Molecule provides support for testing with multiple +instances, operating systems and distributions, virtualization +providers, test frameworks and testing scenarios. Molecule encourages an +approach that results in consistently developed roles that are +well-written, easily understood and maintained. + +%files -n python3-molecule +%license LICENSE +%{_bindir}/mol +%{_bindir}/molecule +%{python3_sitelib}/molecule* +%{_prefix}/share/bash-completion/completions/molecule +%endif + +%if !(0%{?suse_version} > 1500) && !(0%{?sle_version} > 150000) +%package -n python3-molecule +Summary: Molecule aids in the development and testing of Ansible roles +Requires: python3 +Requires: python3-ansible-lint >= 5.1.1 +Requires: python3-cerberus >= 1.3.1 +Requires: python3-click >= 8.0 +Requires: python3-click-help-colors >= 0.9 +Requires: python3-cookiecutter >= 1.7.3 +Requires: python3-dataclasses +Requires: python3-enrich >= 1.2.5 +Requires: python3-jinja2 >= 2.11.3 +Requires: python3-packaging +Requires: python3-paramiko >= 2.5.0 +Requires: python3-pluggy >= 0.7.1 +Requires: python3-pyyaml >= 5.1 +Requires: python3-rich >= 9.5.1 +Requires: python3-subprocess-tee >= 0.3.2 +Provides: python3-molecule = %{epoch}:%{version}-%{release} +Provides: python3dist(molecule) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-molecule = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(molecule) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-molecule = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(molecule) = %{epoch}:%{version}-%{release} + +%description -n python3-molecule +Molecule project is designed to aid in the development and testing of +Ansible roles. Molecule provides support for testing with multiple +instances, operating systems and distributions, virtualization +providers, test frameworks and testing scenarios. Molecule encourages an +approach that results in consistently developed roles that are +well-written, easily understood and maintained. + +%files -n python3-molecule +%license LICENSE +%{_bindir}/mol +%{_bindir}/molecule +%{python3_sitelib}/molecule* +%{_prefix}/share/bash-completion/completions/molecule +%endif + +%changelog diff --git a/setup.cfg b/setup.cfg index 3100112167..ef2418e40e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,6 +3,7 @@ dists = clean --all sdist bdist_wheel [metadata] name = molecule +version = 3.5.1 url = https://github.com/ansible-community/molecule project_urls = Bug Tracker = https://github.com/ansible-community/molecule/issues @@ -51,7 +52,6 @@ keywords = molecule [options] -use_scm_version = True python_requires = >=3.6 package_dir = = src @@ -61,8 +61,6 @@ zip_safe = False # These are required during `setup.py` run: setup_requires = - setuptools_scm >= 1.15.0 - setuptools_scm_git_archive >= 1.0 # These are required in actual runtime: install_requires = @@ -73,7 +71,7 @@ install_requires = cookiecutter >= 1.7.3 # dependency issues in older versions dataclasses; python_version<"3.7" enrich >= 1.2.5 - importlib-metadata<2; python_version<"3.8" + importlib-metadata >= 4.6.1; python_version<"3.8" Jinja2 >= 2.11.3 packaging paramiko >= 2.5.0, < 3 @@ -81,12 +79,6 @@ install_requires = PyYAML >= 5.1, < 6 rich >= 9.5.1 subprocess-tee >= 0.3.2 - # selinux python module is needed as least by ansible-docker/podman modules - # and allows us of isolated (default) virtualenvs. It does not avoid need - # to install the system selinux libraries but it will provide a clear - # message when user has to do that. - selinux; sys_platform=="linux2" - selinux; sys_platform=="linux" [options.extras_require] ansible = diff --git a/setup.py b/setup.py index 79778206cd..734ae90bab 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,4 @@ if __name__ == "__main__": - setuptools.setup( - use_scm_version={"local_scheme": "no-local-version"}, - setup_requires=["setuptools_scm[toml]>=3.5.0"], - ) + setuptools.setup()