From f5e03dfe0b3e1d05b0904b1a4edf9c878dc255fb Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Dec 06 2016 06:40:11 +0000 Subject: new release 0.8.3 --- diff --git a/.gitignore b/.gitignore index 1a39388..b07884b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ mwclient-0.6.5.zip /v0.7.2.tar.gz /mwclient-0.8.0.tar.gz /mwclient-0.8.1.tar.gz +/mwclient-0.8.3.tar.gz diff --git a/python-mwclient.spec b/python-mwclient.spec index cb64183..ad2eb58 100644 --- a/python-mwclient.spec +++ b/python-mwclient.spec @@ -1,37 +1,34 @@ -# Python 3 only for Fedora for now. +# Python 3 and tests only for Fedora for now: some deps missing on +# EL 7 %if 0%{?fedora} > 12 %global with_python3 1 +%global with_tests 1 %endif -# EPEL 6 compat stuff, per https://fedoraproject.org/wiki/EPEL:Packaging -%{!?__python2: %global __python2 /usr/bin/python2} -%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}} -%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}} +# packages required at both test time and run time +# these are all missing python2- provides on EL, I think +%global test_requires2 python-requests python-requests-oauthlib python-six +%global test_requires3 python3-requests python3-requests-oauthlib python3-six python3-simplejson %global github_owner mwclient %global github_name mwclient -%global github_commit 3f5898345059985e9f331ae16bf9f5d6d86edf80 +%global github_commit e2f4a22120a2d1f839160845aaaab87ef30a3088 Name: python-mwclient -Version: 0.8.1 -Release: 2%{?dist} +Version: 0.8.3 +Release: 1%{?dist} Summary: Mwclient is a client to the MediaWiki API Group: System Environment/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{github_name}-%{version}.tar.gz -# https://github.com/mwclient/mwclient/pull/107 -# Fixes a py3-incompatible invocation of exec -Patch0: 0001-use-exec-in-py3-compatible-manner.patch BuildArch: noarch BuildRequires: python2-devel # For EPEL BuildRequires: python-setuptools -# For tests, python-responses only available for Fedora >= 23 -%if 0%{?fedora} > 22 +%if 0%{?with_tests} BuildRequires: python2-pytest # Provides: python2-pytest-pep8 missing BuildRequires: python-pytest-pep8 @@ -43,10 +40,11 @@ BuildRequires: python-pytest-cov BuildRequires: python-mock BuildRequires: python2-funcsigs BuildRequires: python2-responses >= 0.3.0 -%endif # if fedora > 22 +BuildRequires: %{test_requires2} +%endif # if with_tests %if 0%{?with_python3} BuildRequires: python3-devel -%if 0%{?fedora} > 22 +%if 0%{?with_tests} BuildRequires: python3-pytest BuildRequires: python3-pytest-pep8 BuildRequires: python3-pytest-cache @@ -54,7 +52,8 @@ BuildRequires: python3-pytest-cov BuildRequires: python3-mock BuildRequires: python3-funcsigs BuildRequires: python3-responses >= 0.3.0 -%endif # if fedora > 22 +BuildRequires: %{test_requires3} +%endif # if with_tests %endif # if with_python3 %description @@ -64,17 +63,9 @@ provides access to most API functionality. %package -n python2-%{github_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{github_name}} -# EPEL 6 compat, no python_provide there -%if 0%{?rhel} -%if %{rhel} < 7 -Provides: python-%{github_name} = %{version}-%{release} -Obsoletes: python-%{github_name} < %{version}-%{release} -%endif # if rhel < 7 -%endif # if rhel Requires: python-simplejson -# EL6/7 packages don't provide python2-requests -Requires: python-requests +Requires: %{test_requires2} %description -n python2-%{github_name} %{github_name} is a lightweight Python client library to the MediaWiki API which @@ -85,8 +76,7 @@ provides access to most API functionality. This is the Python 2 build of %package -n python3-%{github_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{github_name}} -Requires: python3-simplejson -Requires: python3-requests +Requires: %{test_requires3} %description -n python3-%{github_name} %{github_name} is a lightweight Python client library to the MediaWiki API which @@ -95,9 +85,7 @@ provides access to most API functionality. This is the Python 3 build of %endif # if with_python3 %prep -# autosetup isn't available on epel6 yet -%setup -q -n %{github_name}-%{github_commit} -%patch0 -p1 -b .execpy3 +%autosetup -n %{github_name}-%{github_commit} %build @@ -115,28 +103,32 @@ provides access to most API functionality. This is the Python 3 build of %check -%if 0%{?fedora} > 22 +%if 0%{?with_tests} %{__python2} setup.py test %if 0%{?with_python3} %{__python3} setup.py test %endif # if with_python3 -%endif # if fedora > 22 +%endif # if with_tests %files -n python2-%{github_name} -%doc README.rst REFERENCE.md RELEASE-NOTES.md +%doc README.rst REFERENCE.md CHANGELOG.md %license LICENSE.md %{python2_sitelib}/%{github_name}* %if 0%{?with_python3} %files -n python3-%{github_name} -%doc README.rst REFERENCE.md RELEASE-NOTES.md +%doc README.rst REFERENCE.md CHANGELOG.md %license LICENSE.md %{python3_sitelib}/%{github_name}* %endif # if with_python3 %changelog +* Mon Dec 05 2016 Adam Williamson - 0.8.3-1 +- new release 0.8.3 (note: no EL 6 from now on, upstream dropped Python 2.6) +- drop patch merged upstream +- update requirements - enable tests on F23 (python-funcsigs update went stable) * Mon Feb 29 2016 Adam Williamson - 0.8.1-2 diff --git a/sources b/sources index b893e7f..81ef05f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fba2c75f9f38d1a3ffeb76f34d7d8dcb mwclient-0.8.1.tar.gz +e17ccfe16a5ea97bd118753528a9b21f mwclient-0.8.3.tar.gz