-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.py
65 lines (50 loc) · 2 KB
/
build.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from pybuilder.core import use_plugin, init, Author, task
use_plugin("python.core")
use_plugin("python.unittest")
use_plugin("python.integrationtest")
use_plugin("python.install_dependencies")
use_plugin("python.flake8")
use_plugin("python.coverage")
use_plugin("python.distutils")
use_plugin('copy_resources')
use_plugin('filter_resources')
name = "yumrepos"
summary = "yumrepos: simple yum repositories with minimal rest api"
url = "https://github.com/arnehilmann/yumrepos"
version = "0.10.0"
authors = [Author('Arne Hilmann', '[email protected]')]
description = """yumrepos
- serve yum repositories as simple folders
- ... via web server
- offer rest api for
- create/remove/link of repositories
- upload/stage/remove of rpms
"""
default_task = ["clean", "analyze", "publish"]
@task
def gittag(project, logger):
logger.info("The following commands create a new release, triggering all the fun stuff:")
logger.info("git tag -a v{0} -m v{0}".format(project.version))
logger.info("git push --tags")
@init
def set_properties(project):
project.build_depends_on('requests')
project.depends_on("flask")
project.depends_on("werkzeug")
# try:
# import functools.lru_cache
# except ImportError:
# pass
# # project.depends_on("backports.functools_lru_cache")
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'])
project.set_property('flake8_verbose_output', True)
project.set_property('flake8_include_test_sources', True)
project.set_property('flake8_ignore', 'E501,E402,E731')
project.set_property('flake8_break_build', True)
FROSTED_BARE_EXCEPT_WARNING = 'W101'
project.set_property('frosted_ignore', [FROSTED_BARE_EXCEPT_WARNING])
project.set_property('verbose', True)
project.set_property('coverage_threshold_warn', 50)
project.set_property('coverage_break_build', False)