Blob Blame History Raw
%global srcname wikipedia

Name:           python-%{srcname}
Version:        1.4.5
Release:        7%{?dist}
Summary:        Wikipedia API for Python

License:        MIT
URL:            https://github.com/barrust/Wikipedia
Source0:        https://github.com/barrust/Wikipedia/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz

BuildArch:      noarch

%description
Search Wikipedia, get article summaries, get data like links and images
from a page, and more.

%package -n     python2-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{srcname}}
BuildRequires:  python2-devel
BuildRequires:  python2-beautifulsoup4
BuildRequires:  python2-nose
BuildRequires:  python2-requests
BuildRequires:  python2-setuptools
Requires:       python2-beautifulsoup4
Requires:       python2-requests

%description -n python2-%{srcname}
Search Wikipedia, get article summaries, get data like links and images
from a page, and more.

%package -n     python3-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{srcname}}
BuildRequires:  python3-devel
BuildRequires:  python3-beautifulsoup4
BuildRequires:  python3-nose
BuildRequires:  python3-requests
BuildRequires:  python3-setuptools
Requires:       python3-beautifulsoup4
Requires:       python3-requests

%description -n python3-%{srcname}
Search Wikipedia, get article summaries, get data like links and images
from a page, and more.

%prep
%autosetup -n Wikipedia-%{version}

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%check
nosetests -v tests
nosetests-%{python2_version}
nosetests-%{python3_version}

%files -n python2-%{srcname}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-*.egg-info

%files -n python3-%{srcname}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-*.egg-info

%changelog
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.4.5-7
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

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

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

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

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.4.5-3
- Rebuild for Python 3.6

* Tue Oct 18 2016 Martin Gansser <martinkg@fedoraproject.org> - 1.4.5-2
- Update to BR python2-requests
- Update to BR python2-setuptools

* Fri Oct 14 2016 Martin Gansser <martinkg@fedoraproject.org> - 1.4.5-1
- Update to 1.4.5-1
- Cleanup spec file
- Use Requires python2-requests
- Write the content to Summary and in the rest use %%{summary} marco

* Sun Oct 02 2016 Martin Gansser <martinkg@fedoraproject.org> - 1.4.4-1.gitb329024
- Initial package