public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ansible-collection-community-internal_test_tools] epel9: Initial package (rhbz#2263696)
@ 2026-11-10 17:00 Maxwell G
  0 siblings, 0 replies; only message in thread
From: Maxwell G @ 2026-11-10 17:00 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/ansible-collection-community-internal_test_tools
Branch : epel9
Commit : 467c995b9052e71a51a55f6f81eb58c8b2cc4684
Author : Maxwell G <maxwell@gtmx.me>
Date   : 2024-08-22T17:39:08-05:00
Stats  : +151/-0 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/ansible-collection-community-internal_test_tools/c/467c995b9052e71a51a55f6f81eb58c8b2cc4684?branch=epel9

Log:
Initial package (rhbz#2263696)

---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c2675bb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/community.internal_test_tools-0.11.0.tar.gz

diff --git a/ansible-collection-community-internal_test_tools.spec b/ansible-collection-community-internal_test_tools.spec
new file mode 100644
index 0000000..05bcda2
--- /dev/null
+++ b/ansible-collection-community-internal_test_tools.spec
@@ -0,0 +1,63 @@
+%global forgeurl https://github.com/ansible-collections/community.internal_test_tools
+%bcond tests 1
+
+Name:           ansible-collection-community-internal_test_tools
+Version:        0.11.0
+%global tag     %{version}
+%forgemeta
+Release:        %autorelease
+Summary:        Internal test tools for other collections
+
+License:        GPL-3.0-or-later
+URL:            %{ansible_collection_url community internal_test_tools}
+Source:         %{forgesource}
+# Not upstreamable. See Ansible Collection Packaging Guidelines.
+Patch:          build_ignore.patch
+# https://github.com/ansible-collections/community.internal_test_tools/pull/130
+Patch:          remove-python-mock.patch
+
+BuildArch:      noarch
+
+BuildRequires:  ansible-packaging
+%if %{with tests}
+BuildRequires:  ansible-packaging-tests
+%endif
+
+%description
+The community.library_inventory_filtering_v1 collection includes helpers for
+use with other collections that allow inventory plugins to offer common
+filtering functionality.
+
+
+%prep
+%autosetup -p1 %{forgesetupargs}
+find -type f ! -executable -name '*.py' -print -exec sed -i -e '1{\@^#!.*@d}' '{}' +
+sed -i 's|^#!/usr/bin/env python|#!%{python3}|' \
+    tests/sanity/extra/*.py
+
+
+%build
+%ansible_collection_build
+
+
+%install
+%ansible_collection_install
+
+
+%check
+%ansible_test_unit
+
+
+%files -f %{ansible_collection_filelist}
+%license .reuse
+%license CHANGELOG.rst.license
+%license COPYING
+%license LICENSES
+%license changelogs/changelog.yaml.license
+%license tests/sanity/extra/*.json.license
+%doc CHANGELOG.rst
+%doc README.md
+
+
+%changelog
+%autochangelog

diff --git a/build_ignore.patch b/build_ignore.patch
new file mode 100644
index 0000000..e673b5e
--- /dev/null
+++ b/build_ignore.patch
@@ -0,0 +1,34 @@
+From bb87625d031816b456585fe33c347aa84d85a2f4 Mon Sep 17 00:00:00 2001
+From: Maxwell G <maxwell@gtmx.me>
+Date: Fri, 2 Feb 2024 00:04:40 +0000
+Subject: [PATCH ] galaxy.yml: add unnecessary files to build_ignore
+
+---
+ galaxy.yml | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/galaxy.yml b/galaxy.yml
+index b3635c4..645dac7 100644
+--- a/galaxy.yml
++++ b/galaxy.yml
+@@ -20,3 +20,17 @@ repository: https://github.com/ansible-collections/community.internal_test_tools
+ documentation: https://ansible-collections.github.io/community.internal_test_tools/branch/main/
+ homepage: https://github.com/ansible-collections/community.internal_test_tools
+ issues: https://github.com/ansible-collections/community.internal_test_tools/issues
++build_ignore:
++  - .*lint
++  - .gitignore
++  - .github
++  - changelogs/fragments
++  - tools
++  # Included in %license / %doc
++  - "CHANGELOG.rst*"
++  - COPYING
++  - "LICENSE*"
++  - .reuse
++  - README.md
++  - changelogs/changelog.yaml.license
++  - tests/sanity/extra/*.json.license
+-- 
+2.46.0
+

diff --git a/remove-python-mock.patch b/remove-python-mock.patch
new file mode 100644
index 0000000..9cc2443
--- /dev/null
+++ b/remove-python-mock.patch
@@ -0,0 +1,52 @@
+From cc7031085d025b9cdfb7917170393e3674657e7b Mon Sep 17 00:00:00 2001
+From: Maxwell G <maxwell@gtmx.me>
+Date: Fri, 2 Feb 2024 00:08:34 +0000
+Subject: [PATCH] tests: replace mock import with unittest.mock
+
+---
+ tests/unit/utils/fetch_url_module_framework.py | 3 +--
+ tests/unit/utils/open_url_framework.py         | 2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/tests/unit/utils/fetch_url_module_framework.py b/tests/unit/utils/fetch_url_module_framework.py
+index 9b19249..e5a819e 100644
+--- a/tests/unit/utils/fetch_url_module_framework.py
++++ b/tests/unit/utils/fetch_url_module_framework.py
+@@ -69,13 +69,12 @@ __metaclass__ = type
+ 
+ import pytest
+ 
+-from mock import MagicMock
+-
+ import ansible.module_utils.basic  # noqa: F401, pylint: disable=unused-import
+ import ansible.module_utils.urls  # noqa: F401, pylint: disable=unused-import
+ 
+ from ansible.module_utils.six import PY2
+ 
++from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import MagicMock
+ from ansible_collections.community.internal_test_tools.tests.unit.plugins.modules.utils import set_module_args
+ 
+ from ._utils import (
+diff --git a/tests/unit/utils/open_url_framework.py b/tests/unit/utils/open_url_framework.py
+index 7fb83c9..1296047 100644
+--- a/tests/unit/utils/open_url_framework.py
++++ b/tests/unit/utils/open_url_framework.py
+@@ -59,7 +59,6 @@ from __future__ import (absolute_import, division, print_function)
+ __metaclass__ = type
+ 
+ 
+-from mock import MagicMock
+ 
+ from ansible.module_utils.six.moves.urllib.error import HTTPError
+ 
+@@ -67,6 +66,7 @@ from ._utils import (
+     CallBase as _CallBase,
+     validate_call as _validate_call,
+ )
++from ..compat.mock import MagicMock
+ 
+ 
+ class OpenUrlCall(_CallBase):
+-- 
+2.43.0
+

diff --git a/sources b/sources
new file mode 100644
index 0000000..59ab21f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (community.internal_test_tools-0.11.0.tar.gz) = 1fc45dc615f3149628af3f26f9697aabe32c06bbac041f4beb35fc1b4c4fbfb2611a5f89e255a900e6f9764d723a612a4c5fee74a8113a22035dc1c5b1238f2e

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-10 17:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-10 17:00 [rpms/ansible-collection-community-internal_test_tools] epel9: Initial package (rhbz#2263696) Maxwell G

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox