forked from pool/python-ttp
Accepting request 1030366 from home:dgarcia:branches:devel:languages:python
- Initial packaging (v0.9.1) needed by python-napalm OBS-URL: https://build.opensuse.org/request/show/1030366 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ttp?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
13
fix-tests.patch
Normal file
13
fix-tests.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
Index: ttp-0.9.1/test/pytest/test_output_formatters.py
|
||||
===================================================================
|
||||
--- ttp-0.9.1.orig/test/pytest/test_output_formatters.py
|
||||
+++ ttp-0.9.1/test/pytest/test_output_formatters.py
|
||||
@@ -610,7 +610,7 @@ table:
|
||||
parser.parse()
|
||||
|
||||
|
||||
-test_excel_formatter_no_results_at_path_strict_true()
|
||||
+# test_excel_formatter_no_results_at_path_strict_true()
|
||||
|
||||
|
||||
def test_tabulate_formatter():
|
9
python-ttp.changes
Normal file
9
python-ttp.changes
Normal file
@@ -0,0 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 21 11:07:03 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Remove %files for test multibuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 21 10:52:14 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Initial packaging (v0.9.1) needed by python-napalm
|
101
python-ttp.spec
Normal file
101
python-ttp.spec
Normal file
@@ -0,0 +1,101 @@
|
||||
#
|
||||
# spec file for package python-ttp
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# 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 https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -%{flavor}
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-ttp%{psuffix}
|
||||
Version: 0.9.1
|
||||
Release: 0
|
||||
Summary: Template Text Parser
|
||||
License: MIT
|
||||
URL: https://github.com/dmulyalin/ttp
|
||||
Source: https://github.com/dmulyalin/ttp/archive/refs/tags/%{version}.tar.gz#/ttp-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM fix-tests.patch gh#dmulyalin/ttp#90
|
||||
Patch0: fix-tests.patch
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: %{python_module poetry-core >= 1.0.0}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module wheel}
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module poetry}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module openpyxl}
|
||||
BuildRequires: %{python_module ttp = %{version}}
|
||||
BuildRequires: %{python_module PyYAML}
|
||||
BuildRequires: %{python_module tabulate}
|
||||
BuildRequires: %{python_module jinja2}
|
||||
BuildRequires: %{python_module Cerberus}
|
||||
BuildRequires: %{python_module deepdiff}
|
||||
%endif
|
||||
BuildRequires: fdupes
|
||||
Requires: python-ttp-templates
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
TTP is a Python library for semi-structured text parsing using templates.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n ttp-%{version}
|
||||
rm ttp/utils/load_python_exec_py2.py
|
||||
|
||||
%build
|
||||
%if !%{with test}
|
||||
%pyproject_wheel
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%pyproject_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/ttp
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
pushd test/pytest
|
||||
# No python-yangson
|
||||
donttest="yangson"
|
||||
%pytest . -k "not ($donttest)"
|
||||
popd
|
||||
%endif
|
||||
|
||||
%post
|
||||
%python_install_alternative ttp
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative ttp
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%python_alternative %{_bindir}/ttp
|
||||
%{python_sitelib}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
3
ttp-0.9.1.tar.gz
Normal file
3
ttp-0.9.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b87710bed24454a2a9df3531fc8c0d1d06fa79d484154fff2b5e0796ba6b1491
|
||||
size 333985
|
Reference in New Issue
Block a user