-
Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathconfig.py
29 lines (24 loc) · 994 Bytes
/
config.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
# utils/profdata_merge/config.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
# This file contains the data structure that transforms arguments into usable
# values
import os
import tempfile
class Config(object):
"""A class to store configuration information specified by command-line
arguments.
"""
def __init__(self, out_dir, no_remove_files):
self.out_dir = out_dir
self.tmp_dir = tempfile.mkdtemp()
self.pid_file_path = os.path.join(self.out_dir,
"profdata_merge_worker.pid")
self.final_profdata_path = os.path.join(self.out_dir, "swift.profdata")
self.remove_files = not no_remove_files