- Initial version
- Include fix_unicode_issues.patch Upstream fix, should be in next release.68c5fb9428- Include fix_python2_urllib.patch Upstream fix, should be in next release.62e67e5523eb4017d889OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyWebDAV3?expand=0&rev=1
This commit is contained in:
101
python-PyWebDAV3.spec
Normal file
101
python-PyWebDAV3.spec
Normal file
@@ -0,0 +1,101 @@
|
||||
#
|
||||
# spec file for package python-PyWebDAV3
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define oldpython python
|
||||
# Test files missing
|
||||
%bcond_with test
|
||||
Name: python-PyWebDAV3
|
||||
Version: 0.9.11
|
||||
Release: 0
|
||||
Summary: WebDAV library including a standalone server
|
||||
License: LGPL-2.0
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/andrewleech/PyWebDAV3
|
||||
Source: https://files.pythonhosted.org/packages/source/P/PyWebDAV3/PyWebDAV3-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM fix_python2_urllib.patch https://github.com/andrewleech/PyWebDAV3/commit/62e67e5523b6f8a3d47e1406d045c9e2abb9e8ba and https://github.com/andrewleech/PyWebDAV3/commit/eb4017d8894242ab4453cc1c2d432ebd299c13a0
|
||||
Patch1: fix_python2_urllib.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module six}
|
||||
%endif
|
||||
Requires: python-six
|
||||
BuildArch: noarch
|
||||
%ifpython2
|
||||
Obsoletes: %{oldpython}-PyWebDAV < %{version}
|
||||
Provides: %{oldpython}-PyWebDAV = %{version}
|
||||
%endif
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
WebDAV library for python.
|
||||
|
||||
Consists of a server that is ready to run
|
||||
Serve and the DAV package that provides WebDAV server functionality.
|
||||
|
||||
Currently supports
|
||||
|
||||
* WebDAV level 1
|
||||
* Level 2 (LOCK, UNLOCK)
|
||||
* Experimental iterator support
|
||||
|
||||
%prep
|
||||
%setup -q -n PyWebDAV3-%{version}
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
|
||||
%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/pywebdav/server/server.py
|
||||
sed -i "s|^#!/usr/bin/env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/pywebdav/server/server.py
|
||||
%fdupes %{buildroot}%{$python_sitelib}
|
||||
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/pywebdav/server/
|
||||
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/pywebdav/server/
|
||||
%fdupes %{buildroot}%{$python_sitelib}/pywebdav/server/
|
||||
}
|
||||
|
||||
%python_clone -a %{buildroot}%{_bindir}/davserver
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
%python_expand py.test-%{$python_bin_suffix}
|
||||
%endif
|
||||
|
||||
%post
|
||||
%python_install_alternative davserver
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative davserver
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc README doc/Changes doc/LICENSE doc/TODO
|
||||
%python_alternative %{_bindir}/davserver
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user