From 4bdb42cf8e7f90b1c20ba47e8736e4232f0797d6 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Mon, 25 Aug 2014 22:14:06 +0200 Subject: [PATCH] setup.py: Automatically collect a list of source files to distribute. This will help with refactoring, where source files may be added and/or moved. --- setup.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 692ea832..823e4b06 100755 --- a/setup.py +++ b/setup.py @@ -9,6 +9,8 @@ from subprocess import Popen, PIPE PONYSAY_VERSION = '3.0.3' +project_dir = os.path.dirname(__file__) + manpages = [('en', 'English'), # must be first ('es', 'Spanish'), ('sv', 'Swedish'), @@ -37,10 +39,7 @@ miscfiles = [('COPYING', '/usr/share/licenses/ponysay/COPYING'), ('LICENSE', '/usr/share/licenses/ponysay/LICENSE'), ('CREDITS', '/usr/share/licenses/ponysay/CREDITS')] -ponysaysrc = [src + '.py' for src in - ('__main__', 'common', 'ponysay', 'argparser', 'balloon', - 'backend', 'colourstack', 'ucs', 'spellocorrecter', 'kms', - 'list', 'metadata', 'ponysaytool')] +ponysaysrc = [i for i in os.listdir(os.path.join(project_dir, 'src')) if i.endswith('.py') and not i.startswith('.')] COPY = 'copy' HARD = 'hard'