17
0
Files
python-ciscoconfparse/python-ciscoconfparse.spec
Matej Cepl 8de0bb51e9 Accepting request 611172 from devel:languages:python:singlespec-staging
- Uprgade to version 1.3.15
    * Many trivial bug fixes, see CHANGES
- Renamed skip-setuptools-hg-require.patch to
  ciscoconfparse-1.2.40-fix-tests.patch

- singlespec auto-conversion

OBS-URL: https://build.opensuse.org/request/show/611172
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ciscoconfparse?expand=0&rev=7
2018-05-22 08:55:18 +00:00

82 lines
2.7 KiB
RPMSpec

#
# spec file for package python-ciscoconfparse
#
# Copyright (c) 2018 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-ciscoconfparse
Version: 1.3.15
Release: 0
Summary: Parse, Audit, Query, Build, and Modify Cisco IOS-style configurations
License: GPL-3.0-or-later
Group: Development/Languages/Python
URL: https://github.com/mpenning/ciscoconfparse
Source: https://files.pythonhosted.org/packages/source/c/ciscoconfparse/ciscoconfparse-%{version}.tar.gz
# PATCH fix tests
Patch0: ciscoconfparse-1.2.40-fix-tests.patch
BuildRequires: %{python_module colorama}
BuildRequires: %{python_module dnspython}
BuildRequires: %{python_module setuptools}
BuildRequires: python2-ipaddress
BuildRequires: python2-mock
# For tests
BuildRequires: %{python_module pytest}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-colorama
Requires: python-dnspython
Requires: python-ipaddr
BuildArch: noarch
%python_subpackages
%description
ciscoconfparse is a Python library, which parses through Cisco IOS-style
(and other vendor) configurations. It can:
- Audit existing router / switch / firewall / wlc configurations
- Retrieve portions of the configuration
- Modify existing configurations
- Build new configurations
The library examines an IOS-style config and breaks it into a set of linked
parent / child relationships. You can perform complex queries about these
relationships.
%prep
%setup -q -n ciscoconfparse-%{version}
%autopatch -p1
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# Upstream has broken tests.
# https://github.com/mpenning/ciscoconfparse/issues/106
# %%python_expand PYTHONPATH=%%{buildroot}%%{$python_sitelib} py.test-%%{$python_version}
%files %{python_files}
%license LICENSE
%doc CHANGES README.rst
%{python_sitelib}/ciscoconfparse
%{python_sitelib}/version_info
%{python_sitelib}/ciscoconfparse-%{version}-py%{python_version}.egg-info
%changelog