2013-10-01 06:32:57 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-ncclient
|
|
|
|
#
|
2021-01-31 15:52:11 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2013-10-01 06:32:57 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-03-20 12:22:21 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-10-01 06:32:57 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-08-28 13:31:14 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2022-01-13 12:42:24 +00:00
|
|
|
%bcond_without python2
|
2013-10-01 06:32:57 +00:00
|
|
|
Name: python-ncclient
|
2021-06-07 20:43:53 +00:00
|
|
|
Version: 0.6.12
|
2013-10-01 06:32:57 +00:00
|
|
|
Release: 0
|
2017-08-28 13:31:14 +00:00
|
|
|
Summary: Python library for NETCONF clients
|
2013-10-01 06:32:57 +00:00
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2022-01-13 12:42:24 +00:00
|
|
|
URL: https://ncclient.readthedocs.io/en/latest/
|
2019-12-07 14:09:27 +00:00
|
|
|
Source: https://github.com/ncclient/ncclient/archive/v%{version}.tar.gz#/ncclient-%{version}.tar.gz
|
2021-01-31 15:52:11 +00:00
|
|
|
# PATCH-FIX-OPENSUSE allow_old_sphinx.patch mcepl@suse.com
|
|
|
|
# Allow build with old Sphinx (< 2.0) on Leap
|
|
|
|
Patch0: allow_old_sphinx.patch
|
2017-08-28 13:31:14 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-09-26 12:22:59 +00:00
|
|
|
Requires: python-lxml >= 3.3.0
|
|
|
|
Requires: python-paramiko >= 1.15.0
|
2022-01-13 12:42:24 +00:00
|
|
|
%if 0%{?python_version_nodots} <= 34
|
2019-03-20 12:22:21 +00:00
|
|
|
Requires: python-selectors2 >= 2.0.1
|
2019-05-15 10:35:29 +00:00
|
|
|
%endif
|
2018-09-26 12:22:59 +00:00
|
|
|
Requires: python-setuptools > 0.6
|
|
|
|
Requires: python-six
|
2013-10-01 06:32:57 +00:00
|
|
|
BuildArch: noarch
|
2017-08-28 13:31:14 +00:00
|
|
|
BuildRequires: %{python_module lxml >= 3.3.0}
|
2019-12-07 14:09:27 +00:00
|
|
|
BuildRequires: %{python_module mock}
|
2017-08-28 13:31:14 +00:00
|
|
|
BuildRequires: %{python_module paramiko >= 1.15.0}
|
2019-12-07 14:09:27 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2022-01-13 12:42:24 +00:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python2-selectors2 >= 2.0.1
|
|
|
|
%endif
|
|
|
|
%if 0%{?python3_version_nodots} <= 34
|
|
|
|
BuildRequires: python3-selectors2 >= 2.0.1
|
|
|
|
%endif
|
2017-08-28 13:31:14 +00:00
|
|
|
BuildRequires: %{python_module six}
|
|
|
|
%python_subpackages
|
2013-10-01 06:32:57 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
ncclient is a Python library that facilitates client-side scripting
|
|
|
|
and application development around the NETCONF protocol.
|
|
|
|
|
2017-08-28 13:31:14 +00:00
|
|
|
%package -n python-ncclient-doc
|
2016-02-08 08:47:57 +00:00
|
|
|
Summary: Python NETCONF protocol library - Documentation
|
|
|
|
Group: Documentation/HTML
|
2019-05-15 10:35:29 +00:00
|
|
|
BuildRequires: %{python_module Sphinx-latex}
|
2017-08-28 13:31:14 +00:00
|
|
|
BuildRequires: %{python_module Sphinx}
|
2019-05-15 10:35:29 +00:00
|
|
|
BuildRequires: texlive-dvipng
|
2017-08-28 13:31:14 +00:00
|
|
|
Provides: %{python_module python-ncclient-doc = %{version}}
|
2016-02-08 08:47:57 +00:00
|
|
|
|
2017-08-28 13:31:14 +00:00
|
|
|
%description -n python-ncclient-doc
|
2016-02-08 08:47:57 +00:00
|
|
|
This package contains documentation files for %{name}.
|
|
|
|
|
2013-10-01 06:32:57 +00:00
|
|
|
%prep
|
2016-02-08 08:47:57 +00:00
|
|
|
%setup -q -n ncclient-%{version}
|
2021-01-31 15:52:11 +00:00
|
|
|
%if 0%{?suse_version} < 1550
|
|
|
|
%patch0 -p1
|
|
|
|
%endif
|
|
|
|
|
2019-12-07 14:09:27 +00:00
|
|
|
find examples/ -name "*.py" -exec sed -i 's|#!/usr/bin/env python$|#!/usr/bin/python|g' {} \;
|
|
|
|
# drop shebang
|
|
|
|
find ncclient/operations/third_party/ -name "*.py" -exec sed -i '/^#!\//, 1d' {} \;
|
2013-10-01 06:32:57 +00:00
|
|
|
|
|
|
|
%build
|
2017-08-28 13:31:14 +00:00
|
|
|
%python_build
|
|
|
|
cd docs && make %{?_smp_mflags} html && rm build/html/.buildinfo
|
2013-10-01 06:32:57 +00:00
|
|
|
|
|
|
|
%install
|
2017-08-28 13:31:14 +00:00
|
|
|
%python_install
|
2020-02-19 11:41:29 +00:00
|
|
|
%python_expand rm -rf %{buildroot}%{$python_sitelib}/test
|
2017-08-28 13:31:14 +00:00
|
|
|
%fdupes %{buildroot}
|
2013-10-01 06:32:57 +00:00
|
|
|
|
2019-12-07 14:09:27 +00:00
|
|
|
%check
|
|
|
|
%pytest
|
|
|
|
|
2017-08-28 13:31:14 +00:00
|
|
|
%files %{python_files}
|
2018-09-26 12:22:59 +00:00
|
|
|
%license LICENSE
|
2017-08-28 13:31:14 +00:00
|
|
|
%{python_sitelib}/*
|
2016-02-08 08:47:57 +00:00
|
|
|
|
2017-08-28 13:31:14 +00:00
|
|
|
%files -n python-ncclient-doc
|
2020-08-10 13:05:21 +00:00
|
|
|
%doc README.md README.rst examples docs/build/html
|
2013-10-01 06:32:57 +00:00
|
|
|
|
|
|
|
%changelog
|