File: python-argcomplete-check-easy-install-script_help_fix.patch

package info (click to toggle)
python-argcomplete 3.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 704 kB
  • sloc: python: 2,814; makefile: 50; sh: 7
file content (26 lines) | stat: -rw-r--r-- 1,114 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: =?utf-8?b?Ik1hcmMgRGVxdcOobmVzIChEdWNrKSI=?= <Duck@DuckCorp.org>
Date: Sat, 4 Nov 2023 10:34:21 +0200
Subject: Add -h/--help support to python-argcomplete-check-easy-install-script
Forwarded: no
--- a/argcomplete/scripts/python_argcomplete_check_easy_install_script.py
+++ b/argcomplete/scripts/python_argcomplete_check_easy_install_script.py
@@ -20,7 +20,7 @@
 
 
 def main():
-    if len(sys.argv) != 2:
+    if len(sys.argv) != 2 or sys.argv[1] in ["-h", "--help"]:
         sys.exit(__doc__)
 
     sys.tracebacklimit = 0
--- a/test/test.py
+++ b/test/test.py
@@ -1385,7 +1385,7 @@
             self.sh.run_command("cd " + os.getcwd())
             self.sh.run_command("export PATH=$PATH:./bin")
             self.sh.run_command("export PYTHONPATH=.:$PYTHONPATH")
-            self.sh.run_command('echo -e "[install]\nprefix=" > ~/.pydistutils.cfg')
+            self.sh.run_command('echo -e "[install]\\nprefix=" > ~/.pydistutils.cfg')
             test_package = os.path.join(TEST_DIR, "test_package")
             command = "pip3 install {} --target .".format(test_package)
             if not wheel: