From ea0d17de759573d71495f4a51f3af5a3b8aaa851 Mon Sep 17 00:00:00 2001 From: Steven M. Parrish Date: Sep 22 2009 13:05:47 +0000 Subject: Initial build of python-mwclient --- diff --git a/.cvsignore b/.cvsignore index e69de29..5a8f48f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +mwclient-0.6.3.zip diff --git a/mwclient-wmf.patch b/mwclient-wmf.patch new file mode 100644 index 0000000..2346ecb --- /dev/null +++ b/mwclient-wmf.patch @@ -0,0 +1,12 @@ +diff -up mwclient/client.py.wmf mwclient/client.py +--- mwclient/client.py.wmf 2009-07-16 21:22:54.000000000 -0500 ++++ mwclient/client.py 2009-09-20 14:57:59.971785030 -0500 +@@ -100,7 +100,7 @@ class Site(object): + if len(version) == 2 and version[1].endswith('alpha'): + self.version = (int(version[0]), int(version[1][:-5]), 'alpha') + elif len(version) == 2 and version[1].endswith('alpha-wmf'): +- self.version = (int(version[0]), int(version[1][:-5]), 'alpha-wmf') ++ self.version = (int(version[0]), int(version[1][:-9]), 'alpha-wmf') + elif len(version) == 3 and 'rc' in version[2]: + self.version = (int(version[0]), int(version[1]), version[2]) + elif len(version) == 3: diff --git a/python-mwclient.spec b/python-mwclient.spec new file mode 100644 index 0000000..9d3ac14 --- /dev/null +++ b/python-mwclient.spec @@ -0,0 +1,61 @@ +%{!?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()")} + + +Name: python-mwclient +Version: 0.6.3 +Release: 2%{?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 + +## upstream patches +Patch100: mwclient-wmf.patch + +BuildRequires: python-devel +Requires: python-simplejson + +%description +Mwclient is a client to the MediaWiki API +and allows access to almost all implemented API functions + +%prep +%setup -q -n mwclient + +%patch100 -p1 -b .wmf + + +%build +# intentionally left blank + + +%install +rm -rf $RPM_BUILD_ROOT +install -d -m755 %{buildroot}%{python_sitelib}/mwclient/ +install -pm 0644 *.py %{buildroot}%{python_sitelib}/mwclient/ + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc README.txt +%{python_sitelib}/mwclient/ + + +%changelog +* Sun Sep 20 2009 Rex Dieter - 0.6.3-2 +- upstream wmf patch +- %%doc README.txt +- use %%global (instead of %%define) + +* Tue Sep 15 2009 Steven M. Parrish - 0.6.3-1 +- Initial build diff --git a/sources b/sources index e69de29..7042764 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +3f050ea125dc31971130449da6e3c0c2 mwclient-0.6.3.zip