From 5c1fc92715dff83efc7e7afeab5d6b606683d594 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Thu, 14 Nov 2013 08:22:17 +0000 Subject: [PATCH] Strip ALL non windows scripts from `sdist`. --- setup.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/setup.py b/setup.py index 233680f2b0a..398a913a43c 100755 --- a/setup.py +++ b/setup.py @@ -171,6 +171,22 @@ class CloudSdist(sdist): # Let's the rest of the build command sdist.run(self) + def write_manifest(self): + if IS_WINDOWS_PLATFORM is False: + # Remove un-necessary scripts grabbed by MANIFEST.in + for filename in self.filelist.files[:]: + if filename in ('scripts/salt', + 'scripts/salt-cloud', + 'scripts/salt-key', + 'scripts/salt-master', + 'scripts/salt-run', + 'scripts/salt-ssh', + 'scripts/salt-syndic'): + self.filelist.files.pop( + self.filelist.files.index(filename) + ) + return sdist.write_manifest(self) + class TestCommand(Command): description = 'Run tests'