<commit_before>from esky import bdist_esky
from setuptools import setup

import os
import sys
import glob
import subprocess
import platform

LONG_DESC = '''
World / Saved Game Editor for the indie game Minecraft

Import and export creations from saved games. Brush tools allow modifying
terrain on a larger scale. Create, remove, and regenerate chunks in modern
'infinite' Minecraft levels.

Works with saved games from Minecraft Classic, Indev, Infdev, Alpha, Beta,
Release, and Pocket Edition.
'''


def get_git_version():
    """
    Get the version from git.
    """
    try:
        p = subprocess.Popen(
            ['git', 'describe', '--abbrev=4', '--tags', '--match=*.*.*'],
            stdout=subprocess.PIPE,
            stdin=subprocess.PIPE,
            # Shell=True is required due to a Popen Win32 bug.
            shell=True if platform.system() == 'Windows' else False
        )
    except:
        return 'unknown'

    version = p.stdout.readlines()[0].strip()
    fout = open('RELEASE-VERSION', 'wb')
    fout.write(version)
    fout.write('\n')
    fout.close()

    return version

# setup() options that are common on all platforms.
SETUP_COMMON = {
    # General fields,
    'name': 'MCEdit',
    'version': get_git_version(),
    'description': 'Minecraft World Editor',
    'long_description': LONG_DESC,

    'author': '<NAME>',
    'author_email': '<EMAIL>',

    'url': 'http://www.github.com/mcedit/mcedit',

    # PyPi,
    'keywords': 'minecraft world editor',
    'classifiers': [
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
    ],

    # Building,
    'packages': [
        'pymclevel',
    ],
    'package_data': {
        'pymclevel': [
            '*.yaml',
            '*.txt',
            '_nbt.*'
        ],
        'filters': [
            'filters/**'
        ],
        'stock-schematics': [<commit_msg>Setup now makes dev builds by default unless the --stable option is given.<commit_after>from esky import bdist_esky
from setuptools import setup

import os
import sys
import glob
import subprocess
import platform

LONG_DESC = '''
World / Saved Game Editor for the indie game Minecraft

Import and export creations from saved games. Brush tools allow modifying
terrain on a larger scale. Create, remove, and regenerate chunks in modern
'infinite' Minecraft levels.

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],
            stdout=subprocess.PIPE,
            stdin=subprocess.PIPE,
            # Shell=True is required due to a Popen Win32 bug.
            shell=True if platform.system() == 'Windows' else False
        )
    except:
        return 'unknown'

    version = p.stdout.readlines()[0].strip()
    fout = open('RELEASE-VERSION', 'wb')
    fout.write(version)
    fout.write('\n')
    fout.close()

    return version


# setup() options that are common on all platforms.
SETUP_COMMON = {
    # General fields,
    'name': 'MCEdit_dev' if DEVELOP else 'MCEdit',
    'version': get_git_version(),
    'description': 'Minecraft World Editor',
    'long_description': LONG_DESC,

    'author': '<NAME>',
    'author_email': '<EMAIL>',

    'url': 'http://www.github.com/mcedit/mcedit',

    # PyPi,
    'keywords': 'minecraft world editor',
    'classifiers': [
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
    ],

    # Building,
    'packages': [
        'pymclevel',
    ],
    'package_data': {
        'pymclevel': [
            '*.yaml',
            '*.txt',
            '_nbt.*'
        ],
        'filters': [
            'filters/**'
        ],
        'stock-schematics': [
{'fraction_non_alphanumeric': 0.1356140782672902, 'fraction_numerical': 0.002461235540241201, 'mean_word_length': 2.4122586062132663, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1281943', 'n_tokens_mistral': 1276, 'n_tokens_neox': 1234, 'n_words': 363}