%if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_version: %global python2_version %{python_version}} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %endif %global srcname ncclient Name: python2-ncclient Version: 0.4.2 Release: 3%{?dist} Summary: Python library for NETCONF clients License: ASL 2.0 URL: https://pypi.python.org/pypi/%{srcname} Source0: https://github.com/leopoul/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-lxml BuildRequires: python2-nose BuildRequires: python2-paramiko BuildRequires: python2-setuptools Requires: python2-lxml Requires: python2-paramiko %description This project is a Python library that facilitates client-side scripting and application development around the NETCONF protocol. %prep %setup -q -n %{srcname}-%{version} # Remove bundled egg-info rm -rf %{srcname}.egg-info %build %{__python2} setup.py build rm -f docs/build/html/.buildinfo %check %install %{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT %files %doc LICENSE %doc README %{python2_sitelib}/%{srcname} %{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info %changelog * Tue Apr 21 2020 Caio Pereira - 0.4.2-3 - Adapted to RHEL/CentOS 8 - Removed Requires libxslt-python, libxml2-python - Changed to python2- libraries - Removed docs * Fri Dec 5 2014 Ihar Hrachyshka - 0.4.2-2 - Added missing python-setuptools as a build dependency. - Include documentation and examples. - Run unit tests on build. - Rebuild egg file. - Added python2 macros needed for el6. - Made python macros more specific (python -> python2). - Made %{python2_sitelib} file inclusion wildcard a bit more strict. * Thu Dec 4 2014 Ihar Hrachyshka - 0.4.2-1 - Updated to upstream 0.4.2 version * Thu Aug 7 2014 Ihar Hrachyshka - 0.4.1-1 - Initial package for Fedora