forked from pool/python-yq
		
	- Update to 2.10.0:
* Add support for in-place editing (yq -yi) * Add argcomplete integration * Docs: Migrate from RTD to gh-pages * Add -Y/--yaml-roundtrip for preserving YAML styles and tags - Add patch to work with new PyYAML: * pyaml53.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-yq?expand=0&rev=11
This commit is contained in:
		
				
					committed by
					
						
						Git OBS Bridge
					
				
			
			
				
	
			
			
			
						parent
						
							055bcbf67e
						
					
				
				
					commit
					a4383b10e1
				
			
							
								
								
									
										35
									
								
								pyaml53.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								pyaml53.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					From 5754ef46981d688dd249f96fc55ceaf4cd51f130 Mon Sep 17 00:00:00 2001
 | 
				
			||||||
 | 
					From: "Daniel M. Capella" <polyzen@archlinux.org>
 | 
				
			||||||
 | 
					Date: Sat, 29 Feb 2020 16:10:50 -0500
 | 
				
			||||||
 | 
					Subject: [PATCH] Fix test_datetimes for PyYAML >=5.3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					https://github.com/yaml/pyyaml/pull/163
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					 test/test.py | 7 +++++--
 | 
				
			||||||
 | 
					 1 file changed, 5 insertions(+), 2 deletions(-)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/test/test.py b/test/test.py
 | 
				
			||||||
 | 
					index 12fa806..8897196 100755
 | 
				
			||||||
 | 
					--- a/test/test.py
 | 
				
			||||||
 | 
					+++ b/test/test.py
 | 
				
			||||||
 | 
					@@ -3,7 +3,7 @@
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 from __future__ import absolute_import, division, print_function, unicode_literals
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-import os, sys, unittest, tempfile, json, io, platform, subprocess
 | 
				
			||||||
 | 
					+import os, sys, unittest, tempfile, json, io, platform, subprocess, yaml
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
 | 
				
			||||||
 | 
					 from yq import yq, cli  # noqa
 | 
				
			||||||
 | 
					@@ -116,7 +116,10 @@ def test_multidocs(self):
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					     def test_datetimes(self):
 | 
				
			||||||
 | 
					         self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["."]), "")
 | 
				
			||||||
 | 
					-        self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["-y", "."]), "- '2016-12-20T22:07:36'\n")
 | 
				
			||||||
 | 
					+        if yaml.__version__ < '5.3':
 | 
				
			||||||
 | 
					+            self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["-y", "."]), "- '2016-12-20T22:07:36'\n")
 | 
				
			||||||
 | 
					+        else:
 | 
				
			||||||
 | 
					+            self.assertEqual(self.run_yq("- 2016-12-20T22:07:36Z\n", ["-y", "."]), "- '2016-12-20T22:07:36+00:00'\n")
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					         self.assertEqual(self.run_yq("2016-12-20", ["."]), "")
 | 
				
			||||||
 | 
					         self.assertEqual(self.run_yq("2016-12-20", ["-y", "."]), "'2016-12-20'\n")
 | 
				
			||||||
@@ -1,3 +1,14 @@
 | 
				
			|||||||
 | 
					-------------------------------------------------------------------
 | 
				
			||||||
 | 
					Thu Mar  5 08:32:23 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Update to 2.10.0:
 | 
				
			||||||
 | 
					  * Add support for in-place editing (yq -yi)
 | 
				
			||||||
 | 
					  * Add argcomplete integration
 | 
				
			||||||
 | 
					  * Docs: Migrate from RTD to gh-pages
 | 
				
			||||||
 | 
					  * Add -Y/--yaml-roundtrip for preserving YAML styles and tags
 | 
				
			||||||
 | 
					- Add patch to work with new PyYAML:
 | 
				
			||||||
 | 
					  * pyaml53.patch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-------------------------------------------------------------------
 | 
					-------------------------------------------------------------------
 | 
				
			||||||
Wed Oct 30 12:17:49 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
 | 
					Wed Oct 30 12:17:49 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#
 | 
					#
 | 
				
			||||||
# spec file for package python-yq
 | 
					# spec file for package python-yq
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 | 
					# Copyright (c) 2020 SUSE LLC
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# All modifications and additions to the file contributed by third parties
 | 
					# All modifications and additions to the file contributed by third parties
 | 
				
			||||||
