示例#1
0
    ICONDIR = '/usr/share/icons/hicolor'
    LOCALEDIR = '/usr/share/locale'
    PACKAGECACHE = '/var/cache/tribus'
else:
    CONFDIR = BASEDIR + '/tribus/config'
    BINDIR = BASEDIR
    SHAREDIR = BASEDIR
    DOCDIR = BASEDIR + '/tribus/data/docs'
    LOCALEDIR = BASEDIR + '/tribus/i18n'
    ICONDIR = BASEDIR + '/tribus/data/icons'
    PACKAGECACHE = BASEDIR + '/packagecache'

DEFAULT_CLI_OPTIONS = {
    'version': [['-v', '--version'], {
        'action': 'version',
        'version': '%s %s' % (NAME, get_version(VERSION)),
        'default': False
    }],
    'help': [['-h', '--help', '--ayuda'], {
        'action': 'store_true',
        'dest': 'print_help',
        'default': False
    }],
    'usage': [['-u', '--usage', '--uso'], {
        'action': 'store_true',
        'dest': 'print_usage',
        'default': False
    }],
}
# forbidden_filename_chars = {
#     '/':'', ':':'', 'http':'', 'file':'', 'ftp':'', '?':'', '=':'', '&':'',
示例#2
0
def get_setup_data(basedir):
    """
    Prepares a dictionary of values to configure python Distutils.

    :param basedir: the path where the files reside. Generally the top level
                    directory of the project.
    :return: a dic
    :rtype: ``dictionary``

    .. versionadded:: 0.1
    """
    from tribus.config.base import (NAME, VERSION, URL, AUTHOR, AUTHOR_EMAIL,
                                    DESCRIPTION, LICENSE, DOCDIR)
    from tribus.config.pkg import (classifiers, long_description,
                                   install_requires, dependency_links,
                                   exclude_packages, platforms, keywords)
    from tribus.common.version import get_version
    from tribus.common.setup.build import (build_man, build_css, build_js,
                                           build_sphinx, compile_catalog,
                                           build)
    from tribus.common.setup.clean import (clean_mo, clean_sphinx, clean_js,
                                           clean_css, clean_man, clean_img,
                                           clean_dist, clean_pyc, clean)
    from tribus.common.setup.install import install_data, build_py
    from tribus.common.setup.maint import (extract_messages, init_catalog,
                                           update_catalog)
    from tribus.common.setup.report import report_setup_data

    return {
        'name': NAME,
        'version': get_version(VERSION),
        'url': URL,
        'author': AUTHOR,
        'author_email': AUTHOR_EMAIL,
        'description': DESCRIPTION,
        'long_description': long_description,
        'license': LICENSE,
        'classifiers': classifiers,
        'keywords': keywords,
        'platforms': platforms,
        'packages': get_packages(path=basedir,
                                 exclude_packages=exclude_packages),
        'data_files': [('', [])],
        'package_data': {'': []},
        'install_requires': install_requires,
        'dependency_links': dependency_links,
        'test_suite': 'tribus.common.testsuite.runtests',
        'zip_safe': False,
        'cmdclass': {
            'clean': clean,
            'clean_dist': clean_dist,
            'clean_img': clean_img,
            'clean_js': clean_js,
            'clean_css': clean_css,
            'clean_mo': clean_mo,
            'clean_man': clean_man,
            'clean_sphinx': clean_sphinx,
            'clean_pyc': clean_pyc,
            'build': build,
            'build_js': build_js,
            'build_css': build_css,
            'build_man': build_man,
            'build_py': build_py,
            'build_sphinx': build_sphinx,
            'compile_catalog': compile_catalog,
            'init_catalog': init_catalog,
            'update_catalog': update_catalog,
            'extract_messages': extract_messages,
            'install_data': install_data,
            'report_setup_data': report_setup_data,
        },
        'message_extractors': {
            'tribus': [
                ('**.html',
                 'tribus.common.setup.message_extractors:django', ''),
                ('**.py', 'python', ''),
            ],
        },
        'command_options': {
            'egg_info': {
                'tag_build': ('setup.py', ''),
                'tag_svn_revision': ('setup.py', False),
            },
            'install': {
                'prefix': ('setup.py', '/usr'),
                'exec_prefix': ('setup.py', '/usr'),
                'install_layout': ('setup.py', 'deb'),
            },
            'update_catalog': {
                'domain': ('setup.py', 'django'),
                'input_file': ('setup.py', 'tribus/data/i18n/pot/django.pot'),
                'output_dir': ('setup.py', 'tribus/data/i18n'),
                'ignore_obsolete': ('setup.py', True),
                'previous': ('setup.py', False),
            },
            'compile_catalog': {
                'domain': ('setup.py', 'django'),
                'directory': ('setup.py', 'tribus/data/i18n'),
                'use_fuzzy': ('setup.py', True),
            },
            'init_catalog': {
                'domain': ('setup.py', 'django'),
                'input_file': ('setup.py', 'tribus/data/i18n/pot/django.pot'),
                'output_dir': ('setup.py', 'tribus/data/i18n'),
            },
            'extract_messages': {
                'copyright_holder': ('setup.py', 'Desarrolladores de Tribus'),
                'msgid_bugs_address':
                ('setup.py',
                    '*****@*****.**'),
                'output_file': ('setup.py', 'tribus/data/i18n/pot/django.pot'),
                'charset': ('setup.py', 'utf-8'),
                'sort_by_file': ('setup.py', True),
                'no_wrap': ('setup.py', True),
            },
            'build_sphinx': {
                'source_dir': ('setup.py', get_path([DOCDIR, 'rst'])),
                'build_dir': ('setup.py', DOCDIR),
                'fresh_env': ('setup.py', True),
                'all_files': ('setup.py', True),
            },
        },
        'entry_points': {
            'console_scripts': [
                'tbs = tribus.main:main',
            ]
        },
    }
示例#3
0
# The master toctree document.
master_doc = 'index'

# General information about the project.
project = NAME
copyright = u'%d, %s' % (datetime.now().year, AUTHOR)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.

# Get version info
#
# Branch-only name
version = get_version(VERSION)
# The full human readable version, including alpha/beta/rc tags.
release = get_version(VERSION)

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = 'en'
locale_dirs = ['i18n']

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'

# List of documents that shouldn't be included in the build.