Blob Blame History Raw
%global srcname sphinxcontrib-bibtex

Name:           python-%{srcname}
Version:        0.4.0
Release:        4%{?dist}
Summary:        Sphinx extension for BibTeX style citations

License:        BSD
URL:            https://github.com/mcmtroffaes/sphinxcontrib-bibtex
Source0:        https://github.com/mcmtroffaes/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
BuildArch:      noarch
# Use orderedset instead of oset; the latter has a dead upstream
Patch0:         %{name}-orderedset.patch

BuildRequires:  python3-sphinx
BuildRequires:  python3-sphinx-testing

BuildRequires:  python3-coverage
BuildRequires:  python3-devel
BuildRequires:  python3-latexcodec
BuildRequires:  python3-nose
BuildRequires:  python3-orderedset
BuildRequires:  python3-pybtex
BuildRequires:  python3-pybtex-docutils
BuildRequires:  python3-setuptools
BuildRequires:  python3-six
BuildRequires:  python3-sphinx
BuildRequires:  python3-sphinx-testing

%global common_desc \
This package contains a Sphinx extension for BibTeX style citations.\
\
This extension allows BibTeX citations to be inserted into documentation\
generated by Sphinx, via a bibliography directive, and a cite role,\
which work similarly to LaTeX's thebibliography environment and \\cite\
command.\
\
For formatting, the extension relies on pybtex, written by Andrey\
Golovizin.

%description
%common_desc

%package -n python3-%{srcname}
Summary:        Sphinx extension for BibTeX style citations
Requires:       python3-latexcodec
Requires:       python3-orderedset
Requires:       python3-pybtex
Requires:       python3-pybtex-docutils
Requires:       python3-six

Provides:       bundled(jquery)
Provides:       bundled(js-underscore)
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
%common_desc

%package doc
Summary:        Documentation for python-%{srcname}

%description doc
Documentation for python-%{srcname}.

%prep
%setup -q -n %{srcname}-%{version}
%patch0

# Don't run the tinkerer integration test since Fedora doesn't have tinkerer
rm -fr test/{test_issue1.py,issue1}

%build
%py3_build

# Build documentation
PYTHONPATH=$PWD sphinx-build-3 doc html
rm -fr html/{.buildinfo,.doctrees}

%install
%py3_install

%check
PYTHONPATH=$PWD nosetests-3 -v

%files -n python3-%{srcname}
%license LICENSE.rst
%{python3_sitelib}/sphinxcontrib/
%{python3_sitelib}/sphinxcontrib_bibtex*

%files doc
%doc html/*

%changelog
* Thu Oct 25 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4.0-4
- Subpackage python2-sphinxcontrib-bibtex has been removed
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal

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

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4.0-2
- Rebuilt for Python 3.7

* Thu Apr 19 2018 Jerry James <loganjerry@gmail.com> - 0.4.0-1
- New upstream version

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

* Tue Sep 26 2017 Jerry James <loganjerry@gmail.com> - 0.3.6-1
- New upstream version
- Drop upstreamed python 3.6 fix

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

* Wed Feb 22 2017 Jerry James <loganjerry@gmail.com> - 0.3.5-1
- New upstream version

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

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

* Mon May 23 2016 Jerry James <loganjerry@gmail.com> - 0.3.4-1
- New upstream version

* Thu Feb 25 2016 Jerry James <loganjerry@gmail.com> - 0.3.3-1
- Initial RPM