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

%global pyname sphinxcontrib-issuetracker

Name:           python-%{pyname}
Version:        0.11
Release:        11%{?dist}
Summary:        Sphinx integration with different issue trackers

License:        BSD
URL:            https://pypi.python.org/pypi/%{pyname}
Source0:        https://pypi.python.org/packages/source/s/%{pyname}/%{pyname}-%{version}.tar.gz

# https://github.com/ignatenkobrain/sphinxcontrib-issuetracker/pull/13
Patch1:         920200bfa32ed99637a7df12695e07f60180ff3c.patch

BuildArch:      noarch
BuildRequires:  python2-devel
BuildRequires:  python-requests
BuildRequires:  python-sphinx >= 1.1
%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-requests
BuildRequires:  python3-sphinx >= 1.1
%endif # if with_python3

%global _description\
A Sphinx extension to reference issues in issue trackers, either explicitly\
with an "issue" role or optionally implicitly by issue ids like #10 in plain\
text.\
\
Currently the following issue trackers are supported:\
\
 *  GitHub\
 *  BitBucket\
 *  Launchpad\
 *  Google Code\
 *  Debian BTS\
 *  Jira\
\
A simple API is provided to add support for other issue trackers.  If you\
added support for a new tracker, please consider sending a patch to make your\
work available to other users of this extension.\


%description %_description

%package -n python2-%{pyname}
Summary: %summary
Requires:       python-requests
Requires:       python-sphinx >= 1.1
%{?python_provide:%python_provide python2-%{pyname}}

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

%if 0%{?with_python3}
%package -n python3-%{pyname}
Summary:        Sphinx integration with different issue trackers for Python 3
Requires:       python3-requests
Requires:       python3-sphinx >= 1.1

%description -n python3-%{pyname}
A Sphinx extension to reference issues in issue trackers, either explicitly
with an "issue" role or optionally implicitly by issue ids like #10 in plain
text.

Currently the following issue trackers are supported:

 *  GitHub
 *  BitBucket
 *  Launchpad
 *  Google Code
 *  Debian BTS
 *  Jira

A simple API is provided to add support for other issue trackers.  If you
added support for a new tracker, please consider sending a patch to make your
work available to other users of this extension.

This package contains the Python 3 version of the module.
%endif # with_python3


%prep
%setup -q -n %{pyname}-%{version}
%patch1 -p1
rm -rf *egg-info

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3


%build
%{__python2} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3


%install
%{__python2} setup.py install --skip-build --root %{buildroot}

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
%endif # with_python3


%check
%{__python2} setup.py test

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif # with_python3

 
%files -n python2-%{pyname}
%license LICENSE
%doc CHANGES.rst CREDITS README.rst doc
%{python2_sitelib}/*

%if 0%{?with_python3}
%files -n python3-%{pyname}
%license LICENSE
%doc CHANGES.rst CREDITS README.rst doc
%{python3_sitelib}/*
%endif # with_python3


%changelog
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Fri Dec 08 2017 Dan Callaghan <dcallagh@redhat.com> - 0.11-10
- Fix KeyError: 'refdomain' with latest Sphinx (RHBZ#1523462)

* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.11-9
- Python 2 binary package renamed to python2-sphinxcontrib-issuetracker
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3

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

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

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.11-6
- Rebuild for Python 3.6

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

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

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

* Tue Oct 7 2014 Orion Poplawski <orion@cora.nwra.com> - 0.11-2
- Add Requires on python-requests, python-sphinx
- Use %%license

* Fri Apr 18 2014 Orion Poplawski <orion@cora.nwra.com> - 0.11-1
- Initial package