How to use the pybuilder.core.init function in pybuilder

To help you get started, we’ve selected a few pybuilder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Scout24 / afp-cli / build.py View on Github external
@init(environments='teamcity')
def set_properties_for_teamcity_builds(project):
    import os
    project.set_property('teamcity_output', True)
    project.version = '%s.%s' % (project.version,
                                 os.environ.get('BUILD_NUMBER', 0))
    project.default_task = ['clean', 'install_build_dependencies', 'publish']
    project.set_property('install_dependencies_index_url',
                         os.environ.get('PYPIPROXY_URL'))
    project.rpm_release = os.environ.get('RPM_RELEASE', 0)
    project.set_property('copy_resources_target', '$dir_dist')
    project.get_property('copy_resources_glob').extend(['setup.cfg'])
    project.get_property('filter_resources_glob').extend(['**/setup.cfg'])
github Scout24 / aws-monocyte / build.py View on Github external
@init(environments='teamcity')
def set_properties_for_teamcity_builds(project):
    import os
    project.version = '%s.%s-%s' % (
        project.version, VCSRevision().get_git_revision_count(), os.environ.get('BUILD_NUMBER', 0))
    project.default_task = ['install_build_dependencies', 'publish']
    project.set_property(
        'install_dependencies_index_url', os.environ.get('PYPIPROXY_URL'))
    project.set_property('install_dependencies_use_mirrors', False)
    project.set_property('teamcity_output', True)
github Scout24 / succubus / build.py View on Github external
@init(environments='teamcity')
def set_properties_for_teamcity_builds(project):
    import os
    project.set_property('teamcity_output', True)
    project.version = '%s-%s' % (project.version, os.environ.get('BUILD_NUMBER', 0))
    project.default_task = ['clean', 'install_build_dependencies', 'publish']
    project.set_property('install_dependencies_index_url', os.environ.get('PYPIPROXY_URL'))
    project.set_property('copy_resources_target', '$dir_dist')
    project.get_property('copy_resources_glob').extend(['setup.cfg'])
    project.get_property('distutils_commands').append('bdist_rpm')
github Scout24 / afp-cli / build.py View on Github external
@init
def set_properties(project):
    project.build_depends_on("unittest2")
    project.build_depends_on("mock")
    project.build_depends_on("six")
    project.build_depends_on("bottle")
    project.build_depends_on("bottledaemon")
    if sys.version_info[0:2] < (2, 7):
        project.depends_on("ordereddict")
    project.depends_on("yamlreader>=3.0.1")
    project.depends_on("requests")
    project.depends_on("docopt")
    project.depends_on("keyring")
    # secretstorage version 2.2.0 added a dependency on 'dbus-python', which
    # turns out to be problematic. 2.2.1 will fix this, see
    # https://github.com/mitya57/secretstorage/issues/4
    project.depends_on("secretstorage!=2.2.0")
github Scout24 / yamlreader / build.py View on Github external
@init
def set_properties(project):
    project.depends_on("PyYAML")
    project.depends_on("six")

    project.set_property('distutils_console_scripts', ['yamlreader=yamlreader.yamlreader:__main'])

    project.set_property("distutils_classifiers", [
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: 3.6",
github Scout24 / succubus / build.py View on Github external
@init
def set_properties(project):
    project.set_property('integrationtest_inherit_environment', True)
    project.set_property('install_dependencies_upgrade', True)
    project.build_depends_on("unittest2")
    project.build_depends_on("mock")
    project.depends_on("psutil")

    # TODO: Write more tests
    project.set_property('coverage_break_build', False)
    project.set_property('integrationtest_parallel', True)
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / copy_resources_plugin.py View on Github external
@init
def init_copy_resources_plugin(project):
    project.set_property_if_unset("copy_resources_target", "$dir_target")
    project.set_property_if_unset("copy_resources_glob", [])
github fsharp / sublime-fsharp-package / build.py View on Github external
@init
def initialize(project):
    project.version = '0.0.1'

    # project.set_property('pybuilder_header_plugin_break_build', True)
    # project.set_property('pybuilder_header_plugin_expected_header', open('header.py').read())
    project.set_property('dir_source_main_python', 'src')
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / pylint_plugin.py View on Github external
@init
def init_pylint(project):
    project.plugin_depends_on("pylint")
    project.set_property_if_unset("pylint_options", DEFAULT_PYLINT_OPTIONS)
github CenturyLinkCloud / clc-ansible-module / build.py View on Github external
@init
def initialize( project ):
	#  define unit test preferences and behavours:
	# project.set_property("run_unit_tests_command", "export PYTHONPATH=%s:$PYTHONPATH nosetests -w src/unittest/python" % project.expand_path("$dir_source_main_python"))
	project.set_property("run_unit_tests_command", "export PYTHONPATH=$PYTHONPATH:%s;PYTHONPATH=src/main/python nosetests -w %s --exe -v --with-xunit --xunit-file=target/reports/nosetests_results.xml" % (project.expand_path("$dir_source_main_python"), project.expand_path("$dir_source_unittest_python")))
	project.set_property("run_unit_tests_propagate_stdout", True)
	project.set_property("run_unit_tests_propagate_stderr", True)
	project.set_property('unittest_module_glob','test_*')
	project.set_property('coverage_threshold_warn',0)
	project.set_property('coverage_break_build', False)
	# ----------------
	# identify all the module source locations:
	project.get_property('filter_resources_glob').append('**/clc_ansible_module/*.py')
	# ----------------
	# install clc-sdk during installation
	project.depends_on("clc-sdk", "==2.45")
	# ----------------