Skip to content

Commit

Permalink
alvistack/v5.0.0
Browse files Browse the repository at this point in the history
    git clean -xdf
    tar zcvf ../python-molecule_5.0.0.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-molecule.spec ../python-molecule_5.0.0-1.spec
    cp ../python*-molecule*5.0.0*.{gz,xz,spec,dsc} /osc/home\:alvistack/ansible-community-molecule-5.0.0/
    rm -rf ../python*-molecule*5.0.0*.*

See ansible#3904

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
  • Loading branch information
hswong3i committed Feb 9, 2024
1 parent 9bc34d0 commit 517bcbe
Show file tree
Hide file tree
Showing 20 changed files with 363 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .config/requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ansible-compat >= 2.2.0
ansible-compat >= 4.0.1
ansible-core >= 2.12.10
click >= 8.0, < 9
click-help-colors >= 0.9
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ molecule/**
tools/test-schema/node_modules
site
.DS_Store
src/molecule/_version.py
.pybuild/
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ repos:
entry: mypy src/
pass_filenames: false
additional_dependencies:
- ansible-compat>=2.2.0
- ansible-compat>=4.0.1
- click>=8.0.1
- enrich>=1.2.7
- importlib-metadata>=4.6.1
Expand All @@ -85,7 +85,7 @@ repos:
args:
- --output-format=colorized
additional_dependencies:
- ansible-compat>=2.2.0
- ansible-compat>=4.0.1
- click
- click-help-colors
- cookiecutter
Expand Down
9 changes: 8 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
prune asset
include LICENSE
include README.md

recursive-exclude * __pycache__
recursive-exclude * *.py[co]

recursive-include src/molecule/cookiecutter **/*
recursive-include src/molecule/data **/*
29 changes: 29 additions & 0 deletions asset/bash_completion/molecule.bash-completion.sh
Original file line number Diff line number Diff line change
@@ -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;

6 changes: 6 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.substvars
*debhelper*
.debhelper
files
python3-molecule
tmp
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python-molecule (100:5.0.0-1) UNRELEASED; urgency=medium

* https://github.com/ansible-community/molecule/releases/tag/5.0.0

-- Wong Hoi Sing Edison <hswong3i@pantarei-design.com> Sat, 20 Jan 2024 10:54:25 +0800
44 changes: 44 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Source: python-molecule
Section: python
Priority: optional
Standards-Version: 4.5.0
Maintainer: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
Homepage: https://github.com/ansible-community/molecule/tags
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-click-help-colors (>= 0.9),
python3-dataclasses,
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-core (>=2.12.10),
python3,
python3-ansible-compat (>= 2.2.0),
python3-click (>= 8.0),
python3-click-help-colors (>= 0.9),
python3-cookiecutter (>= 1.7.3),
python3-enrich (>= 1.2.7),
python3-jinja2 (>= 2.11.3),
python3-jsonschema (>= 4.9.1),
python3-packaging,
python3-pluggy (>= 0.7.1),
python3-rich (>= 9.5.1),
python3-yaml (>= 5.1),
21 changes: 21 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Files: debian/*
Copyright: 2024 Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
License: Apache-2.0

License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
The complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".
3 changes: 3 additions & 0 deletions debian/python3-molecule.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
usr/bin/*
usr/lib/python*/*-packages/*
usr/share/bash-completion/completions/molecule
6 changes: 6 additions & 0 deletions debian/python3-molecule.lintian-overrides
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/make -f

SHELL := /bin/bash

override_dh_auto_install:
dh_auto_install --destdir=debian/tmp
mkdir -p debian/tmp/usr/share/bash-completion/completions
install -Dpm644 asset/bash_completion/molecule.bash-completion.sh debian/tmp/usr/share/bash-completion/completions/molecule
find debian/tmp/usr/lib/python*/*-packages -type f -name '*.pyc' -exec rm -rf {} \;
fdupes -qnrps debian/tmp/usr/lib/python*/*-packages

override_dh_auto_test:

override_dh_auto_clean:

%:
dh $@ --buildsystem=pybuild --with python3
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
4 changes: 4 additions & 0 deletions debian/source/lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
python-molecule source: file-without-copyright-information
python-molecule source: no-debian-changes
python-molecule source: source-contains-prebuilt-windows-binary
python-molecule source: source-package-encodes-python-version
8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[build-system]
requires = [
"setuptools >= 63.0.0", # required by pyproject+setuptools_scm integration
"setuptools_scm[toml] >= 7.0.5", # required for "no-local-version" scheme

]
build-backend = "setuptools.build_meta"

[project]
# https://peps.python.org/pep-0621/#readme
requires-python = ">=3.9"
dynamic = ["version", "dependencies", "optional-dependencies"]
dynamic = ["dependencies", "optional-dependencies"]
name = "molecule"
version = "5.0.0"
description = "Molecule aids in the development and testing of Ansible roles"
readme = "README.md"
authors = [{ "name" = "Ansible by Red Hat", "email" = "info@ansible.com" }]
Expand Down Expand Up @@ -208,7 +208,3 @@ optional-dependencies.docs = { file = [".config/requirements-docs.txt"] }
optional-dependencies.test = { file = [".config/requirements-test.txt"] }
optional-dependencies.lock = { file = [".config/requirements-lock.txt"] }
dependencies = { file = [".config/requirements.in"] }

[tool.setuptools_scm]
local_scheme = "no-local-version"
write_to = "src/molecule/_version.py"
170 changes: 170 additions & 0 deletions python-molecule.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Copyright 2024 Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

%global debug_package %{nil}

Name: python-molecule
Epoch: 100
Version: 5.0.0
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/tags
Source0: %{name}_%{version}.orig.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-click-help-colors >= 0.9
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}%{_datadir}/bash-completion/completions
install -Dpm644 asset/bash_completion/molecule.bash-completion.sh %{buildroot}%{_datadir}/bash-completion/completions/molecule
find %{buildroot}%{python3_sitelib} -type f -name '*.pyc' -exec rm -rf {} \;
fdupes -qnrps %{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: ansible-core >= 2.12.10
Requires: python3
Requires: python3-Jinja2 >= 2.11.3
Requires: python3-PyYAML >= 5.1
Requires: python3-ansible-compat >= 2.2.0
Requires: python3-click >= 8.0
Requires: python3-click-help-colors >= 0.9
Requires: python3-cookiecutter >= 1.7.3
Requires: python3-enrich >= 1.2.7
Requires: python3-jsonschema >= 4.9.1
Requires: python3-packaging
Requires: python3-pluggy >= 0.7.1
Requires: python3-rich >= 9.5.1
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}/*
%{_datadir}/bash-completion/completions/molecule
%{python3_sitelib}/*
%endif

%if 0%{?sle_version} > 150000
%package -n python3-molecule
Summary: Molecule aids in the development and testing of Ansible roles
Requires: ansible-core >= 2.12.10
Requires: python3
Requires: python3-ansible-compat >= 2.2.0
Requires: python3-click >= 8.0
Requires: python3-click-help-colors >= 0.9
Requires: python3-cookiecutter >= 1.7.3
Requires: python3-enrich >= 1.2.7
Requires: python3-Jinja2 >= 2.11.3
Requires: python3-jsonschema >= 4.9.1
Requires: python3-packaging
Requires: python3-pluggy >= 0.7.1
Requires: python3-PyYAML >= 5.1
Requires: python3-rich >= 9.5.1
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}/*
%{_datadir}/bash-completion/completions/molecule
%{python3_sitelib}/*
%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: ansible-core >= 2.12.10
Requires: python3
Requires: python3-ansible-compat >= 2.2.0
Requires: python3-click >= 8.0
Requires: python3-click-help-colors >= 0.9
Requires: python3-cookiecutter >= 1.7.3
Requires: python3-enrich >= 1.2.7
Requires: python3-jinja2 >= 2.11.3
Requires: python3-jsonschema >= 4.9.1
Requires: python3-packaging
Requires: python3-pluggy >= 0.7.1
Requires: python3-pyyaml >= 5.1
Requires: python3-rich >= 9.5.1
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}/*
%{_datadir}/bash-completion/completions/molecule
%{python3_sitelib}/*
%endif

%changelog
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[egg_info]
tag_build =
tag_date = 0

0 comments on commit 517bcbe

Please sign in to comment.