diff --git a/.gitignore b/.gitignore index cc45697..55a4b62 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ mwclient-0.6.5.zip +/v0.7.0.tar.gz diff --git a/python-mwclient.spec b/python-mwclient.spec index f05898e..d7ef820 100644 --- a/python-mwclient.spec +++ b/python-mwclient.spec @@ -1,21 +1,23 @@ -%{!?pyver:%global pyver %(%{__python} -c "import sys ; print sys.version[:3]")} -%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -%{!?python_sitelib:%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{!?__python2: %global __python2 /usr/bin/python2} +%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif +%global srcname mwclient Name: python-mwclient -Version: 0.6.5 -Release: 6%{?dist} +Version: 0.7.0 +Release: 1%{?dist} Summary: Mwclient is a client to the MediaWiki API Group: System Environment/Libraries License: MIT -URL: http://sourceforge.net/apps/mediawiki/mwclient/index.php?title=Main_Page -Source0: http://downloads.sourceforge.net/mwclient/mwclient-%{version}.zip -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildArch: noarch +URL: https://github.com/mwclient/mwclient +Source0: https://github.com/mwclient/mwclient/archive/v%{version}.tar.gz +BuildArch: noarch -BuildRequires: python-devel +BuildRequires: python2-devel Requires: python-simplejson %description @@ -23,17 +25,16 @@ Mwclient is a client to the MediaWiki API and allows access to almost all implemented API functions %prep -%setup -q -n mwclient +%setup -q -n %{srcname}-%{version} %build -# intentionally left blank +%{__python2} setup.py build %install rm -rf $RPM_BUILD_ROOT -install -d -m755 %{buildroot}%{python_sitelib}/mwclient/ -install -pm 0644 *.py %{buildroot}%{python_sitelib}/mwclient/ +%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT %clean @@ -42,11 +43,15 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc README.txt REFERENCE.txt RELEASE-NOTES.txt -%{python_sitelib}/mwclient/ +%doc README.rst REFERENCE.md RELEASE-NOTES.md LICENSE.md +%{python2_sitelib}/%{srcname}* %changelog +* Wed Oct 01 2014 Adam Williamson - 0.7.0-1 +- new release: 0.7.0 +- update for github source, use of setuptools and modern Python packaging rules + * Sat Jun 07 2014 Fedora Release Engineering - 0.6.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index 75ca3cc..e893d16 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -88319b6962372e4b271dd2ca6a3d4273 mwclient-0.6.5.zip +dc94c651c7c3fd9fa819b7c40a6a1e74 v0.7.0.tar.gz