Skip to content

Commit 1a75c69

Browse files
Use proper name for scripts and arguments
Signed-off-by: Abhishek Kumar <abhishek.kasyap09@gmail.com>
1 parent c70759d commit 1a75c69

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,34 +31,31 @@
3131
from subprocess import run
3232
import sys
3333

34-
from commoncode.system import on_windows
35-
36-
def generate_os_archive(links, requirement, archive_name):
34+
def download_req_tools(links, requirement, dir_name):
3735
"""
38-
Generate an archive as `archive_name.tar.gz` and `archive_name` directory
39-
that contains wheels and sdist for specific OS and python by taking links,
40-
requirement as an input.
36+
Download all dependencies into dir_name as per
37+
OS/arch/python by taking links,requirement as an input.
4138
"""
4239
pip_args =[
4340
'pip',
4441
'download',
45-
'--verbose',
4642
'--no-cache-dir',
4743
'--no-index',
4844
'--find-links',
4945
links,
5046
'-r',
5147
requirement,
5248
'--dest',
53-
archive_name,
49+
dir_name,
5450
]
5551
run(pip_args)
5652

5753

5854
def main_with_args(args: str) -> None:
5955
parser = argparse.ArgumentParser(
60-
description="""Generate an archive as `archive_name.tar.gz` and `archive_name` directory
61-
that contains wheels and sdist for specific OS and python.""",
56+
description="""Download all dependencies into directory
57+
(for instance thirdparty directory) as per OS/arch/python by
58+
taking links,requirement as an input.""",
6259
)
6360

6461
parser.add_argument(
@@ -76,8 +73,8 @@ def main_with_args(args: str) -> None:
7673
)
7774

7875
parser.add_argument(
79-
'--archive-name',
80-
help='Path to the archive file base name to create (without extension).',
76+
'--dest',
77+
help='Download packages into given directory(Destination)',
8178
type=str,
8279
required=True,
8380
)
@@ -86,8 +83,8 @@ def main_with_args(args: str) -> None:
8683

8784
find_links = args.find_links
8885
requirement = args.requirement
89-
archive_name = args.archive_name
90-
generate_os_archive(find_links, requirement, archive_name)
86+
dest = args.dest
87+
download_req_tools(find_links, requirement, dest)
9188

9289

9390
def main() -> None:

0 commit comments

Comments
 (0)