From 228a7af4a5f9814dad4ac638df9a1842ab091535 Mon Sep 17 00:00:00 2001 From: tcely Date: Tue, 27 Mar 2018 12:46:54 -0400 Subject: community/xkcdpass: use patch not sed --- community/xkcdpass/python-to-python3.patch | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 community/xkcdpass/python-to-python3.patch (limited to 'community/xkcdpass/python-to-python3.patch') diff --git a/community/xkcdpass/python-to-python3.patch b/community/xkcdpass/python-to-python3.patch new file mode 100644 index 0000000000..6f7ca186e7 --- /dev/null +++ b/community/xkcdpass/python-to-python3.patch @@ -0,0 +1,42 @@ +diff --git a/examples/example_postprocess.py b/examples/example_postprocess.py +index 069fb6e..057ea30 100755 +--- a/examples/example_postprocess.py ++++ b/examples/example_postprocess.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + import fileinput + import random + import sys +diff --git a/tests/test_xkcdpass.py b/tests/test_xkcdpass.py +index 88579fd..6821d1f 100755 +--- a/tests/test_xkcdpass.py ++++ b/tests/test_xkcdpass.py +@@ -50,7 +50,7 @@ class XkcdPasswordTests(unittest.TestCase): + def test_separator(self): + count = 3 + result = subprocess.check_output( +- ["python", "xkcdpass/xkcd_password.py", ++ ["python3", "xkcdpass/xkcd_password.py", + "--count", str(count), + "--delimiter", "|", + "--separator", " "]) +@@ -60,7 +60,7 @@ class XkcdPasswordTests(unittest.TestCase): + "Pipe output to other program. e.g. `xkcdpass -c 1 -s "" | xsel -b`" + count = 1 + result = subprocess.check_output( +- ["python", "xkcdpass/xkcd_password.py", ++ ["python3", "xkcdpass/xkcd_password.py", + "--count", str(count), + "--separator", ""]) + self.assertEqual(result.find(b"\n"), -1) +diff --git a/xkcdpass/xkcd_password.py b/xkcdpass/xkcd_password.py +index 78b0b69..07cc7b6 100755 +--- a/xkcdpass/xkcd_password.py ++++ b/xkcdpass/xkcd_password.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # encoding: utf-8 + + from __future__ import print_function -- cgit v1.2.3