Skip to content

Commit a8e5a04

Browse files
authored
Merge pull request #29243 from Rostepher/reorganize-build-swift-module
[NFC][Build System: build-script] Re-organized the build_swift module
2 parents 99e60b0 + ff60592 commit a8e5a04

22 files changed

+41
-36
lines changed

utils/build-parser-lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import os
3030
import platform
3131
import sys
3232

33-
from build_swift import argparse, defaults
33+
from build_swift.build_swift import argparse, defaults
3434
from swift_build_support.swift_build_support import (
3535
shell,
3636
xcrun,

utils/build-script

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import platform
1919
import sys
2020
import time
2121

22-
from build_swift import defaults
23-
from build_swift import driver_arguments
24-
from build_swift import presets
25-
from build_swift.migration import migrate_swift_sdks
22+
from build_swift.build_swift import defaults
23+
from build_swift.build_swift import driver_arguments
24+
from build_swift.build_swift import presets
25+
from build_swift.build_swift.migration import migrate_swift_sdks
2626

2727
from swift_build_support.swift_build_support import (
2828
arguments,

utils/build_swift/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This source file is part of the Swift.org open source project
2+
#
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
4+
# Licensed under Apache License v2.0 with Runtime Library Exception
5+
#
6+
# See https://swift.org/LICENSE.txt for license information
7+
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors

utils/build_swift/argparse/__init__.py renamed to utils/build_swift/build_swift/argparse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information

utils/build_swift/argparse/actions.py renamed to utils/build_swift/build_swift/argparse/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information

utils/build_swift/defaults.py renamed to utils/build_swift/build_swift/defaults.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See http://swift.org/LICENSE.txt for license information

utils/build_swift/driver_arguments.py renamed to utils/build_swift/build_swift/driver_arguments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information

utils/build_swift/migration.py renamed to utils/build_swift/build_swift/migration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information

utils/build_swift/presets.py renamed to utils/build_swift/build_swift/presets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information

utils/build_swift/tests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information

utils/build_swift/tests/argparse/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information

utils/build_swift/tests/argparse/test_actions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information
77
# See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

99

1010
from ..utils import TestCase, redirect_stderr
11-
from ...argparse import (ArgumentParser, BoolType, Nargs, PathType, SUPPRESS,
12-
actions)
11+
from ...build_swift.argparse import (
12+
ArgumentParser, BoolType, Nargs, PathType, SUPPRESS, actions)
1313

1414

1515
# -----------------------------------------------------------------------------

utils/build_swift/tests/argparse/test_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information
@@ -10,7 +10,7 @@
1010
from argparse import _ArgumentGroup, _MutuallyExclusiveGroup
1111

1212
from ..utils import TestCase
13-
from ...argparse import ArgumentParser, actions
13+
from ...build_swift.argparse import ArgumentParser, actions
1414

1515

1616
# -----------------------------------------------------------------------------

utils/build_swift/tests/argparse/test_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information
@@ -11,7 +11,7 @@
1111
import platform
1212

1313
from ..utils import TestCase
14-
from ...argparse import ArgumentTypeError, types
14+
from ...build_swift.argparse import ArgumentTypeError, types
1515

1616

1717
# -----------------------------------------------------------------------------

utils/build_swift/tests/expected_options.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information
@@ -12,8 +12,8 @@
1212
from swift_build_support.swift_build_support import host
1313
from swift_build_support.swift_build_support import targets
1414

15-
from .. import argparse
16-
from .. import defaults
15+
from ..build_swift import argparse
16+
from ..build_swift import defaults
1717

1818

1919
__all__ = [

utils/build_swift/tests/test_driver_arguments.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information
@@ -16,13 +16,11 @@
1616

1717
from swift_build_support.swift_build_support import migration
1818
from swift_build_support.swift_build_support.SwiftBuildSupport import (
19-
get_all_preset_names,
20-
get_preset_options,
21-
)
19+
get_all_preset_names, get_preset_options)
2220

2321
from . import expected_options as eo
24-
from .. import argparse
25-
from .. import driver_arguments
22+
from ..build_swift import argparse
23+
from ..build_swift import driver_arguments
2624

2725

2826
FILE_PATH = os.path.abspath(__file__)

utils/build_swift/tests/test_migration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information
@@ -10,7 +10,7 @@
1010
from __future__ import absolute_import, unicode_literals
1111

1212
from .utils import TestCase, add_metaclass
13-
from .. import migration
13+
from ..build_swift import migration
1414

1515

1616
def _get_sdk_targets(sdk_names):

utils/build_swift/tests/test_presets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information
@@ -12,8 +12,8 @@
1212
import os
1313

1414
from .utils import TestCase, UTILS_PATH, add_metaclass
15-
from .. import presets
16-
from ..presets import Preset, PresetParser
15+
from ..build_swift import presets
16+
from ..build_swift.presets import Preset, PresetParser
1717

1818
try:
1919
# Python 2

utils/build_swift/tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This source file is part of the Swift.org open source project
22
#
3-
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
3+
# Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
44
# Licensed under Apache License v2.0 with Runtime Library Exception
55
#
66
# See https://swift.org/LICENSE.txt for license information

0 commit comments

Comments
 (0)