For `python-repo` (thanks for the fixing last wee...
# general
b
For
python-repo
(thanks for the fixing last week), it works perfectly, I have,
Copy code
[python-repos]
indexes = [
  "<https://pypi.org/simple/>",
  "<http://localhost:9696/simple>"
]
is there any logic about the priority for those 2 indexes, let’s say we have the package of the same name (but might build with different cpu instructions) on those 2 indexes, which one will be picked ?
💯 1
h
Yay! Glad it’s working for you! Hm, we would want to test Pex to determine this. Do you have Pex installed? If not, you can either do
pip install pex
, or I recommend getting the tool
pipx
https://pypi.org/project/pipx/ and doing
pipx install pex
Then, you would test on the command line
pex --no-pypi --index="<http://pypi.org/simple>" --index="<http://localhost:9696/simple>" requirement1 requirement2
, and then switch the order of those two indices
b
ok, I would like to test it! so for pants, it will list
--index=
by the order of index in my indexes list ?
h
Yes, I checked just now and that is true. We will preserve the order of
--python-repos-indexes
. We will pass to Pex the values for
--index
in the same order. (Also, you probably saw that we removed the fields
indices
and
repos
from
python_binary
? We realized those fields have been broken for some time and that they are misfeatures. It doesn’t make sense to have a custom index for just one single target.)
👍 1