# # 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