bd50e11
%global srcname bibtexparser
bd50e11
bd50e11
Name:           python-%{srcname}
ffa50d6
Version:        1.4.0
ffa50d6
Release:        %autorelease
bd50e11
Summary:        A BibTeX parsing library
bd50e11
bd50e11
License:        BSD or LGPLv3
bd50e11
URL:            https://github.com/sciunto-org/python-%{srcname}
bd50e11
Source0:        https://github.com/sciunto-org/python-%{srcname}/archive/v%{version}/%{name}-%{version}.tar.gz
bd50e11
bd50e11
BuildArch:      noarch
bd50e11
BuildRequires:  python3-devel
bd50e11
BuildRequires:  python3-setuptools
bd50e11
BuildRequires:  python3-pyparsing
bd50e11
BuildRequires:  python3-sphinx
bd50e11
bd50e11
%description
bd50e11
BibtexParser is a python library to parse BibTeX files. The code relies
bd50e11
on pyparsing and is tested with unit tests.
bd50e11
bd50e11
%package -n python3-%{srcname}
bd50e11
Summary:        %{summary}
bd50e11
%{?python_provide:%python_provide python3-%{srcname}}
bd50e11
bd50e11
%description -n python3-%{srcname}
bd50e11
BibtexParser is a python library to parse BibTeX files. The code relies
bd50e11
on pyparsing and is tested with unittests.
bd50e11
bd50e11
%package doc
bd50e11
Summary: python-bibtexparser documentation
bd50e11
bd50e11
%description doc
bd50e11
Documentation for python-bibtexparser.
bd50e11
bd50e11
%prep
bd50e11
%autosetup -n python-%{srcname}-%{version} -p1
bd50e11
bd50e11
%build
bd50e11
%py3_build
bd50e11
# Generate html documentation.
bd50e11
PYTHONPATH=${PWD} sphinx-build docs/source html
bd50e11
# Remove the sphinx-build leftovers.
bd50e11
rm -rf html/.{doctrees,buildinfo}
bd50e11
bd50e11
%install
bd50e11
%py3_install
bd50e11
bd50e11
%files -n python3-%{srcname}
ffa50d6
%doc CHANGELOG README.rst requirements.txt
bd50e11
%license COPYING
bd50e11
%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/
bd50e11
%{python3_sitelib}/bibtexparser/
bd50e11
bd50e11
%files doc
bd50e11
%doc html
bd50e11
%license COPYING
bd50e11
bd50e11
%changelog
ffa50d6
%autochangelog