%if 0%{?fedora} < 13 && 0%{?rhel} < 6 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif %global tarball_name Python_WebDAV_Library Name: python-webdav-library Version: 0.2.0 Release: 1%{?dist} Summary: Object-oriented Python WebDAV client-side library Group: Development/Libraries # most parts are ASL 2.0 # qp_xml.py is Public Domain # davlib.py is Python license License: ASL 2.0 and Python and Public Domain URL: https://launchpad.net/python-webdav-lib # source releases are done on pypi (homepage states 1.2 as latest version) Source0: http://launchpad.net/python-webdav-lib/trunk/0.2.0/+download/%{tarball_name}-%{version}.zip Patch0: 0001-Use-PyXML-qp_xml-module.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python2-devel,python-setuptools Requires: PyXML %description This project aims to provide an object-oriented Python WebDAV client-side library based on Python`s standard httplib and Greg Stein`s davlib. The client shall fully support RFCs 4918 (basic specification), 3744 (access control), and 3253 (versioning). %prep %setup -q -n %{tarball_name}-%{version} %patch0 -p1 # fix EOLs sed -i 's/\r//' *.txt %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT # remove bundled qp_xml (we patched sources to use PyXML version) rm $RPM_BUILD_ROOT/%{python_sitelib}/qp_xml* %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE.txt CHANGES.txt README.txt %{python_sitelib}/webdav %{python_sitelib}/davlib.py* %{python_sitelib}/*.egg-info %changelog * Tue Aug 3 2010 Stanislav Ochotnicky - 0.2.0-1 - Initial package version