Blob Blame History Raw
# Created by pyp2rpm-1.0.1
%global pypi_name cov-core
%global summary Plugin core for use by pytest-cov, nose-cov and nose2-cov
%global _description \
This is a lib package for use by pytest-cov, nose-cov and nose2-cov. \
If you're developing a coverage plugin for a test framework then you \
probably want one of those.

# EPEL7 support: Python2 packages prefix is unversioned.
%if 0%{?rhel} && 0%{?rhel} <= 7
%global py2_namespace python
%else
%global py2_namespace python2
%endif


Name:           python-%{pypi_name}
Version:        1.15.0
Release:        7%{?dist}
Summary:        %{summary}

License:        MIT
URL:            http://bitbucket.org/memedough/cov-core/overview
Source0:        https://pypi.python.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
 
# Python3
BuildRequires:  python-srpm-macros
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools
%if 0%{?with_python3_other}
BuildRequires:  python%{python3_other_pkgversion}-devel
BuildRequires:  python%{python3_other_pkgversion}-setuptools
%endif
 
%if %{py2_namespace} == python
Requires:       python-coverage >= 3.6
%endif

%{?python_provide:%python_provide python-%{pypi_name}}

%description %{_description}


# Python 2
%if %{py2_namespace} != python
%package -n     %{py2_namespace}-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide %{py2_namespace}-%{pypi_name}}
Requires:       %{py2_namespace}-coverage >= 3.6

%description -n %{py2_namespace}-%{pypi_name} %{_description}
%endif


# Python3
%package -n     python%{python3_pkgversion}-%{pypi_name}
Summary:        %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
Requires:       python%{python3_pkgversion}-coverage >= 3.6

%description -n python%{python3_pkgversion}-%{pypi_name} %{_description}

%if 0%{?with_python3_other}
%package -n python%{python3_other_pkgversion}-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python%{python3_other_pkgversion}-%{pypi_name}}
Requires: python%{python3_other_pkgversion}-zope-interface
Requires: python%{python3_other_pkgversion}-zope-event

%description -n python%{python3_other_pkgversion}-%{pypi_name} %{_description}
%endif


%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info


%build
%py2_build
%py3_build
%if 0%{?with_python3_other}
%py3_other_build
%endif


%install
# Must do the subpackages' install first because the scripts in /usr/bin are
# overwritten with every setup.py install (and we want the python2 version
# to be the default for now).
%if 0%{?with_python3_other}
%py3_other_install
%endif
%py3_install
%py2_install


%files -n %{py2_namespace}-%{pypi_name}
%license LICENSE.txt
%doc README.rst
%{python2_sitelib}/cov_core*

# Python3
%files -n python%{python3_pkgversion}-%{pypi_name}
%license LICENSE.txt
%doc README.rst
%{python3_sitelib}/cov_core*
%{python3_sitelib}/__pycache__/*

%if 0%{?with_python3_other}
%files -n python%{python3_other_pkgversion}-%{pypi_name}
%license LICENSE.txt
%doc README.rst
%{python3_other_sitelib}/cov_core*
%{python3_other_sitelib}/__pycache__/*
%endif


%changelog
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Tue Apr 25 2017 Aurelien Bompard <abompard@fedoraproject.org> - 1.15.0-6
- Build the Python3 version in EPEL.
- Use the proper Python namespace.

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.15.0-4
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15.0-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Nov 13 2015 bkabrda <bkabrda@redhat.com> - 1.15.0-1
- Updated to 1.15.0

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-6
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue May 13 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.7-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Mon Sep 16 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.7-2
- Add BR: python-setuptools.

* Thu Sep 05 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.7-1
- Initial package.