lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

yq: fix build

+7 -7
+7 -7
pkgs/development/python-modules/yq/jq-path.patch
··· 1 1 diff --git a/test/test.py b/test/test.py 2 - index a81f41b..9e80f04 100755 2 + index f25dced..cd308c8 100755 3 3 --- a/test/test.py 4 4 +++ b/test/test.py 5 - @@ -112,7 +112,7 @@ class TestYq(unittest.TestCase): 5 + @@ -105,7 +105,7 @@ class TestYq(unittest.TestCase): 6 6 tf2.seek(0) 7 7 self.assertEqual(self.run_yq("", ["-y", arg, tf.name, self.fd_path(tf2)]), '1\n...\n') 8 - 8 + 9 9 - @unittest.skipIf(subprocess.check_output(["jq", "--version"]) < b"jq-1.6", "Test options introduced in jq 1.6") 10 10 + @unittest.skipIf(subprocess.check_output(["@jq@", "--version"]) < b"jq-1.6", "Test options introduced in jq 1.6") 11 11 def test_jq16_arg_passthrough(self): 12 12 self.assertEqual(self.run_yq("{}", ["--indentless", "-y", ".a=$ARGS.positional", "--args", "a", "b"]), 13 13 "a:\n- a\n- b\n") 14 14 diff --git a/yq/__init__.py b/yq/__init__.py 15 - index afeb42c..a0d7970 100755 15 + index 91212d0..ee5a799 100755 16 16 --- a/yq/__init__.py 17 17 +++ b/yq/__init__.py 18 18 @@ -146,7 +146,7 @@ def yq(input_streams=None, output_stream=None, input_format="yaml", output_forma 19 - 20 19 try: 21 - # Note: universal_newlines is just a way to induce subprocess to make stdin a text buffer and encode it for us 20 + # Notes: universal_newlines is just a way to induce subprocess to make stdin a text buffer and encode it for us; 21 + # close_fds must be false for command substitution to work (yq . t.yml --slurpfile t <(yq . t.yml)) 22 22 - jq = subprocess.Popen(["jq"] + list(jq_args), 23 23 + jq = subprocess.Popen(["@jq@"] + list(jq_args), 24 24 stdin=subprocess.PIPE, 25 25 stdout=subprocess.PIPE if converting_output else None, 26 - universal_newlines=True) 26 + close_fds=False,