File python-ncclient.spec of Package python-ncclient
#
# spec file for package python-ncclient
#
# Copyright (c) 2016 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/
#
Name: python-ncclient
Version: 0.4.7
Release: 0
Url: https://github.com/ncclient/ncclient
Summary: Python NETCONF protocol library
License: Apache-2.0
Group: Development/Languages/Python
Source: ncclient-%{version}.tar.gz
# PATCH-FIX-UPSTREAM pr-109.patch -- https://github.com/ncclient/ncclient/pull/109
Patch0: pr-109.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-base
BuildRequires: python-setuptools
Requires: python-lxml >= 3.1
Requires: python-paramiko >= 1.7.7.1
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
ncclient is a Python library that facilitates client-side scripting
and application development around the NETCONF protocol.
%package doc
Summary: Python NETCONF protocol library - Documentation
Group: Documentation/HTML
BuildRequires: python-Sphinx
Requires: %{name} = %{version}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q -n ncclient-%{version}
%patch0 -p1
%build
python setup.py build
cd docs && make html && rm build/html/.buildinfo
%install
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
%files
%defattr(-,root,root)
%doc LICENSE
%{python_sitelib}/*
%files doc
%defattr(-,root,root,-)
%doc LICENSE README examples docs/build/html
%changelog