7e81743
# Created by pyp2rpm-3.2.2
7e81743
%global pypi_name ansible-runner
7e81743
a07b917
%if 0%{?fedora} || 0%{?rhel} > 7
a07b917
%bcond_with    python2
a07b917
%bcond_without python3
a07b917
%else
a07b917
%bcond_without python2
a07b917
%bcond_with    python3
a07b917
%endif
a07b917
7e81743
Name:           python-%{pypi_name}
289a501
Version:        1.4.6
ee49706
Release:        3%{?dist}
7e81743
Summary:        A tool and python library to interface with Ansible
7e81743
7e81743
License:        ASL 2.0
7e81743
URL:            https://github.com/ansible/ansible-runner
7e81743
# ansible-runner doesn't include the LICENSE file in the tarball on pythonhosted yet.
7e81743
# pulling from github intil the pythonhosted tarball is updated
9bf8336
Source0:        https://files.pythonhosted.org/packages/source/a/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
9bf8336
# Source0:        https://github.com/ansible/%%{pypi_name}/archive/%%{version}/%%{pypi_name}-%%{version}.tar.gz
7e81743
BuildArch:      noarch
7e81743
9bf8336
BuildRequires:  ansible >= 2.6
a07b917
%if %{with python2}
a07b917
BuildRequires:  python-daemon
a07b917
%if 0%{?el7}
a07b917
BuildRequires:  python-devel
a07b917
BuildRequires:  python-mock
a07b917
BuildRequires:  python-psutil
a07b917
BuildRequires:  pexpect >= 4.6
a07b917
BuildRequires:  python2-pytest
a07b917
BuildRequires:  PyYAML
a07b917
BuildRequires:  python-setuptools
a07b917
BuildRequires:  python-six
a07b917
%else
a07b917
BuildRequires:  python2-devel
a07b917
BuildRequires:  %{py2_dist mock}
a07b917
BuildRequires:  %{py2_dist psutil}
a07b917
BuildRequires:  %{py2_dist pexpect} >= 4.6
a07b917
BuildRequires:  %{py2_dist pytest}
a07b917
BuildRequires:  %{py2_dist PyYAML}
a07b917
BuildRequires:  %{py2_dist setuptools}
a07b917
BuildRequires:  %{py2_dist six}
a07b917
%endif
a07b917
%endif
a07b917
a07b917
%if %{with python3}
4708bc0
BuildRequires:  python3-devel
5008682
BuildRequires:  python3dist(mock)
4708bc0
BuildRequires:  python3dist(psutil)
bc529f9
BuildRequires:  python3dist(pexpect) >= 4.6
5008682
BuildRequires:  python3dist(pytest)
4708bc0
BuildRequires:  python3dist(pyyaml)
4708bc0
BuildRequires:  python3dist(setuptools)
4708bc0
BuildRequires:  python3dist(six)
a07b917
BuildRequires:  python3dist(python-daemon)
a07b917
%endif
7e81743
7e81743
%description
7e81743
Ansible Runner is a tool and python library that helps when interfacing with
7e81743
Ansible from other systems whether through a container image interface, as a
7e81743
standalone tool, or imported into a python project.
7e81743
a07b917
%if %{with python2}
a07b917
%package -n     python2-%{pypi_name}
a07b917
Summary:        %{summary}
a07b917
%{?python_provide:%python_provide python2-%{pypi_name}}
a07b917
a07b917
a07b917
Requires:       ansible >= 2.6
a07b917
Requires:       python-daemon
a07b917
%if 0%{?el7}
a07b917
Requires:       pexpect >= 4.6
a07b917
Requires:       python-psutil
a07b917
Requires:       PyYAML
a07b917
Requires:       python-setuptools
a07b917
Requires:       python-six
a07b917
%else
a07b917
Requires:       %{py2_dist pexpect} >= 4.6
a07b917
Requires:       %{py2_dist psutil}
a07b917
Requires:       %{py2_dist PyYAML}
a07b917
Requires:       %{py2_dist setuptools}
a07b917
Requires:       %{py2_dist six}
a07b917
%endif
a07b917
a07b917
%description -n python2-%{pypi_name}
a07b917
Ansible Runner is a tool and python library that helps when interfacing with
a07b917
Ansible from other systems whether through a container image interface, as a
a07b917
standalone tool, or imported into a python project.
a07b917
%endif
a07b917
a07b917
%if %{with python3}
4708bc0
%package -n     python3-%{pypi_name}
4708bc0
Summary:        %{summary}
4708bc0
%{?python_provide:%python_provide python3-%{pypi_name}}
4708bc0
a07b917
Requires:       ansible >= 2.6
34e2e74
Requires:       python3-daemon
bc529f9
Requires:       python3dist(pexpect) >= 4.6
4708bc0
Requires:       python3dist(psutil)
4708bc0
Requires:       python3dist(pyyaml)
4708bc0
Requires:       python3dist(setuptools)
4708bc0
Requires:       python3dist(six)
4708bc0
4708bc0
%description -n python3-%{pypi_name}
4708bc0
Ansible Runner is a tool and python library that helps when interfacing with
4708bc0
Ansible from other systems whether through a container image interface, as a
4708bc0
standalone tool, or imported into a python project.
a07b917
%endif
4708bc0
7e81743
%prep
7e81743
%autosetup -n %{pypi_name}-%{version}
7e81743
# Remove bundled egg-info
7e81743
rm -rf %{pypi_name}.egg-info
7e81743
7e81743
%build
a07b917
%if %{with python2}
a07b917
%py2_build
a07b917
%endif
a07b917
%if %{with python3}
4708bc0
%py3_build
a07b917
%endif
7e81743
7e81743
%install
7e81743
# Must do the subpackages' install first because the scripts in /usr/bin are
7e81743
# overwritten with every setup.py install.
7e81743
a07b917
%if %{with python2}
a07b917
%py2_install
a07b917
cp %{buildroot}/%{_bindir}/ansible-runner %{buildroot}/%{_bindir}/ansible-runner-%{python2_version}
a07b917
ln -s %{_bindir}/ansible-runner-%{python2_version} %{buildroot}/%{_bindir}/ansible-runner-2
a07b917
%endif
a07b917
a07b917
%if %{with python3}
4708bc0
%py3_install
4708bc0
cp %{buildroot}/%{_bindir}/ansible-runner %{buildroot}/%{_bindir}/ansible-runner-%{python3_version}
4708bc0
ln -s %{_bindir}/ansible-runner-%{python3_version} %{buildroot}/%{_bindir}/ansible-runner-3
a07b917
%endif
4708bc0
7e81743
%check
a07b917
%if %{with python2}
a07b917
%{__python2} setup.py test ||:
a07b917
%endif
a07b917
%if %{with python3}
0e05489
py.test-3 -v test
a07b917
%endif
a07b917
a07b917
%if %{with python2}
a07b917
%files -n python2-%{pypi_name}
a07b917
%license LICENSE.md
a07b917
%doc README.md
a07b917
%{_bindir}/ansible-runner-2
a07b917
%{_bindir}/ansible-runner-%{python2_version}
a07b917
%{python2_sitelib}/ansible_runner
a07b917
%{python2_sitelib}/test
a07b917
%{python2_sitelib}/ansible_runner-%{version}-py?.?.egg-info
a07b917
%endif
7e81743
a07b917
%if %{with python3}
4708bc0
%files -n python3-%{pypi_name}
4708bc0
%license LICENSE.md
4708bc0
%doc README.md
4708bc0
%{_bindir}/ansible-runner-3
4708bc0
%{_bindir}/ansible-runner-%{python3_version}
4708bc0
%{python3_sitelib}/ansible_runner
4708bc0
%{python3_sitelib}/test
9f0b3f4
%{python3_sitelib}/ansible_runner-%{version}-py%{python3_version}.egg-info
a07b917
%endif
859545a
%{_bindir}/ansible-runner
4708bc0
2b2589b
%changelog
ee49706
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.6-3
ee49706
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ee49706
618f442
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4.6-2
618f442
- Rebuilt for Python 3.9
618f442
289a501
* Thu May 07 2020 Dan Radez <dradez@redhat.com> - 1.4.6-1
289a501
- updating to version 1.4.6
289a501
2b2589b
* Tue Mar 24 2020 Dan Radez <dradez@redhat.com> - 1.4.5-1
2b2589b
- updating to version 1.4.5
2b2589b
0e05489
* Wed Dec 04 2019 Yatin Karel <ykarel@redhat.com> - 1.4.4-2
0e05489
- Drop dependency on tox
0e05489
1e56f9c
* Tue Nov 05 2019 Dan Radez <dradez@redhat.com> - 1.4.4-1
1e56f9c
- updating to version 1.4.4
1e56f9c
8fa13d4
* Wed Oct 09 2019 Dan Radez <dradez@redhat.com> - 1.4.2-1
8fa13d4
- Updating to version 1.4.2
8fa13d4
c0b9151
* Tue Oct 08 2019 Dan Radez <dradez@redhat.com> - 1.4.0-1
c0b9151
- Updating to version 1.4.0
c0b9151
ce5d810
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3.4-4
ce5d810
- Rebuilt for Python 3.8.0rc1 (#1748018)
ce5d810
6babb0e
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.3.4-3
6babb0e
- Rebuilt for Python 3.8
6babb0e
fd45ab2
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-2
fd45ab2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
fd45ab2
0e05489
* Tue Apr 30 2019 Dan Radez <dradez@redhat.com> - 1.3.4-1
421145b
- Updating to version 1.3.4
421145b
bde49af
* Mon Apr 22 2019 Dan Radez <dradez@redhat.com> - 1.3.3-1
bde49af
- Updating to version 1.3.3
421145b
b0a594f
* Wed Apr 10 2019 Dan Radez <dradez@redhat.com> - 1.3.2-1
b0a594f
- Updating to version 1.3.2
421145b
d9a98f6
* Wed Mar 20 2019 Dan Radez <dradez@redhat.com> - 1.3.0-1
d9a98f6
- Updating to version 1.3
421145b
a07b917
* Wed Feb 13 2019 Yatin Karel <ykarel@redhat.com> - 1.2.0-2
a07b917
- Enable python2 build for CentOS <= 7
421145b
9bf8336
* Mon Feb 04 2019 Dan Radez <dradez@redhat.com> - 1.2.0-1
9bf8336
- Updating to version 1.2
9bf8336
- removing python 2 from the spec for F30
421145b
3e5aab1
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-2
3e5aab1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
421145b
9bf8336
* Tue Oct 23 2018 Dan Radez <dradez@redhat.com> - 1.1.2-1
4bff8e2
- Updating to version 1.1.2
421145b
89dacba
* Wed Sep 12 2018 Dan Radez <dradez@redhat.com> - 1.1.0-1
89dacba
- Updating to version 1.1.0
421145b
73514bd
* Wed Jul 25 2018 Dan Radez <dradez@redhat.com> - 1.0.5-1
73514bd
- Updating to version 1.0.5
421145b
b277051
* Wed Jul 25 2018 Dan Radez <dradez@redhat.com> - 1.0.4-4
b277051
- 1.0.4 requires pexepct 4.6
421145b
dd8e6ec
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
dd8e6ec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
421145b
859545a
* Tue Jul 03 2018 Iryna Shcherbina - 1.0.4-2
859545a
- Fix Python 3 dependency from python2-ansible-runner
421145b
50d8ba3
* Mon Jul 02 2018 Dan Radez <dradez@redhat.com> - 1.0.4-1
50d8ba3
- Updating to version 1.0.4
421145b
be93428
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.3-4
be93428
- Rebuilt for Python 3.7
421145b
3f8f611
* Fri Jun 01 2018 Dan Radez <dradez@redhat.com> - 1.0.3-3
3f8f611
- skip py3 on non-fedora
421145b
5008682
* Thu May 31 2018 Dan Radez <dradez@redhat.com> - 1.0.3-1
5008682
- Updating to version 1.0.3
421145b
4708bc0
* Tue May 29 2018 Dan Radez <dradez@redhat.com> - 1.0.2-1
4708bc0
- Updating to version 1.0.2
4708bc0
- Package Requires versions updated
4708bc0
- added py3 support
421145b
227e9ce
* Fri May 11 2018 Dan Radez <dradez@redhat.com> - 1.0.1-2
227e9ce
- Adding conditionals so the same spec can be built on fedora and el7
421145b
7e81743
* Fri May 04 2018 Dan Radez <dradez@redhat.com> - 1.0.1-1
7e81743
- Initial package. Python 2 support only initially.