diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-30 01:32:12 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-03-30 01:32:12 +0300 |
commit | 95e250be67a167f97968639c4380da2f82dac3b0 (patch) | |
tree | 59377e5bfff099f3437745d8ed253c5d26acab8a /project | |
parent | project.boost: support --mingw for Travis/AppVeyor (diff) | |
download | cmake-common-95e250be67a167f97968639c4380da2f82dac3b0.tar.gz cmake-common-95e250be67a167f97968639c4380da2f82dac3b0.zip |
project: code style
Diffstat (limited to 'project')
-rw-r--r-- | project/boost/build.py | 12 | ||||
-rw-r--r-- | project/boost/download.py | 12 | ||||
-rw-r--r-- | project/ci/appveyor/boost.py | 4 | ||||
-rw-r--r-- | project/ci/appveyor/cmake.py | 4 | ||||
-rw-r--r-- | project/ci/travis/boost.py | 4 | ||||
-rw-r--r-- | project/ci/travis/cmake.py | 4 |
6 files changed, 20 insertions, 20 deletions
diff --git a/project/boost/build.py b/project/boost/build.py index 1e5018e..78e51bf 100644 --- a/project/boost/build.py +++ b/project/boost/build.py @@ -36,7 +36,7 @@ from project.configuration import Configuration from project.linkage import Linkage from project.platform import Platform from project.os import on_linux_like -import project.utils +from project.utils import normalize_path, setup_logging DEFAULT_PLATFORMS = (Platform.native(),) @@ -51,9 +51,9 @@ class BuildParameters: configurations=None, link=None, runtime_link=None, mingw=False, b2_args=None): - boost_dir = project.utils.normalize_path(boost_dir) + boost_dir = normalize_path(boost_dir) if build_dir is not None: - build_dir = project.utils.normalize_path(build_dir) + build_dir = normalize_path(build_dir) platforms = platforms or DEFAULT_PLATFORMS configurations = configurations or DEFAULT_CONFIGURATIONS link = link or DEFAULT_LINK @@ -196,10 +196,10 @@ def _parse_args(argv=None): help='build using MinGW-w64') parser.add_argument('--build', metavar='DIR', dest='build_dir', - type=project.utils.normalize_path, + type=normalize_path, help='Boost build directory (temporary directory unless specified)') parser.add_argument('boost_dir', metavar='DIR', - type=project.utils.normalize_path, + type=normalize_path, help='root Boost directory') parser.add_argument('b2_args', metavar='B2_ARG', @@ -210,7 +210,7 @@ def _parse_args(argv=None): def _main(argv=None): - with project.utils.setup_logging(): + with setup_logging(): build(BuildParameters.from_args(_parse_args(argv))) diff --git a/project/boost/download.py b/project/boost/download.py index d135eb3..ae18e94 100644 --- a/project/boost/download.py +++ b/project/boost/download.py @@ -25,7 +25,7 @@ import urllib.request from project.boost.archive import Archive, PermanentStorage, TemporaryStorage from project.boost.version import Version -import project.utils +from project.utils import normalize_path, setup_logging def _download_try_url(url): @@ -65,10 +65,10 @@ def _download_if_necessary(version, storage): class DownloadParameters: def __init__(self, version, unpack_dir='.', cache_dir=None): self.version = version - self.unpack_dir = project.utils.normalize_path(unpack_dir) + self.unpack_dir = normalize_path(unpack_dir) self.storage = TemporaryStorage(unpack_dir) if cache_dir is not None: - cache_dir = project.utils.normalize_path(cache_dir) + cache_dir = normalize_path(cache_dir) self.storage = PermanentStorage(cache_dir) @staticmethod @@ -93,10 +93,10 @@ def _parse_args(argv=None): formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('--unpack', metavar='DIR', dest='unpack_dir', - type=project.utils.normalize_path, default='.', + type=normalize_path, default='.', help='directory to unpack the archive to') parser.add_argument('--cache', metavar='DIR', dest='cache_dir', - type=project.utils.normalize_path, + type=normalize_path, help='download directory (temporary file unless specified)') parser.add_argument('version', metavar='VERSION', type=Version.from_string, @@ -106,7 +106,7 @@ def _parse_args(argv=None): def _main(argv=None): - with project.utils.setup_logging(): + with setup_logging(): download(DownloadParameters.from_args(_parse_args(argv))) diff --git a/project/ci/appveyor/boost.py b/project/ci/appveyor/boost.py index cfaa10c..df03aea 100644 --- a/project/ci/appveyor/boost.py +++ b/project/ci/appveyor/boost.py @@ -25,7 +25,7 @@ from project.boost.build import BuildParameters, build from project.configuration import Configuration from project.linkage import Linkage from project.platform import Platform -import project.utils +from project.utils import setup_logging def _env(name): @@ -106,7 +106,7 @@ def build_appveyor(argv=None): def main(argv=None): - with project.utils.setup_logging(): + with setup_logging(): build_appveyor(argv) diff --git a/project/ci/appveyor/cmake.py b/project/ci/appveyor/cmake.py index 1473ddc..c3d55d0 100644 --- a/project/ci/appveyor/cmake.py +++ b/project/ci/appveyor/cmake.py @@ -20,7 +20,7 @@ import sys from project.cmake.build import BuildParameters, build from project.configuration import Configuration from project.platform import Platform -import project.utils +from project.utils import setup_logging class Image(Enum): @@ -126,7 +126,7 @@ def build_appveyor(argv=None): def main(argv=None): - with project.utils.setup_logging(): + with setup_logging(): build_appveyor(argv) diff --git a/project/ci/travis/boost.py b/project/ci/travis/boost.py index 80ed01c..e77370c 100644 --- a/project/ci/travis/boost.py +++ b/project/ci/travis/boost.py @@ -23,7 +23,7 @@ from project.boost.build import BuildParameters, build from project.configuration import Configuration from project.linkage import Linkage from project.platform import Platform -import project.utils +from project.utils import setup_logging def _env(name): @@ -104,7 +104,7 @@ def build_travis(argv=None): def main(argv=None): - with project.utils.setup_logging(): + with setup_logging(): build_travis(argv) diff --git a/project/ci/travis/cmake.py b/project/ci/travis/cmake.py index c7c61ca..1d6eed4 100644 --- a/project/ci/travis/cmake.py +++ b/project/ci/travis/cmake.py @@ -19,7 +19,7 @@ import sys from project.cmake.build import BuildParameters, build from project.configuration import Configuration -import project.utils +from project.utils import setup_logging def _env(name): @@ -74,7 +74,7 @@ def build_travis(argv=None): def main(argv=None): - with project.utils.setup_logging(): + with setup_logging(): build_travis(argv) |