Skip to content

Commit 86f47ee

Browse files
committed
Allow to pass custom base URL of the Python Package Index using "--pypi-index-url" option // Resolve platformio#290 , Resolve platformio#404
1 parent 533ded2 commit 86f47ee

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

get-platformio.py

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

pioinstaller/__main__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,18 @@
3636
multiple=True,
3737
help="A path to Python to be ignored (multiple options and unix wildcards are allowed)",
3838
)
39+
@click.option(
40+
"--pypi-index-url",
41+
help="Custom base URL of the Python Package Index (default `https://pypi.org/simple)`",
42+
)
3943
@click.pass_context
4044
def cli(
41-
ctx, verbose, shutdown_piohome, dev, ignore_python
45+
ctx, verbose, shutdown_piohome, dev, ignore_python, pypi_index_url
4246
): # pylint:disable=too-many-arguments
4347
if verbose:
4448
logging.getLogger("pioinstaller").setLevel(logging.DEBUG)
49+
if pypi_index_url:
50+
os.environ["PIP_INDEX_URL"] = pypi_index_url
4551
ctx.obj["dev"] = dev
4652
if ctx.invoked_subcommand:
4753
return

0 commit comments

Comments
 (0)