dd3fd15
%global pypi_name pluginlib
dd3fd15
%global sum  A framework for creating and importing plugins in Python
dd3fd15
%global desc Pluginlib is a Python framework for creating and importing plugins.\
dd3fd15
Pluginlib makes creating plugins for your project simple.
dd3fd15
dd3fd15
%bcond_without python3
dd3fd15
dd3fd15
# Drop Python 2 with Fedora 30 and EL8
dd3fd15
%if (0%{?fedora} && 0%{?fedora} < 30) || (0%{?rhel} && 0%{?rhel} < 8)
dd3fd15
  %bcond_without python2
dd3fd15
%else
dd3fd15
  %bcond_with python2
dd3fd15
%endif
dd3fd15
dd3fd15
dd3fd15
Name:           python-%{pypi_name}
652a088
Version:        0.8.2
fbea6d6
Release:        3%{?dist}
dd3fd15
Summary:        %{sum}
dd3fd15
dd3fd15
License:        MPLv2.0
dd3fd15
URL:            https://github.com/Rockhopper-Technologies/pluginlib
dd3fd15
Source0:        https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
dd3fd15
BuildArch:      noarch
dd3fd15
dd3fd15
%if %{with python2}
dd3fd15
BuildRequires:  python2-devel
dd3fd15
BuildRequires:  python2-setuptools
dd3fd15
BuildRequires:  python2-mock
5141226
5141226
# Additional build requirements for Python 2.6
5141226
%if 0%{?el6}
5141226
BuildRequires:  python-unittest2
5141226
BuildRequires:  python-importlib
5141226
%endif
dd3fd15
%endif
dd3fd15
dd3fd15
%if %{with python3}
dd3fd15
BuildRequires:  python%{python3_pkgversion}-devel
dd3fd15
BuildRequires:  python%{python3_pkgversion}-setuptools
dd3fd15
%endif
dd3fd15
dd3fd15
%if 0%{?with_python3_other}
dd3fd15
BuildRequires:  python%{python3_other_pkgversion}-devel
dd3fd15
BuildRequires:  python%{python3_other_pkgversion}-setuptools
dd3fd15
%endif
dd3fd15
dd3fd15
%description
dd3fd15
%{desc}
dd3fd15
dd3fd15
dd3fd15
# Python 2 package
dd3fd15
%if %{with python2}
dd3fd15
%package -n     python2-%{pypi_name}
dd3fd15
dd3fd15
Summary:        %{sum}
dd3fd15
%{?python_provide:%python_provide python2-%{pypi_name}}
dd3fd15
Requires:       python2-setuptools
dd3fd15
dd3fd15
%if 0%{?el6}
dd3fd15
Requires:  python-importlib
dd3fd15
%endif
dd3fd15
dd3fd15
%description -n python2-%{pypi_name}
dd3fd15
%{desc}
dd3fd15
%endif
dd3fd15
dd3fd15
# Python 3 package
dd3fd15
%if %{with python3}
dd3fd15
%package -n     python%{python3_pkgversion}-%{pypi_name}
dd3fd15
Summary:        %{sum}
dd3fd15
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
dd3fd15
Requires:       python%{python3_pkgversion}-setuptools
dd3fd15
dd3fd15
%description -n python%{python3_pkgversion}-%{pypi_name}
dd3fd15
%{desc}
dd3fd15
%endif
dd3fd15
dd3fd15
# Python 3 other package
dd3fd15
%if 0%{?with_python3_other}
dd3fd15
%package -n     python%{python3_other_pkgversion}-%{pypi_name}
dd3fd15
Summary:        %{sum}
dd3fd15
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{pypi_name}}
dd3fd15
Requires:       python%{python3_other_pkgversion}-setuptools
dd3fd15
dd3fd15
%description -n python%{python3_other_pkgversion}-%{pypi_name}
dd3fd15
%{desc}
dd3fd15
%endif
dd3fd15
dd3fd15
dd3fd15
%prep
dd3fd15
%autosetup -p0 -n %{pypi_name}-%{version}
dd3fd15
dd3fd15
# Remove bundled egg-info
dd3fd15
rm -rf %{pypi_name}.egg-info
dd3fd15
dd3fd15
dd3fd15
%build
dd3fd15
%if %{with python2}
dd3fd15
%py2_build
dd3fd15
%endif
dd3fd15
dd3fd15
%if %{with python3}
dd3fd15
%py3_build
dd3fd15
%endif
dd3fd15
dd3fd15
%if 0%{?with_python3_other}
dd3fd15
%py3_other_build
dd3fd15
%endif
dd3fd15
dd3fd15
dd3fd15
%install
dd3fd15
%if 0%{?with_python3_other}
dd3fd15
%py3_other_install
dd3fd15
%endif
dd3fd15
dd3fd15
%if %{with python3}
dd3fd15
%py3_install
dd3fd15
%endif
dd3fd15
dd3fd15
%if %{with python2}
dd3fd15
%py2_install
dd3fd15
%endif
dd3fd15
dd3fd15
dd3fd15
%check
dd3fd15
%if %{with python2}
dd3fd15
%{__python2} setup.py test
dd3fd15
%endif
dd3fd15
dd3fd15
%if %{with python3}
dd3fd15
%{__python3} setup.py test
dd3fd15
%endif
dd3fd15
dd3fd15
%if 0%{?with_python3_other}
dd3fd15
%{__python3_other} setup.py test
dd3fd15
%endif
dd3fd15
dd3fd15
dd3fd15
%if %{with python2}
dd3fd15
%files -n python2-%{pypi_name}
dd3fd15
%doc README*
dd3fd15
%license LICENSE
dd3fd15
%{python2_sitelib}/pluginlib*
dd3fd15
%endif
dd3fd15
dd3fd15
%if %{with python3}
dd3fd15
%files -n python%{python3_pkgversion}-%{pypi_name}
dd3fd15
%doc README*
dd3fd15
%license LICENSE
dd3fd15
%{python3_sitelib}/pluginlib*
dd3fd15
%endif
dd3fd15
dd3fd15
%if 0%{?with_python3_other}
dd3fd15
%files -n python%{python3_other_pkgversion}-%{pypi_name}
dd3fd15
%doc README*
dd3fd15
%license LICENSE
dd3fd15
%{python3_other_sitelib}/pluginlib*
dd3fd15
%endif
dd3fd15
dd3fd15
%changelog
fbea6d6
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-3
fbea6d6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
fbea6d6
cc3777e
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.8.2-2
cc3777e
- Rebuilt for Python 3.10
cc3777e
652a088
* Sat Feb 20 2021 Avram Lubkin <aviso@rockhopper.net> - 0.8.2-1
652a088
- 0.8.2 Release
652a088
6fae195
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.1-2
6fae195
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
6fae195
0fe12dc
* Sun Jan 17 2021 Avram Lubkin <aviso@rockhopper.net> - 0.8.1-1
0fe12dc
- 0.8.1 Release
0fe12dc
0cbb429
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-2
0cbb429
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0cbb429
ee8ecaf
* Fri Jun 19 2020 Avram Lubkin <aviso@rockhopper.net> - 0.8.0-1
ee8ecaf
- 0.8.0 Release
ee8ecaf
97783de
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.7.0-2
97783de
- Rebuilt for Python 3.9
97783de
1cb6279
* Sat May 02 2020 Avram Lubkin <aviso@rockhopper.net> - 0.7.0-1
1cb6279
- 0.7.0 Release
1cb6279
c9f64f2
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-2
c9f64f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
c9f64f2
0fb82e2
* Tue Oct 08 2019 Avram Lubkin <aviso@rockhopper.net> - 0.6.2-1
0fb82e2
- 0.6.2 Release
0fb82e2
6189623
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-5
6189623
- Rebuilt for Python 3.8.0rc1 (#1748018)
6189623
3bd07e5
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.6.1-4
3bd07e5
- Rebuilt for Python 3.8
3bd07e5
e0e9f38
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-3
e0e9f38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
e0e9f38
8c9e520
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-2
8c9e520
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
8c9e520
22a7df6
* Tue Aug 07 2018 Avram Lubkin <aviso@rockhopper.net> - 0.6.1-1
22a7df6
- 0.6.1 Release
22a7df6
5141226
* Sat Aug 04 2018 Avram Lubkin <aviso@rockhopper.net> - 0.6.0-2
1cb6279
- EL6 build requirements should only apply to Python 2
5141226
30ecba2
* Mon Jul 23 2018 Avram Lubkin <aviso@rockhopper.net> - 0.6.0-1
30ecba2
- 0.6.0 Release
30ecba2
dd3fd15
* Mon Jul 23 2018 Avram Lubkin <aviso@rockhopper.net> - 0.5.1-2
dd3fd15
- Change with_pythonX to use bcond_with(out)
dd3fd15
- Make files sections more specific
dd3fd15
dd3fd15
* Mon Jul 23 2018 Avram Lubkin <aviso@rockhopper.net> - 0.5.1-1
dd3fd15
- Initial package.