[X2Go-Commits] [pyhoca-gui] 18/71: CVix: only call setup() function on direct calls

git-admin at x2go.org git-admin at x2go.org
Thu Mar 20 00:32:42 CET 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch cvix/2.x
in repository pyhoca-gui.

commit 4aff437c67cfa291d0f11b7169b010245f7a805b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Feb 6 00:14:23 2014 +0100

    CVix: only call setup() function on direct calls
---
 CVix_setup.py |   50 ++++++++++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/CVix_setup.py b/CVix_setup.py
index c7e9fb5..1e8f3c9 100755
--- a/CVix_setup.py
+++ b/CVix_setup.py
@@ -63,27 +63,29 @@ elif platform.system() == 'Linux':
 
 pyhoca_setup.data_files.extend([ ('icons', ["pixmaps\\CVix.ico"]), ] + CVix_data_files)
 
-setup(
-    name = PROGRAM_NAME,
-    version = PROGRAM_VERSION,
-    description = PROGRAM_DESC,
-    license = LICENSE,
-    author = AUTHOR,
-    url = URL,
-    namespace_packages = [ 'pyhoca', ],
-    packages = [ 'pyhoca.wxgui', ],
-    package_dir = {'': '.'},
-    install_requires = [ 'setuptools', ],
-    cmdclass = pyhoca_setup.cmd_class,
-    windows = [
-        {
-            "script": SCRIPT_NAME,
-            "icon_resources": [(0, os.path.normpath(PROGRAM_ICON))],
-            "dest_base": PROGRAM_NAME,
-        },
-    ],
-    data_files = pyhoca_setup.data_files,
-    zipfile = LIBRARY_ZIP,
-    executables = pyhoca_setup.executables,
-    options = pyhoca_setup.cmd_options,
-)
+
+if __name__ == "main":
+    setup(
+        name = PROGRAM_NAME,
+        version = PROGRAM_VERSION,
+        description = PROGRAM_DESC,
+        license = LICENSE,
+        author = AUTHOR,
+        url = URL,
+        namespace_packages = [ 'pyhoca', ],
+        packages = [ 'pyhoca.wxgui', ],
+        package_dir = {'': '.'},
+        install_requires = [ 'setuptools', ],
+        cmdclass = pyhoca_setup.cmd_class,
+        windows = [
+            {
+                "script": SCRIPT_NAME,
+                "icon_resources": [(0, os.path.normpath(PROGRAM_ICON))],
+                "dest_base": PROGRAM_NAME,
+            },
+        ],
+        data_files = pyhoca_setup.data_files,
+        zipfile = LIBRARY_ZIP,
+        executables = pyhoca_setup.executables,
+        options = pyhoca_setup.cmd_options,
+    )

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git



More information about the x2go-commits mailing list