diff --git a/README.md b/README.md index 9e01600..6818e7c 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ optional arguments: default temp directory has less available space than your mirroring target --platform PLATFORM The OS platform(s) to mirror. one of: {'linux-64', - 'linux-32','osx-64', 'win-32', 'win-64'} + 'linux-32','osx-64', 'win-32', 'win-64', 'noarch'} -v, --verbose logging defaults to error/exception only. Takes up to three '-v' flags. '-v': warning. '-vv': info. '-vvv': debug. diff --git a/conda_mirror/conda_mirror.py b/conda_mirror/conda_mirror.py index 2ee7661..f65d05d 100644 --- a/conda_mirror/conda_mirror.py +++ b/conda_mirror/conda_mirror.py @@ -24,7 +24,8 @@ 'linux-32', 'osx-64', 'win-64', - 'win-32'] + 'win-32', + 'noarch'] def _maybe_split_channel(channel): @@ -139,7 +140,7 @@ def _make_arg_parser(): ap.add_argument( '--platform', help=("The OS platform(s) to mirror. one of: {'linux-64', 'linux-32'," - "'osx-64', 'win-32', 'win-64'}"), + "'osx-64', 'win-32', 'win-64', 'noarch'}"), ) ap.add_argument( '-v', '--verbose', @@ -788,11 +789,12 @@ def main(upstream_channel, target_directory, temp_directory, platform, shutil.move(download_path, move_path) # Also need to make a "noarch" channel or conda gets mad - noarch_path = os.path.join(target_directory, 'noarch') - if not os.path.exists(noarch_path): - os.makedirs(noarch_path, exist_ok=True) - noarch_repodata = {'info': {}, 'packages': {}} - _write_repodata(noarch_path, noarch_repodata) + if platform != 'noarch': + noarch_path = os.path.join(target_directory, 'noarch') + if not os.path.exists(noarch_path): + os.makedirs(noarch_path, exist_ok=True) + noarch_repodata = {'info': {}, 'packages': {}} + _write_repodata(noarch_path, noarch_repodata) return summary