This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch brokerclient in repository pyhoca-gui. commit cd9559685dc24b9ca34e62c45cad9bfb325fb94b Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Feb 6 00:14:01 2014 +0100 Make setup.py importable, only run setup() function on direct calls. --- debian/changelog | 1 + setup.py | 50 ++++++++++++++++++++++++++------------------------ 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/debian/changelog b/debian/changelog index 24e7b5f..82d14cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ pyhoca-gui (0.5.0.0-0x2go1) UNRELEASED; urgency=low * Make default cmdline option parameters overridable before the arg parser gets initialized. * Make SCRIPT_NAME in setup.py configurable (monkey-patchable). + * Make setup.py importable, only run setup() function on direct calls. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 08 Jan 2014 21:28:37 +0100 diff --git a/setup.py b/setup.py index 6bb1e1b..38431da 100755 --- a/setup.py +++ b/setup.py @@ -298,27 +298,29 @@ if platform.system() == 'Windows': else: cmd_options={} -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 = cmd_class, - windows = [ - { - "script": SCRIPT_NAME, - "icon_resources": [(0, os.path.normpath(PROGRAM_ICON))], - "dest_base": PROGRAM_NAME, - }, - ], - data_files = data_files, - zipfile = LIBRARY_ZIP, - executables = executables, - options = 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 = cmd_class, + windows = [ + { + "script": SCRIPT_NAME, + "icon_resources": [(0, os.path.normpath(PROGRAM_ICON))], + "dest_base": PROGRAM_NAME, + }, + ], + data_files = data_files, + zipfile = LIBRARY_ZIP, + executables = executables, + options = cmd_options, + ) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/pyhoca-gui.git