Blob Blame History Raw
%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:           python-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:  python-lxml
BuildRequires:  python-nose
BuildRequires:  python-paramiko
BuildRequires:  python-setuptools
BuildRequires:  python-sphinx

Requires:       libxml2-python
Requires:       libxslt-python
Requires:       python-lxml
Requires:       python-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
make -C docs html
rm -f docs/build/html/.buildinfo


%check
nosetests
make -C docs doctest


%install
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT

 
%files
%doc LICENSE
%doc README
%doc docs/build/html
%doc examples
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-%{version}-py%{python2_version}.egg-info


%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Fri Dec  5 2014 Ihar Hrachyshka <ihrachys@redhat.com> - 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 <ihrachys@redhat.com> - 0.4.2-1
- Updated to upstream 0.4.2 version

* Thu Aug  7 2014 Ihar Hrachyshka <ihrachys@redhat.com> - 0.4.1-1
- Initial package for Fedora