This repository has been archived by the owner on Sep 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.py
90 lines (79 loc) · 3.6 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import sys
from pybuilder.core import use_plugin, init, Author
from pybuilder.vcs import VCSRevision
use_plugin("python.core")
use_plugin("python.unittest")
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")
use_plugin('python.cram')
name = 'afp-cli'
summary = 'Command line client for AWS federation proxy api'
authors = [Author('Stefan Neben', "[email protected]"),
Author('Tobias Vollmer', "[email protected]"),
Author(
'Stefan Nordhausen', "[email protected]"),
Author('Enrico Heine', "[email protected]"),
Author('Valentin Haenel', "[email protected]"),
]
url = 'https://github.com/ImmobilienScout24/afp-cli'
version = VCSRevision().get_git_revision_count()
description = open("README.rst").read()
license = 'Apache License 2.0'
default_task = ["clean", "analyze", "publish"]
@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")
project.set_property('flake8_include_test_sources', True)
project.set_property('flake8_break_build', True)
project.set_property('copy_resources_target', '$dir_dist')
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",
])
project.set_property('distutils_console_scripts', ['afp=afp_cli.cli:main'])
project.set_property(
'distutils_console_scripts', ['afpv2=afp_cli.cliv2:main'])
project.set_property('install_dependencies_upgrade', True)
# These are tested by the cram tests.
project.set_property('coverage_exceptions', ['afp_cli.cliv2',
'afp_cli.cli'])
project.get_property('filter_resources_glob').extend(
['**/afp_cli/__init__.py'])
@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'])