|
|
2c66a2d |
# Python 3 for Fedora for now: some deps missing on EL 7
|
|
|
b2e36bf |
%if 0%{?fedora} > 12
|
|
|
b2e36bf |
%global with_python3 1
|
|
|
d942690 |
%endif
|
|
|
2c66a2d |
|
|
|
2c66a2d |
# Disable Python 2 builds for Fedora > 29, EPEL > 7
|
|
|
2c66a2d |
%if 0%{?fedora} > 29 || 0%{?rhel} > 7
|
|
|
2c66a2d |
%bcond_with python2
|
|
|
2c66a2d |
%global obsolete2 1
|
|
|
2c66a2d |
%else
|
|
|
2c66a2d |
%bcond_without python2
|
|
|
2c66a2d |
%global obsolete2 0
|
|
|
2c66a2d |
%endif
|
|
|
2c66a2d |
|
|
|
2c66a2d |
# used for annoying deps which don't provide 'python2-foo' on EPEL
|
|
|
2c66a2d |
%if 0%{?rhel} && 0%{?rhel} < 8
|
|
|
2c66a2d |
%global py2_prefix python
|
|
|
2c66a2d |
%else
|
|
|
2c66a2d |
%global py2_prefix python2
|
|
|
34f4566 |
%endif
|
|
|
ea0d17d |
|
|
|
ecc4a4d |
# packages required at both test time and run time
|
|
|
59f83e1 |
# python-requests-oauthlib is in RHEL 7 but does not provide
|
|
|
59f83e1 |
# python2-requests-oauthlib
|
|
|
2c66a2d |
%global test_requires2 python2-requests %{py2_prefix}-requests-oauthlib python2-six
|
|
|
ecc4a4d |
%global test_requires3 python3-requests python3-requests-oauthlib python3-six python3-simplejson
|
|
|
6833e5c |
|
|
|
cf50484 |
%global github_owner mwclient
|
|
|
cf50484 |
%global github_name mwclient
|
|
|
ea0d17d |
|
|
|
ea0d17d |
Name: python-mwclient
|
|
|
7d70e71 |
Version: 0.9.3
|
|
|
1d824ab |
Release: 3%{?dist}
|
|
|
ea0d17d |
Summary: Mwclient is a client to the MediaWiki API
|
|
|
ea0d17d |
|
|
|
ea0d17d |
License: MIT
|
|
|
cf50484 |
URL: https://github.com/%{github_owner}/%{github_name}
|
|
|
01977b4 |
Source0: https://github.com/%{github_owner}/%{github_name}/archive/v%{version}.tar.gz
|
|
|
1d824ab |
# Backports from master: migrate from pep8 to flake8
|
|
|
1d824ab |
Patch0: 0001-Switch-to-pycodestyle.patch
|
|
|
1d824ab |
Patch1: 0002-pytest-cache-is-now-built-into-pytest.patch
|
|
|
1d824ab |
Patch2: 0003-Switch-to-flake8-for-linting.patch
|
|
|
1d824ab |
# Not yet upstreamed as I'm not sure of upstream's preferred solution
|
|
|
1d824ab |
# yet: don't tests_require flake8 as setup.py test does not run it
|
|
|
1d824ab |
# https://github.com/mwclient/mwclient/issues/226
|
|
|
1d824ab |
Patch3: 0001-setup.py-tests-don-t-require-flake8.patch
|
|
|
34f4566 |
BuildArch: noarch
|
|
|
ea0d17d |
|
|
|
2c66a2d |
%description
|
|
|
2c66a2d |
mwclient is a lightweight Python client library to the MediaWiki API which
|
|
|
2c66a2d |
provides access to most API functionality.
|
|
|
2c66a2d |
|
|
|
2c66a2d |
%if 0%{?with_python2}
|
|
|
2c66a2d |
%package -n python2-%{github_name}
|
|
|
2c66a2d |
Summary: %{summary}
|
|
|
2c66a2d |
%{?python_provide:%python_provide python2-%{github_name}}
|
|
|
2c66a2d |
|
|
|
34f4566 |
BuildRequires: python2-devel
|
|
|
b2e36bf |
# For EPEL
|
|
|
d942690 |
BuildRequires: python2-setuptools
|
|
|
04088f7 |
BuildRequires: python2-pytest
|
|
|
1d824ab |
# cache has been built into pytest since 2.8.0. Unfortunately, el7
|
|
|
1d824ab |
# has 2.7.0...
|
|
|
1d824ab |
%if 0%{?rhel} < 8
|
|
|
d942690 |
# python2-pytest-cache provide doesn't exist on EPEL 7 and making it
|
|
|
d942690 |
# happen is kind of a nightmare due to tricky arch issues with
|
|
|
d942690 |
# eventlet/greenlet
|
|
|
1d824ab |
BuildRequires: python-pytest-cache
|
|
|
1d824ab |
%endif
|
|
|
01977b4 |
BuildRequires: python2-pytest-cov
|
|
|
b9a88e3 |
BuildRequires: python2-pytest-runner
|
|
|
01977b4 |
BuildRequires: python2-mock
|
|
|
04088f7 |
BuildRequires: python2-funcsigs
|
|
|
04088f7 |
BuildRequires: python2-responses >= 0.3.0
|
|
|
ecc4a4d |
BuildRequires: %{test_requires2}
|
|
|
6833e5c |
|
|
|
2c66a2d |
Requires: python2-simplejson
|
|
|
ecc4a4d |
Requires: %{test_requires2}
|
|
|
b2e36bf |
|
|
|
b2e36bf |
%description -n python2-%{github_name}
|
|
|
b2e36bf |
%{github_name} is a lightweight Python client library to the MediaWiki API which
|
|
|
b2e36bf |
provides access to most API functionality. This is the Python 2 build of
|
|
|
b2e36bf |
%{github_name}.
|
|
|
2c66a2d |
%endif # if with_python2
|
|
|
b2e36bf |
|
|
|
b2e36bf |
%if 0%{?with_python3}
|
|
|
b2e36bf |
%package -n python3-%{github_name}
|
|
|
b2e36bf |
Summary: %{summary}
|
|
|
b2e36bf |
%{?python_provide:%python_provide python3-%{github_name}}
|
|
|
2c66a2d |
%if 0%{?obsolete2}
|
|
|
2c66a2d |
Obsoletes: python2-%{github_name} < %{version}-%{release}
|
|
|
2c66a2d |
%endif # obsolete2
|
|
|
2c66a2d |
|
|
|
2c66a2d |
BuildRequires: python3-devel
|
|
|
2c66a2d |
BuildRequires: python3-pytest
|
|
|
1d824ab |
# cache has been built into pytest since 2.8.0. Unfortunately, el7
|
|
|
1d824ab |
# has 2.7.0...
|
|
|
1d824ab |
%if 0%{?rhel} < 8
|
|
|
2c66a2d |
BuildRequires: python3-pytest-cache
|
|
|
1d824ab |
%endif
|
|
|
2c66a2d |
BuildRequires: python3-pytest-cov
|
|
|
2c66a2d |
BuildRequires: python3-pytest-runner
|
|
|
2c66a2d |
BuildRequires: python3-mock
|
|
|
2c66a2d |
BuildRequires: python3-funcsigs
|
|
|
2c66a2d |
BuildRequires: python3-responses >= 0.3.0
|
|
|
2c66a2d |
BuildRequires: %{test_requires3}
|
|
|
2c66a2d |
|
|
|
ecc4a4d |
Requires: %{test_requires3}
|
|
|
b2e36bf |
|
|
|
b2e36bf |
%description -n python3-%{github_name}
|
|
|
b2e36bf |
%{github_name} is a lightweight Python client library to the MediaWiki API which
|
|
|
b2e36bf |
provides access to most API functionality. This is the Python 3 build of
|
|
|
b2e36bf |
%{github_name}.
|
|
|
b2e36bf |
%endif # if with_python3
|
|
|
b2e36bf |
|
|
|
ea0d17d |
%prep
|
|
|
01977b4 |
%autosetup -p1 -n %{github_name}-%{version}
|
|
|
ea0d17d |
|
|
|
ea0d17d |
|
|
|
ea0d17d |
%build
|
|
|
2c66a2d |
%if 0%{?with_python2}
|
|
|
b2e36bf |
%py2_build
|
|
|
2c66a2d |
%endif # if with_python2
|
|
|
b2e36bf |
%if 0%{?with_python3}
|
|
|
b2e36bf |
%py3_build
|
|
|
b2e36bf |
%endif # if with_python3
|
|
|
ea0d17d |
|
|
|
ea0d17d |
|
|
|
ea0d17d |
%install
|
|
|
2c66a2d |
%if 0%{?with_python2}
|
|
|
b2e36bf |
%py2_install
|
|
|
2c66a2d |
%endif # if with_python2
|
|
|
b2e36bf |
%if 0%{?with_python3}
|
|
|
b2e36bf |
%py3_install
|
|
|
b2e36bf |
%endif # if with_python3
|
|
|
ea0d17d |
|
|
|
ea0d17d |
|
|
|
04088f7 |
%check
|
|
|
2c66a2d |
%if 0%{?with_python2}
|
|
|
04088f7 |
%{__python2} setup.py test
|
|
|
2c66a2d |
%endif # if with_python2
|
|
|
b2e36bf |
%if 0%{?with_python3}
|
|
|
04088f7 |
%{__python3} setup.py test
|
|
|
b2e36bf |
%endif # if with_python3
|
|
|
cf50484 |
|
|
|
ea0d17d |
|
|
|
2c66a2d |
%if 0%{?with_python2}
|
|
|
b2e36bf |
%files -n python2-%{github_name}
|
|
|
72686a2 |
%doc README.md REFERENCE.md CHANGELOG.md
|
|
|
b2e36bf |
%license LICENSE.md
|
|
|
cf50484 |
%{python2_sitelib}/%{github_name}*
|
|
|
2c66a2d |
%endif # if with_python2
|
|
|
ea0d17d |
|
|
|
b2e36bf |
%if 0%{?with_python3}
|
|
|
b2e36bf |
%files -n python3-%{github_name}
|
|
|
72686a2 |
%doc README.md REFERENCE.md CHANGELOG.md
|
|
|
b2e36bf |
%license LICENSE.md
|
|
|
b2e36bf |
%{python3_sitelib}/%{github_name}*
|
|
|
b2e36bf |
%endif # if with_python3
|
|
|
b2e36bf |
|
|
|
ea0d17d |
|
|
|
ea0d17d |
%changelog
|
|
|
1d824ab |
* Wed Jun 26 2019 Adam Williamson <awilliam@redhat.com> - 0.9.3-3
|
|
|
1d824ab |
- Backport a few patches to remove use of pep8 (being retired)
|
|
|
1d824ab |
- Only BuildRequire pytest-cache on EL7, it is part of pytest since
|
|
|
1d824ab |
|
|
|
0b2aefd |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.3-2
|
|
|
0b2aefd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
0b2aefd |
|
|
|
7d70e71 |
* Fri Nov 23 2018 Adam Williamson <awilliam@redhat.com> - 0.9.3-1
|
|
|
7d70e71 |
- New release 0.9.3
|
|
|
7d70e71 |
- Disable Python 2 build on F30+ / RHEL 8+
|
|
|
7d70e71 |
|
|
|
f0803cb |
* Tue Jul 31 2018 Adam Williamson <awilliam@redhat.com> - 0.9.1-1
|
|
|
f0803cb |
- New release 0.9.1
|
|
|
f0803cb |
|
|
|
595be88 |
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-3
|
|
|
595be88 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
595be88 |
|
|
|
4c59869 |
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.9.0-2
|
|
|
4c59869 |
- Rebuilt for Python 3.7
|
|
|
4c59869 |
|
|
|
d942690 |
* Tue Jun 12 2018 Adam Williamson <awilliam@redhat.com> - 0.9.0-1
|
|
|
d942690 |
- New release 0.9.0
|
|
|
d942690 |
- Version the python2 requires (except one)
|
|
|
d942690 |
- Enable tests on EPEL 7+
|
|
|
d942690 |
|
|
|
352ba5e |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.7-2
|
|
|
352ba5e |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
352ba5e |
|
|
|
23249e3 |
* Mon Jan 15 2018 Adam Williamson <awilliam@redhat.com> - 0.8.7-1
|
|
|
23249e3 |
- New release 0.8.7
|
|
|
23249e3 |
- Drop PR #177 patch, merged upstream
|
|
|
23249e3 |
|
|
|
01977b4 |
* Thu Nov 16 2017 Adam Williamson <awilliam@redhat.com> - 0.8.6-1
|
|
|
01977b4 |
- New release 0.8.6
|
|
|
01977b4 |
- Backport PR #177 to restore compatibility with older responses
|
|
|
01977b4 |
|
|
|
a2dff37 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.4-2
|
|
|
a2dff37 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
a2dff37 |
|
|
|
b467835 |
* Fri Mar 17 2017 Adam Williamson <awilliam@redhat.com> - 0.8.4-1
|
|
|
b467835 |
- New release 0.8.4
|
|
|
b467835 |
|
|
|
61b7a1a |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.3-3
|
|
|
61b7a1a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
61b7a1a |
|
|
|
aa24833 |
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.8.3-2
|
|
|
aa24833 |
- Rebuild for Python 3.6
|
|
|
aa24833 |
|
|
|
ecc4a4d |
* Mon Dec 05 2016 Adam Williamson <awilliam@redhat.com> - 0.8.3-1
|
|
|
ecc4a4d |
- new release 0.8.3 (note: no EL 6 from now on, upstream dropped Python 2.6)
|
|
|
ecc4a4d |
- drop patch merged upstream
|
|
|
ecc4a4d |
- update requirements
|
|
|
ecc4a4d |
- enable tests on F23 (python-funcsigs update went stable)
|
|
|
ecc4a4d |
|
|
|
f807996 |
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
|
|
|
f807996 |
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
f807996 |
|
|
|
c836458 |
* Mon Feb 29 2016 Adam Williamson <awilliam@redhat.com> - 0.8.1-2
|
|
|
c836458 |
- re-add a patch which it turns out wasn't merged upstream yet
|
|
|
c836458 |
|
|
|
5c20328 |
* Mon Feb 29 2016 Adam Williamson <awilliam@redhat.com> - 0.8.1-1
|
|
|
5c20328 |
- new release 0.8.1
|
|
|
5c20328 |
- drop patches merged upstream
|
|
|
5c20328 |
|
|
|
04088f7 |
* Tue Feb 16 2016 Adam Williamson <awilliam@redhat.com> - 0.8.0-3
|
|
|
04088f7 |
- enable tests on Fedora > 23 (deps now available)
|
|
|
04088f7 |
|
|
|
47f40dd |
* Wed Feb 03 2016 Adam Williamson <awilliam@redhat.com> - 0.8.0-2
|
|
|
47f40dd |
- fix an iterator problem with Python 3 (upstream PR #108)
|
|
|
47f40dd |
|
|
|
b2e36bf |
* Thu Jan 21 2016 Adam Williamson <awilliam@redhat.com> - 0.8.0-1
|
|
|
b2e36bf |
- new release 0.8.0
|
|
|
b2e36bf |
- split into python2 and python3 builds (0.8.0 adds py3 support)
|
|
|
b2e36bf |
|
|
|
9c0cb51 |
* Fri Aug 07 2015 Adam Williamson <awilliam@redhat.com> - 0.7.2-1
|
|
|
9c0cb51 |
- new release 0.7.2
|
|
|
9c0cb51 |
|
|
|
166f117 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.1-2
|
|
|
166f117 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
166f117 |
|
|
|
cf50484 |
* Fri Dec 12 2014 Adam Williamson <awilliam@redhat.com> - 0.7.1-1
|
|
|
cf50484 |
- new release 0.7.1, bit of spec cleaning
|
|
|
cf50484 |
|
|
|
294ea50 |
* Fri Oct 31 2014 Adam Williamson <awilliam@redhat.com> - 0.7.0-2
|
|
|
294ea50 |
- requires python-requests
|
|
|
294ea50 |
|
|
|
34f4566 |
* Wed Oct 01 2014 Adam Williamson <awilliam@redhat.com> - 0.7.0-1
|
|
|
34f4566 |
- new release: 0.7.0
|
|
|
34f4566 |
- update for github source, use of setuptools and modern Python packaging rules
|
|
|
34f4566 |
|
|
|
6156c25 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.5-6
|
|
|
6156c25 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
6156c25 |
|
|
|
e1692fc |
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.5-5
|
|
|
e1692fc |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
e1692fc |
|
|
|
1f3e82c |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.5-4
|
|
|
1f3e82c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
1f3e82c |
|
|
|
5fd32b1 |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.5-3
|
|
|
5fd32b1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
5fd32b1 |
|
|
|
f464a24 |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.5-2
|
|
|
f464a24 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
f464a24 |
|
|
|
fba6c00 |
* Thu Oct 27 2011 Robert Scheck <robert@fedoraproject.org> - 0.6.5-1
|
|
|
fba6c00 |
- Upgrade to 0.6.5 (#714302)
|
|
|
fba6c00 |
|
|
|
a63a48f |
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.3-5
|
|
|
a63a48f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
a63a48f |
|
|
|
3d73c0f |
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.3-4
|
|
|
3d73c0f |
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
|
|
|
3d73c0f |
|
|
|
6970c02 |
* Tue Sep 22 2009 Steven M. Parrish <smparrish@gmail.com> - 0.6.3-3
|
|
|
6970c02 |
- Fix patch
|
|
|
6970c02 |
|
|
|
ea0d17d |
* Sun Sep 20 2009 Rex Dieter <rdieter@fedoraproject.org> - 0.6.3-2
|
|
|
ea0d17d |
- upstream wmf patch
|
|
|
ea0d17d |
- %%doc README.txt
|
|
|
ea0d17d |
- use %%global (instead of %%define)
|
|
|
ea0d17d |
|
|
|
ea0d17d |
* Tue Sep 15 2009 Steven M. Parrish <smparrish@gmail.com> - 0.6.3-1
|
|
|
ea0d17d |
- Initial build
|