11add5
# Created by pyp2rpm-3.2.2
11add5
%global pypi_name ansible-runner
11add5
11add5
Name:           python-%{pypi_name}
11add5
Version:        2.4.0
11add5
Release:        7%{?dist}
11add5
Summary:        A tool and python library to interface with Ansible
11add5
11add5
# Automatically converted from old format: ASL 2.0 - review is highly recommended.
11add5
License:        Apache-2.0
11add5
URL:            https://github.com/ansible/ansible-runner
11add5
Source0:        https://github.com/ansible/%{pypi_name}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
11add5
# https://github.com/ansible/ansible-runner/pull/1377
11add5
# Fix a test failure with Python 3.13(?)
11add5
Patch:          0001-Base64IO-set-write-buffer-before-doing-attr-check.patch
11add5
11add5
# Compatibility with pytest 8
11add5
# https://github.com/ansible/ansible-runner/commit/877a4f16.patch
11add5
Patch:          Fix-test-for-get_role_list.patch
11add5
11add5
BuildArch:      noarch
11add5
11add5
BuildRequires: python3-devel
11add5
BuildRequires: ansible-core
11add5
BuildRequires: python3dist(pbr)
11add5
BuildRequires: python3dist(pip)
11add5
BuildRequires: python3dist(psutil)
11add5
BuildRequires: python3dist(pexpect) >= 4.6
11add5
BuildRequires: python3dist(pytest)
11add5
BuildRequires: python3dist(pytest-mock)
11add5
BuildRequires: python3dist(pytest-timeout)
11add5
BuildRequires: python3dist(pytest-xdist)
11add5
BuildRequires: python3dist(pyyaml)
11add5
BuildRequires: python3dist(setuptools)
11add5
BuildRequires: python3dist(six)
11add5
BuildRequires: python3dist(python-daemon)
11add5
BuildRequires: python3dist(wheel)
11add5
11add5
Requires: (ansible-core or ansible)
11add5
11add5
%description
11add5
Ansible Runner is a tool and python library that helps when interfacing with
11add5
Ansible from other systems whether through a container image interface, as a
11add5
standalone tool, or imported into a python project.
11add5
11add5
%package -n     python3-%{pypi_name}
11add5
Summary:        %{summary}
11add5
%{?python_provide:%python_provide python3-%{pypi_name}}
11add5
11add5
%description -n python3-%{pypi_name}
11add5
Ansible Runner is a tool and python library that helps when interfacing with
11add5
Ansible from other systems whether through a container image interface, as a
11add5
standalone tool, or imported into a python project.
11add5
11add5
%prep
11add5
%autosetup -n %{pypi_name}-%{version} -p1
11add5
# Allow the version of setuptools that's in fedora
11add5
sed -i 's/, <=[0-9.]*//g' pyproject.toml
11add5
11add5
# Allow the version of setuptools-scm that's in fedora
11add5
sed -i 's/, <=8.0.4//' pyproject.toml
11add5
11add5
sed -i '166 i \@pytest.mark.skip(reason="can not resolve example.com in build system")' test/integration/test_display_callback.py
11add5
sed -i '/test_resolved_actions/i \@pytest.mark.skip(reason="ansible version lookup is blank in build")' test/integration/test_display_callback.py
11add5
# there's a locale issue with ansible that makes these tests fail.
11add5
sed -i '/^def test_worker_without_delete_no_dir.*/i @pytest.skip("Ansible could not initialize the preferred locale: unsupported locale setting", allow_module_level=True)' test/integration/test_transmit_worker_process.py
11add5
sed -i '/^def test_worker_without_delete_dir_exists.*/i @pytest.skip("Ansible could not initialize the preferred locale: unsupported locale setting", allow_module_level=True)' test/integration/test_transmit_worker_process.py
11add5
sed -i '/^def test_worker_delete_no_dir.*/i @pytest.skip("Ansible could not initialize the preferred locale: unsupported locale setting", allow_module_level=True)' test/integration/test_transmit_worker_process.py
11add5
sed -i '/^def test_worker_delete_dir_exists.*/i @pytest.skip("Ansible could not initialize the preferred locale: unsupported locale setting", allow_module_level=True)' test/integration/test_transmit_worker_process.py
11add5
# Syntax error upstream with this test, still fails after fixing so skip for now
11add5
sed -i '/^def test_dump_artifacts_inventory_object.*/i @pytest.mark.skip("syntax error upstream")' test/unit/utils/test_dump_artifacts.py
11add5
# Deprecation Warning from datetime.utcnow()
11add5
sed -i '/^def test_no_ResourceWarning_error.*/i @pytest.mark.skip("DeprecationWarning: datetime.utcnow() is deprecated ")' test/unit/test_runner.py
11add5
11add5
%generate_buildrequires
11add5
export PBR_VERSION=%{version}
11add5
%pyproject_buildrequires
11add5
11add5
%build
11add5
export PBR_VERSION=%{version}
11add5
%pyproject_wheel
11add5
11add5
%install
11add5
export PBR_VERSION=%{version}
11add5
%pyproject_install
11add5
cp %{buildroot}/%{_bindir}/ansible-runner %{buildroot}/%{_bindir}/ansible-runner-%{python3_version}
11add5
ln -s ansible-runner-%{python3_version} %{buildroot}/%{_bindir}/ansible-runner-3
11add5
11add5
%check
11add5
# test suite hangs indefinitely on exit without -n auto
11add5
# note this implies the dep on xdist, so don't remove it
11add5
# https://github.com/ansible/ansible-runner/issues/1369
11add5
%pytest -n auto
11add5
11add5
%files -n python3-%{pypi_name}
11add5
%license LICENSE.md
11add5
%doc README.md
11add5
%{_bindir}/ansible-runner-3
11add5
%{_bindir}/ansible-runner-%{python3_version}
11add5
%{python3_sitelib}/ansible_runner
11add5
%{python3_sitelib}/ansible_runner-%{version}.dist-info
11add5
%{_bindir}/ansible-runner
11add5
11add5
%changelog
11add5
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-7
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
11add5
11add5
* Tue Sep 17 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 2.4.0-6
11add5
- Bump setuptools and setuptools_scm
11add5
11add5
* Fri Aug 02 2024 Tomáš Hrnčiar <thrnciar@redhat.com> - 2.4.0-5
11add5
- Backport upstream patch needed for compatibility with pytest 8
11add5
11add5
* Wed Jul 24 2024 Miroslav Suchý <msuchy@redhat.com> - 2.4.0-4
11add5
- convert license to SPDX
11add5
11add5
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-3
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
11add5
11add5
* Mon Jun 24 2024 Adam Williamson <awilliam@redhat.com> - 2.4.0-2
11add5
- Backport PR #1377 to fix tests with Python 3.13
11add5
- Run tests with -n auto to avoid hang (GH #1369)
11add5
- Rebuilt for Python 3.13
11add5
11add5
* Wed May 22 2024 Dan radez <dradez@redhat.com> - 2.4.0-1
11add5
- update to 2.4.0 rhbz#2280913
11add5
11add5
* Tue Apr 02 2024 Dan Radez <dradez@redhat.com> - 2.3.6-1
11add5
- update to 2.3.6 rhbz#2269289
11add5
11add5
* Mon Feb 19 2024 Dan Radez <dradez@redhat.com> - 2.3.5-1
11add5
- update to 2.3.5 rhbz#2264323
11add5
11add5
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-4
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
11add5
11add5
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-3
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
11add5
11add5
* Sat Jan 13 2024 Maxwell G <maxwell@gtmx.me> - 2.3.4-2
11add5
- Remove unused python3-mock dependency
11add5
11add5
* Fri Sep 08 2023 Dan Radez <dradez@redhat.com> - 2.3.4-1
11add5
- update to 2.3.4 rhbz#2236131
11add5
11add5
* Thu Jul 27 2023 Dan Radez <dradez@redhat.com> - 2.3.3-4
11add5
- skipping 2 tests to fix build. rhbz#2226145
11add5
11add5
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.3-3
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
11add5
11add5
* Wed Jun 28 2023 Python Maint <python-maint@redhat.com> - 2.3.3-2
11add5
- Rebuilt for Python 3.12
11add5
11add5
* Mon Jun 19 2023 Dan Radez <dradez@redhat.com> - 2.3.3-1
11add5
- update to 2.3.3 rhbz#2211436
11add5
11add5
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 2.3.2-2
11add5
- Rebuilt for Python 3.12
11add5
11add5
* Fri Mar 24 2023 Dan Radez <dradez@redhat.com> - 2.3.2-1
11add5
- update to 2.3.2 rhbz#2174741
11add5
11add5
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-2
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
11add5
11add5
* Wed Nov 23 2022 Dan Radez <dradez@redhat.com> - 2.3.1-1
11add5
- update to 2.3.1 (rhbz#2139251)
11add5
11add5
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
11add5
11add5
* Tue Jul 19 2022 Dan Radez <dradez@redhat.com> - 2.2.1-1
11add5
- update to 2.2.1
11add5
11add5
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 2.1.3-4
11add5
- Rebuilt for Python 3.11
11add5
11add5
* Tue Apr 12 2022 Dan Radez <dradez@redhat.com> - 2.1.3-3
11add5
- updating to use pyproject macros
11add5
11add5
* Mon Apr 11 2022 Maxwell G <gotmax@e.email> - 2.1.3-2
11add5
- Allow users to choose between ansible and ansible-core.
11add5
- Switch BR from ansible to ansible-core.
11add5
- Use relative symlinks.
11add5
11add5
* Thu Mar 24 2022 Dan Radez <dradez@redhat.com> - 2.1.3-1
11add5
- Update to 2.1.3
11add5
11add5
* Tue Feb 08 2022 Dan Radez <dradez@redhat.com> - 2.1.1-3
11add5
- Don't remove egginfo
11add5
11add5
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-2
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
11add5
11add5
* Wed Dec 15 2021 Dan Radez <dradez@redhat.com> - 2.1.1-1
11add5
- updating to version 2.1.1
11add5
11add5
* Tue Dec 14 2021 Dan Radez <dradez@redhat.com> - 2.0.0a1-4
11add5
- remove the test module from packaged files
11add5
11add5
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0a1-3
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
11add5
11add5
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.0.0a1-2
11add5
- Rebuilt for Python 3.10
11add5
11add5
* Fri Apr 30 2021 Dan Radez <dradez@redhat.com> - 2.0.0a1
11add5
- updating to version 2.0.0a1
11add5
11add5
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-4
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
11add5
11add5
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-3
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
11add5
11add5
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4.6-2
11add5
- Rebuilt for Python 3.9
11add5
11add5
* Thu May 07 2020 Dan Radez <dradez@redhat.com> - 1.4.6-1
11add5
- updating to version 1.4.6
11add5
11add5
* Tue Mar 24 2020 Dan Radez <dradez@redhat.com> - 1.4.5-1
11add5
- updating to version 1.4.5
11add5
11add5
* Wed Dec 04 2019 Yatin Karel <ykarel@redhat.com> - 1.4.4-2
11add5
- Drop dependency on tox
11add5
11add5
* Tue Nov 05 2019 Dan Radez <dradez@redhat.com> - 1.4.4-1
11add5
- updating to version 1.4.4
11add5
11add5
* Wed Oct 09 2019 Dan Radez <dradez@redhat.com> - 1.4.2-1
11add5
- Updating to version 1.4.2
11add5
11add5
* Tue Oct 08 2019 Dan Radez <dradez@redhat.com> - 1.4.0-1
11add5
- Updating to version 1.4.0
11add5
11add5
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3.4-4
11add5
- Rebuilt for Python 3.8.0rc1 (#1748018)
11add5
11add5
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3.4-3
11add5
- Rebuilt for Python 3.8
11add5
11add5
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-2
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
11add5
11add5
* Tue Apr 30 2019 Dan Radez <dradez@redhat.com> - 1.3.4-1
11add5
- Updating to version 1.3.4
11add5
11add5
* Mon Apr 22 2019 Dan Radez <dradez@redhat.com> - 1.3.3-1
11add5
- Updating to version 1.3.3
11add5
11add5
* Wed Apr 10 2019 Dan Radez <dradez@redhat.com> - 1.3.2-1
11add5
- Updating to version 1.3.2
11add5
11add5
* Wed Mar 20 2019 Dan Radez <dradez@redhat.com> - 1.3.0-1
11add5
- Updating to version 1.3
11add5
11add5
* Wed Feb 13 2019 Yatin Karel <ykarel@redhat.com> - 1.2.0-2
11add5
- Enable python2 build for CentOS <= 7
11add5
11add5
* Mon Feb 04 2019 Dan Radez <dradez@redhat.com> - 1.2.0-1
11add5
- Updating to version 1.2
11add5
- removing python 2 from the spec for F30
11add5
11add5
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-2
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
11add5
11add5
* Tue Oct 23 2018 Dan Radez <dradez@redhat.com> - 1.1.2-1
11add5
- Updating to version 1.1.2
11add5
11add5
* Wed Sep 12 2018 Dan Radez <dradez@redhat.com> - 1.1.0-1
11add5
- Updating to version 1.1.0
11add5
11add5
* Wed Jul 25 2018 Dan Radez <dradez@redhat.com> - 1.0.5-1
11add5
- Updating to version 1.0.5
11add5
11add5
* Wed Jul 25 2018 Dan Radez <dradez@redhat.com> - 1.0.4-4
11add5
- 1.0.4 requires pexepct 4.6
11add5
11add5
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
11add5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
11add5
11add5
* Tue Jul 03 2018 Iryna Shcherbina - 1.0.4-2
11add5
- Fix Python 3 dependency from python2-ansible-runner
11add5
11add5
* Mon Jul 02 2018 Dan Radez <dradez@redhat.com> - 1.0.4-1
11add5
- Updating to version 1.0.4
11add5
11add5
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.3-4
11add5
- Rebuilt for Python 3.7
11add5
11add5
* Fri Jun 01 2018 Dan Radez <dradez@redhat.com> - 1.0.3-3
11add5
- skip py3 on non-fedora
11add5
11add5
* Thu May 31 2018 Dan Radez <dradez@redhat.com> - 1.0.3-1
11add5
- Updating to version 1.0.3
11add5
11add5
* Tue May 29 2018 Dan Radez <dradez@redhat.com> - 1.0.2-1
11add5
- Updating to version 1.0.2
11add5
- Package Requires versions updated
11add5
- added py3 support
11add5
11add5
* Fri May 11 2018 Dan Radez <dradez@redhat.com> - 1.0.1-2
11add5
- Adding conditionals so the same spec can be built on fedora and el7
11add5
11add5
* Fri May 04 2018 Dan Radez <dradez@redhat.com> - 1.0.1-1
11add5
- Initial package. Python 2 support only initially.