85 lines
2.3 KiB
RPMSpec
85 lines
2.3 KiB
RPMSpec
%global pypi_name xmlrunner
|
|
%global with_tests 1
|
|
|
|
Name: %{pypi_name}
|
|
Version: 1.7.7
|
|
Release: 1%{?dist}
|
|
Summary: A unittest test runner that can save test results to xml files
|
|
|
|
License: LGPLv3
|
|
URL: https://github.com/pycontribs/%{pypi_name}
|
|
Source0: https://github.com/pycontribs/%{pypi_name}/archive/%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python2-devel
|
|
%if 0%{?with_tests}
|
|
BuildRequires: python2-pytest
|
|
BuildRequires: python3-pytest
|
|
%endif
|
|
|
|
%description
|
|
Unittest-xml-reporting is a unittest test runner that can save test results
|
|
to xml files that can be consumed by a wide range of tools, such as build
|
|
systems, IDEs and continuous integration servers
|
|
|
|
%package -n python2-%{pypi_name}
|
|
Summary: A unittest test runner that can save test results to xml files
|
|
|
|
%{?python_provide:%python_provide python2-%{pypi_name}}
|
|
Requires: python-six
|
|
Requires: python2-django
|
|
Requires: python2-coverage
|
|
|
|
%description -n python2-%{pypi_name}
|
|
Unittest-xml-reporting is a unittest test runner that can save test results
|
|
to xml files that can be consumed by a wide range of tools, such as build
|
|
systems, IDEs and continuous integration servers
|
|
|
|
%package -n python3-%{pypi_name}
|
|
Summary: A unittest test runner that can save test results to XML files
|
|
|
|
%{?python_provide:%python_provide python3-%{pypi_name}}
|
|
Requires: python-six
|
|
Requires: python3-django
|
|
Requires: python3-coverage
|
|
|
|
%description -n python3-%{pypi_name}
|
|
Unittest-xml-reporting is a unittest test runner that can save test results
|
|
to xml files that can be consumed by a wide range of tools, such as build
|
|
systems, IDEs and continuous integration servers.
|
|
|
|
%prep
|
|
%setup -q -n %{pypi_name}-%{version}
|
|
|
|
%build
|
|
%py2_build
|
|
%py3_build
|
|
|
|
%install
|
|
%py2_install
|
|
%py3_install
|
|
|
|
# Strip out #!/usr/bin/env python
|
|
sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python2_sitelib}/%{pypi_name}/*.py
|
|
sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{pypi_name}/*.py
|
|
|
|
%check
|
|
%if %{with_tests}
|
|
%{__python2} setup.py test
|
|
%{__python3} setup.py test
|
|
%endif
|
|
|
|
%files -n python2-%{pypi_name}
|
|
%license LICENSE
|
|
%doc README.markdown
|
|
%{python2_sitelib}/*
|
|
|
|
%files -n python3-%{pypi_name}
|
|
%license LICENSE
|
|
%doc README.markdown
|
|
%{python3_sitelib}/*
|
|
|
|
%changelog
|
|
* Fri May 12 2017 Paul Whalen <pwhalen@redhat.com> 1.7.7-1
|
|
- Initial packaging.
|