forked from twitter-archive/commons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pants.ini
199 lines (153 loc) · 5.37 KB
/
pants.ini
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
; All of the following are seeded with defaults in the config
; user: the current user
; homedir: the current user's home directory
; buildroot: the root of this repo
; pants_bootstrapdir: the global pants scratch space primarily used for caches
; pants_supportdir: pants support files for this repo go here; for example: ivysettings.xml
; pants_distdir: user visible artifacts for this repo go here
; pants_workdir: the scratch space used to for live builds in this repo
[DEFAULT]
pants_version: 0.0.59
plugins: [
'pantsbuild.pants.contrib.scrooge==%(pants_version)s',
'pantsbuild.pants.contrib.python.checks==%(pants_version)s',
]
# Enable our own custom loose-source plugins.
pythonpath: [
"%(buildroot)s/pants-plugins/src/python",
]
backend_packages: [
'twitter.common.pants.jvm.extras',
'twitter.common.pants.python.commons',
'pants.contrib.python.checks',
]
checkstyle_suppression_files = [
'%(pants_supportdir)s/commons/checkstyle/checkstyle_suppressions.xml'
]
; Mixed into all cache keys. Bump this to invalidate all existing artifacts.
; Note: If you want to experiment with this locally without affecting artifacts
; read by all, change it to some other string, e.g., <number>-<your username>.
cache_key_gen_version: '100'
jvm_options: ['-Xmx1g', '-XX:MaxPermSize=256m']
# For [idea] and [eclipse] sections
python_source_paths: ['src/python']
python_test_paths: ['tests/python']
python_lib_paths: ['3rdparty/python']
local_artifact_cache = %(pants_bootstrapdir)s/artifact_cache
[cache.bootstrap]
# The just-in-time tool shading performed by jvm tool bootstrapping is very expensive, so we turn
# on artifact caching for it that can survive clean-all.
read_from = ["%(local_artifact_cache)s"]
write_to = ["%(local_artifact_cache)s"]
[goals]
bootstrap_buildfiles: [
# This will pick up the whole top level BUILD file family, including BUILD.commons
'%(buildroot)s/BUILD',
]
[ivy]
ivy_profile: %(pants_supportdir)s/ivy/ivy.xml
ivy_settings: %(pants_supportdir)s/ivy/ivysettings.xml
cache_dir: %(homedir)s/.ivy2/twitter-commons
[gen.scrooge]
service_deps: {
'java': [
'3rdparty/jvm/commons-lang',
'3rdparty/jvm/com/twitter:finagle-thrift',
'3rdparty/jvm/org/slf4j:slf4j-api',
'3rdparty/jvm/com/twitter:util-core',
],
'scala': [
'3rdparty/jvm/com/twitter:scrooge-core',
'3rdparty/jvm/com/twitter:finagle-thrift',
'3rdparty/jvm/com/twitter:util-core',
]
}
structs_deps: {
'java': [
'3rdparty/jvm/commons-lang',
'3rdparty/jvm/org/apache/thrift',
],
'scala': [
'3rdparty/jvm/com/twitter:scrooge-core',
'3rdparty/jvm/org/apache/thrift',
]
}
strict: False
verbose: True
[thrift-binary]
version: 0.5.0-finagle
[gen.thrift]
gen_options: hashcode
deps: ['3rdparty/jvm/org/apache/thrift:thrift-0.5.0']
service_deps: ['3rdparty/jvm/org/apache/thrift:thrift-0.5.0-finagle']
[gen.protoc]
version: 2.4.1
javadeps: ['3rdparty/jvm/com/google/protobuf:protobuf-%(version)s']
[compile.checkstyle]
configuration: %(pants_supportdir)s/checkstyle/coding_style.xml
properties: {
'checkstyle.suppression.files': ','.join(%(checkstyle_suppression_files)s)
}
[compile.scalastyle]
config: %(buildroot)s/build-support/scalastyle/scalastyle_config.xml
; TODO(John Sirois): The excludes are currently global for all scala files but
; they should be trimmed back or eliminated when scalastyle is restricted to
; non code-gen targets: https://jira.twitter.biz/browse/AWESOME-6870
excludes: %(buildroot)s/build-support/scalastyle/excludes.txt
[compile.apt]
strategy: isolated
[compile.java]
use_jmake: False
[compile.zinc]
# We explicitly list no plugins here since the python and pants ini file handling defaults ini
# options from the DEFAULT section. In this case the DEFAULT ini section defines the `plugins`
# list for _pants_ and those plugins are not scalac plugins.
# TODO(John Sirois): eliminate this ini section once this fix ships:
# https://github.com/pantsbuild/pants/issues/1803
plugins: []
strategy: isolated
worker_count: 4
jvm_options: [
'-Xmx2g', '-XX:MaxPermSize=256m', '-XX:+UseConcMarkSweepGC', '-XX:ParallelGCThreads=4',
# bigger cache size for our big projects (default is just 5)
'-Dzinc.analysis.cache.limit=10',
]
args: [
'-S-encoding', '-SUTF-8',
'-S-g:vars',
]
warning_args: [
'-S-deprecation',
'-S-unchecked',
# request warnings for http://www.scala-lang.org/api/2.10.4/index.html#scala.language$
'-S-feature',
]
no_warning_args: [
'-S-nowarn',
]
[jvm-platform]
platforms: {
'java7': {
'target': 7
},
}
default_platform: java7
[jvm.repl.scala]
options: ['-Xmx1g', '-XX:MaxPermSize=256m', '-Dscala.usejavacp=true']
[jvm.test.junit]
options: [
'-Djava.awt.headless=true', '-Xmx1g', '-XX:MaxPermSize=256m',
# Needed for emma instrumenter to work against classfiles generated by java 7 compilers
'-XX:-UseSplitVerifier'
]
[idea]
scala_maximum_heap_size_mb: 1024
java_maximum_heap_size_mb: 1024
[python-setup]
# We only support commons python code running under 2.7 for now with 3.3+ support to be added later.
interpreter_requirement: CPython>=2.7,<3
[python-repos]
# The custom repo is only needed for antlr-python-runtime.
repos: ['https://raw.github.com/twitter/commons/binaries/pants/third_party/python/index.html']
[compile.pythonstyle]
suppress: %(pants_supportdir)s/pythonstyle/suppression.txt