Skip to content

Commit

Permalink
DOC: Add short explanation of index-url priority
Browse files Browse the repository at this point in the history
* Provide a very short summary of how --index-url takes priority over
  --extra-index-url to ensure that if a target package exists on the
  nightly package index it will be used over a version that exists on
  public PyPI (https://pypi.org/).
  • Loading branch information
matthewfeickert committed May 30, 2023
1 parent a45c843 commit b349f16
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ python -m pip install \
matplotlib
```

Note that second `-i` parameter will take priority, it needs to come second if
you want to pull from nightly otherwise it will pull from PyPI.
Note that `--index-url` takes priority over `--extra-index-url`.
Packages, and dependencies, with versions available on the
[nightly package index][] will be installed from there before falling back to
the [Python Package Index][PyPI] to install all remaining requested packages.

```
if package in nightly:
Expand All @@ -58,3 +60,6 @@ dependencies:
- --pre --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --extra-index-url https://pypi.org/simple
- matplotlib
```

[nightly package index]: https://anaconda.org/scientific-python-nightly-wheels
[PyPI]: https://pypi.org/

0 comments on commit b349f16

Please sign in to comment.