From 17320f4aff38a0d6cc693f4145f4d66f05a19f11 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Thu, 25 Oct 2012 12:24:50 -1000 Subject: [PATCH] Setup now makes dev builds by default unless the --stable option is given. --- setup.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 11d14cf..46b7925 100644 --- a/setup.py +++ b/setup.py @@ -18,14 +18,23 @@ Works with saved games from Minecraft Classic, Indev, Infdev, Alpha, Beta, Release, and Pocket Edition. ''' +if "--stable" in sys.argv: + DEVELOP = False + sys.argv.remove('--stable') +else: + DEVELOP = True def get_git_version(): """ Get the version from git. """ + if DEVELOP: + match = '--match=*.*.*build*' + else: + match = '--match=*.*.*' try: p = subprocess.Popen( - ['git', 'describe', '--abbrev=4', '--tags', '--match=*.*.*'], + ['git', 'describe', '--abbrev=4', '--tags', match], stdout=subprocess.PIPE, stdin=subprocess.PIPE, # Shell=True is required due to a Popen Win32 bug. @@ -42,10 +51,11 @@ def get_git_version(): return version + # setup() options that are common on all platforms. SETUP_COMMON = { # General fields, - 'name': 'MCEdit', + 'name': 'MCEdit_dev' if DEVELOP else 'MCEdit', 'version': get_git_version(), 'description': 'Minecraft World Editor', 'long_description': LONG_DESC,