Blob Blame Raw
%if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_without python3
%else  # 0#{?fedora} || 0#{?rhel} >= 8
%bcond_with python3
%endif # 0#{?fedora} || 0#{?rhel} >= 8

%global pypi_name nose_fixes
%global global_sum Plugin to make nose behave better
%global global_desc A plugin that changes nose to behave better.

Name:		python-%{pypi_name}
Version:	1.3
Release:	3%{?dist}
Summary:	%{global_sum}

License:	MIT

BuildArch:	noarch


%package doc
Summary:	Documentation-files for %{name}

%description doc
This package contains the documentation-files for %{name}.

%package -n python2-%{pypi_name}
Summary:	%{global_sum}

BuildRequires:	python2-devel
BuildRequires:	python-nose
BuildRequires:	python-pkginfo
BuildRequires:	python-setuptools
BuildRequires:	python-sphinx

Requires:	python-nose

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

%description -n python2-%{pypi_name}

%if %{with python3}
%package -n python3-%{pypi_name}
Summary:	%{global_sum}

BuildRequires:	python3-devel
BuildRequires:	python3-nose
BuildRequires:	python3-pkginfo
BuildRequires:	python3-setuptools
BuildRequires:	python3-sphinx

Requires:	python3-nose

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

%description -n python3-%{pypi_name}
%endif # with python3

%autosetup -n %{pypi_name}-%{version}
%{__rm} -fr *.egg*
%{__sed} -i -e 's!^SPHINXBUILD[ \t]*=.*$!SPHINXBUILD = %{_bindir}/sphinx-build!g' docs/Makefile

%if %{with python3}
%endif # with python3
%{__make} -C docs html

%if %{with python3}
%endif # with python3
%{__rm} -f docs/_build/html/{.buildinfo,objects.inv}

%{_bindir}/nosetests-%{python2_version} -vv
%if %{with python3}
%{_bindir}/nosetests-%{python3_version} -vv
%endif # with python3

%files doc
%doc docs/changes.txt docs/_build/html PKG-INFO
%license docs/license.txt

%files -n python2-%{pypi_name}
%license docs/license.txt

%if %{with python3}
%files -n python3-%{pypi_name}
%license docs/license.txt
%endif # with python3

* Fri Feb 09 2018 Fedora Release Engineering <> - 1.3-3
- Rebuilt for

* Thu Jul 27 2017 Fedora Release Engineering <> - 1.3-2
- Rebuilt for

* Wed Apr 26 2017 Björn Esser <> - 1.3-1
- Initial import (rhbz#1445822)

* Wed Apr 26 2017 Björn Esser <> - 1.3-0.1
- Initial rpm-release (rhbz#1445822)