Blob Blame Raw
%if 0%{?fedora}
%global with_python3 0
%endif

%global pypi_name xunitmerge

Name:           python-%{pypi_name}
Version:        1.0.4
Release:        8%{?dist}
Summary:        Utility for merging multiple XUnit xml reports into a single xml report

License:        ASL 2.0
Url:            https://github.com/miki725/xunitmerge
Source:         https://github.com/miki725/xunitmerge/archive/%{version}.tar.gz#/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

%global _description \
The primary purpose of xunitmerge is to be able to merge XUnit reports\
generated by nosetests (e.g. nosetests --with-xunit).\
This is especially useful when nosetests needs to be run multiple times for\
different parts of a project and then all reports need to be merged to a\
single report.

%description %_description

%package -n     python2-%{pypi_name}
Summary:        Utility for merging multiple XUnit xml reports into a single xml report.
%{?python_provide:%python_provide python2-%{pypi_name}}

Requires:  python2-nose
Requires:  python2-six

BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python2-six
BuildRequires:  python2-nose

%description -n python2-%{pypi_name} %_description

%if 0%{?with_python3}
%package -n     python3-%{pypi_name}
Summary:        Component-based Software-defined Networking Framework
%{?python_provide:%python_provide python3-%{pypi_name}}

Requires:  python3-nose
Requires:  python3-six

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-six
BuildRequires:  python3-nose

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

%prep
%setup -q -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info
%autosetup -n %{pypi_name}-%{version}

%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif

%install
%if 0%{?with_python3}
%py3_install
mv %{buildroot}%{_bindir}/%{pypi_name} %{buildroot}%{_bindir}/%{pypi_name}-3
%endif
%py2_install

%check
%if 0%{?with_python3}
nosetests-%{python3_version} --with-doctest
%endif
nosetests-%{python2_version} --with-doctest

%files -n python2-%{pypi_name}
%doc README.rst
%license LICENSE.rst
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%{python2_sitelib}/%{pypi_name}
%{_bindir}/%{pypi_name}

%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE.rst
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%{python3_sitelib}/%{pypi_name}
%{_bindir}/%{pypi_name}-3
%endif

%changelog
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.4-6
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Fri Jul 28 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.4-4
- Generate python2 subpackage

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

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

* Wed Jun 08 2016 Arie Bregman <abregman@redhat.com> - 1.0.4-1
- Initial package. (rhbz#1343895)