From 44fb0f85821eb34a811abb27d2c601a5d30af1f1 Mon Sep 17 00:00:00 2001 From: "Tim D. Smith" Date: Sun, 13 Sep 2015 11:19:01 -0700 Subject: [PATCH] fix shell completion install paths If the string "ponysay" was in the install prefix, it was replaced by the name of the command, and the prefix should not change. Fixes #223. --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6703552b..efc9a8d5 100755 --- a/setup.py +++ b/setup.py @@ -606,7 +606,9 @@ class Setup(): for command in commands: if conf[command] is not None: src = 'completion/%s-completion.%s.install' % (shell, command) - dest = conf[shell].replace('ponysay', command) + dest = os.path.join( + os.path.dirname(conf[shell]), + os.path.basename(conf[shell]).replace('ponysay', command)) self.cp(False, src, [dest]) if conf['pdf'] is not None: src = 'ponysay.pdf' + ('' if conf['pdf-compression'] is None else '.' + conf['pdf-compression'])