Blob Blame History Raw
%global tarball_name simplemediawiki
%global full_version %{version}b2

%if 0%{?fedora}
%global with_python3 1
%endif

Name:           python-%{tarball_name}
Version:        1.2.0
Release:        0.3.b2%{?dist}
Summary:        Extremely low-level wrapper to the MediaWiki API

License:        LGPLv2+
URL:            https://github.com/ianweller/python-simplemediawiki
Source0:        http://pypi.python.org/packages/source/s/%{tarball_name}/%{tarball_name}-%{full_version}.tar.gz

BuildArch:      noarch
BuildRequires:  python2-devel python-kitchen python-nose python-sphinx
Requires:       python-kitchen python-sphinx
%if 0%{?with_python3}
BuildRequires:  python3-devel python3-nose python3-sphinx
%endif

%description
The module simplemediawiki is an extremely low-level wrapper to the MediaWiki 
API. It automatically handles cookies and g zip compression so that you can 
make basic calls to the API in the easiest way possible. It also provides a 
few functions to make day-to-day API access easier.

%if 0%{?with_python3}
%package -n python3-%{tarball_name}
Summary:        Extremely low-level wrapper to the MediaWiki API

%description -n python3-%{tarball_name}
The module simplemediawiki is an extremely low-level wrapper to the MediaWiki
API. It automatically handles cookies and g zip compression so that you can
make basic calls to the API in the easiest way possible. It also provides a
few functions to make day-to-day API access easier.

This is the Python 3 version.
%endif

%prep
%setup -qn %{tarball_name}-%{full_version}

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

%build
%{__python} setup.py build build_sphinx

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

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

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

%files
%doc COPYING PKG-INFO README build/sphinx/html
%{python_sitelib}/*

%if 0%{?with_python3}
%files -n python3-%{tarball_name}
%doc COPYING PKG-INFO README build/sphinx/html
%{python3_sitelib}/*
%endif

%changelog
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-0.3.b2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.2.0-0.2.b2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Mon Aug 12 2013 Ian Weller <iweller@redhat.com> - 1.2.0-0.1.b2
- Update to version 1.2.0b1
- Add Python 3 support

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Thu Jan 26 2012 Ian Weller <iweller@redhat.com> - 1.1.1-1
- Update to version 1.1.1
  - Fixes an issue where MediaWiki.parse_date doesn't actually work at all
  - Remove dependency on python-iso8601 which is no longer necessary
  - Add dependency on python-kitchen

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Feb 28 2011 Luke Macken <lmacken@redhat.com> - 1.1-1
- Update to 1.1 (#678398)
- Require python-simplejson
- Include the README
- Build the HTML documentation

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sat Nov 20 2010 Abdel Martínez <potty@fedoraproject.org> - 1.0-3
- Requires (python-iso8601) added.

* Fri Nov 12 2010 Abdel Martínez <potty@fedoraproject.org> - 1.0-2
- Correcting license.
- Remove/adding variables.
- Modifying description length.
- Adding documentation.

* Wed Nov 10 2010 Abdel Martínez <potty@fedoraproject.org> - 1.0-1
- First package build.