# remain the property of their copyright owners, unless otherwise agreed
 | 
					# remain the property of their copyright owners, unless otherwise agreed
 | 
				
			||||||
@@ -18,17 +18,19 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 | 
					%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 | 
				
			||||||
Name:           python-yq
 | 
					Name:           python-yq
 | 
				
			||||||
Version:        2.8.1
 | 
					Version:        2.10.0
 | 
				
			||||||
Release:        0
 | 
					Release:        0
 | 
				
			||||||
Summary:        Command-line YAML processor - jq wrapper for YAML documents
 | 
					Summary:        Command-line YAML processor - jq wrapper for YAML documents
 | 
				
			||||||
License:        Apache-2.0
 | 
					License:        Apache-2.0
 | 
				
			||||||
URL:            https://github.com/kislyuk/yq
 | 
					URL:            https://github.com/kislyuk/yq
 | 
				
			||||||
Source:         https://files.pythonhosted.org/packages/source/y/yq/yq-%{version}.tar.gz
 | 
					Source:         https://files.pythonhosted.org/packages/source/y/yq/yq-%{version}.tar.gz
 | 
				
			||||||
 | 
					Patch0:         pyaml53.patch
 | 
				
			||||||
BuildRequires:  %{python_module setuptools}
 | 
					BuildRequires:  %{python_module setuptools}
 | 
				
			||||||
BuildRequires:  fdupes
 | 
					BuildRequires:  fdupes
 | 
				
			||||||
BuildRequires:  python-rpm-macros
 | 
					BuildRequires:  python-rpm-macros
 | 
				
			||||||
Requires:       jq
 | 
					Requires:       jq
 | 
				
			||||||
Requires:       python-PyYAML >= 3.11
 | 
					Requires:       python-PyYAML >= 3.11
 | 
				
			||||||
 | 
					Requires:       python-argcomplete >= 1.8.1
 | 
				
			||||||
Requires:       python-setuptools
 | 
					Requires:       python-setuptools
 | 
				
			||||||
Requires:       python-toml >= 0.9.4
 | 
					Requires:       python-toml >= 0.9.4
 | 
				
			||||||
Requires:       python-xmltodict >= 0.11.0
 | 
					Requires:       python-xmltodict >= 0.11.0
 | 
				
			||||||
@@ -37,6 +39,7 @@ Requires(postun): update-alternatives
 | 
				
			|||||||
BuildArch:      noarch
 | 
					BuildArch:      noarch
 | 
				
			||||||
# SECTION test requirements
 | 
					# SECTION test requirements
 | 
				
			||||||
BuildRequires:  %{python_module PyYAML >= 3.11}
 | 
					BuildRequires:  %{python_module PyYAML >= 3.11}
 | 
				
			||||||
 | 
					BuildRequires:  %{python_module argcomplete >= 1.8.1}
 | 
				
			||||||
BuildRequires:  %{python_module toml >= 0.9.4}
 | 
					BuildRequires:  %{python_module toml >= 0.9.4}
 | 
				
			||||||
BuildRequires:  %{python_module xmltodict >= 0.11.0}
 | 
					BuildRequires:  %{python_module xmltodict >= 0.11.0}
 | 
				
			||||||
BuildRequires:  jq
 | 
					BuildRequires:  jq
 | 
				
			||||||
@@ -48,6 +51,7 @@ yq: Command-line YAML processor - jq wrapper for YAML documents
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
%prep
 | 
					%prep
 | 
				
			||||||
%setup -q -n yq-%{version}
 | 
					%setup -q -n yq-%{version}
 | 
				
			||||||
 | 
					%patch0 -p1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%build
 | 
					%build
 | 
				
			||||||
%python_build
 | 
					%python_build
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								yq-2.10.0.tar.gz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								yq-2.10.0.tar.gz
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					version https://git-lfs.github.com/spec/v1
 | 
				
			||||||
 | 
					oid sha256:abaf2c0728f1c38dee852e976b0a6def5ab660d67430ee5af76b7a37072eba46
 | 
				
			||||||
 | 
					size 19970
 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
version https://git-lfs.github.com/spec/v1
 | 
					 | 
				
			||||||
oid sha256:24d36c7e9e670209562a161b8506ff7e86959be49ba7aee4ca659810801e5710
 | 
					 | 
				
			||||||
size 14737
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user