Setup now makes dev builds by default unless the --stable option is given.
This commit is contained in:
parent
23659a5cf0
commit
17320f4aff
14
setup.py
14
setup.py
@ -18,14 +18,23 @@ Works with saved games from Minecraft Classic, Indev, Infdev, Alpha, Beta,
|
|||||||
Release, and Pocket Edition.
|
Release, and Pocket Edition.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
if "--stable" in sys.argv:
|
||||||
|
DEVELOP = False
|
||||||
|
sys.argv.remove('--stable')
|
||||||
|
else:
|
||||||
|
DEVELOP = True
|
||||||
|
|
||||||
def get_git_version():
|
def get_git_version():
|
||||||
"""
|
"""
|
||||||
Get the version from git.
|
Get the version from git.
|
||||||
"""
|
"""
|
||||||
|
if DEVELOP:
|
||||||
|
match = '--match=*.*.*build*'
|
||||||
|
else:
|
||||||
|
match = '--match=*.*.*'
|
||||||
try:
|
try:
|
||||||
p = subprocess.Popen(
|
p = subprocess.Popen(
|
||||||
['git', 'describe', '--abbrev=4', '--tags', '--match=*.*.*'],
|
['git', 'describe', '--abbrev=4', '--tags', match],
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stdin=subprocess.PIPE,
|
stdin=subprocess.PIPE,
|
||||||
# Shell=True is required due to a Popen Win32 bug.
|
# Shell=True is required due to a Popen Win32 bug.
|
||||||
@ -42,10 +51,11 @@ def get_git_version():
|
|||||||
|
|
||||||
return version
|
return version
|
||||||
|
|
||||||
|
|
||||||
# setup() options that are common on all platforms.
|
# setup() options that are common on all platforms.
|
||||||
SETUP_COMMON = {
|
SETUP_COMMON = {
|
||||||
# General fields,
|
# General fields,
|
||||||
'name': 'MCEdit',
|
'name': 'MCEdit_dev' if DEVELOP else 'MCEdit',
|
||||||
'version': get_git_version(),
|
'version': get_git_version(),
|
||||||
'description': 'Minecraft World Editor',
|
'description': 'Minecraft World Editor',
|
||||||
'long_description': LONG_DESC,
|
'long_description': LONG_DESC,
|
||||||
|
Reference in New Issue
Block a user