diff options
Diffstat (limited to 'project')
-rw-r--r-- | project/boost/download.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/project/boost/download.py b/project/boost/download.py index 13a89f4..d1fc8ea 100644 --- a/project/boost/download.py +++ b/project/boost/download.py @@ -68,7 +68,13 @@ def _download_if_necessary(version, storage): class DownloadParameters: - def __init__(self, version, unpack_dir='.', cache_dir=None): + def __init__(self, version, unpack_dir=None, cache_dir=None): + if unpack_dir is None: + if cache_dir is None: + unpack_dir = '.' + else: + unpack_dir = cache_dir + self.version = version self.unpack_dir = normalize_path(unpack_dir) self.storage = TemporaryStorage(unpack_dir) @@ -98,7 +104,7 @@ def _parse_args(argv=None): formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('--unpack', metavar='DIR', dest='unpack_dir', - type=normalize_path, default='.', + type=normalize_path, help='directory to unpack the archive to') parser.add_argument('--cache', metavar='DIR', dest='cache_dir', type=normalize_path, |