Only use build_with_dlls on windows.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 29 Feb 2012 10:35:57 +0000 (11:35 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 29 Feb 2012 10:35:57 +0000 (11:35 +0100)
setup.py

index 0c7aa9ff1ef23286787b71f4754444edfc115632..a5f5698559db861984d34d29f3d6dd770973126b 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -312,17 +312,18 @@ class install_lib_with_dlls(install_lib):
     def run(self):
         install_lib.run(self)
         # the apr binaries.
-        if os.name == 'nt':
-            # On Windows we package up the apr dlls with the plugin.
-            for s, d in self._get_dlls():
-                self.copy_file(s, d)
+        # On Windows we package up the apr dlls with the plugin.
+        for s, d in self._get_dlls():
+            self.copy_file(s, d)
 
     def get_outputs(self):
         ret = install_lib.get_outputs(self)
-        if os.name == 'nt':
-            ret.extend([info[1] for info in self._get_dlls()])
+        ret.extend([info[1] for info in self._get_dlls()])
         return ret
 
+cmdclass = {}
+if os.name == 'nt':
+    cmdclass['install_lib'] = install_lib_with_dlls
 
 def source_path(filename):
     return os.path.join("subvertpy", filename)
@@ -364,5 +365,5 @@ if __name__ == "__main__":
           packages=['subvertpy', 'subvertpy.tests'],
           ext_modules=subvertpy_modules(),
           scripts=['bin/subvertpy-fast-export'],
-          cmdclass = { 'install_lib': install_lib_with_dlls },
+          cmdclass=cmdclass,
           )