File python-pyang.spec of Package python-pyang

#
# spec file for package python-pyang
#
# Copyright (c) 2016, Martin Hauke <mardnh@gmx.de>
#
# 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-pyang
Version:        1.7
Release:        0
License:        BSD-3-Clause
Summary:        A YANG (RFC 6020) validator and converter
Url:            https://github.com/mbj4668/pyang
Group:          Development/Languages/Python
Source:         https://pypi.io/packages/source/p/pyang/pyang-%{version}.tar.gz
Patch:          pyang-fix-setup.diff
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  fdupes
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
An extensible YANG (RFC 6020) validator. Provides a framework for plugins
that can convert YANG modules to other formats.

%prep
%setup -q -n pyang-%{version}
%patch -p1

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%fdupes -s %{buildroot}/%{_datadir}

%files
%defattr(-,root,root,-)
%doc README LICENSE
%{_bindir}/json2xml
%{_bindir}/pyang
%{_bindir}/yang2dsdl
%{_bindir}/yang2html
%{_datadir}/yang
%{_mandir}/man1/json2xml.1%{ext_man}
%{_mandir}/man1/pyang.1%{ext_man}
%{_mandir}/man1/yang2dsdl.1%{ext_man}
%{python_sitelib}/pyang
%{python_sitelib}/pyang-%{version}-py%{py_ver}.egg-info

%changelog
openSUSE Build Service is sponsored by