https://pantsbuild.org/ logo
#general
Title
# general
b

bulky-evening-62934

04/17/2020, 6:22 PM
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

hundreds-father-404

04/17/2020, 6:25 PM
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

bulky-evening-62934

04/17/2020, 6:34 PM
ok, I would like to test it! so for pants, it will list
--index=
by the order of index in my indexes list ?
h

hundreds-father-404

04/17/2020, 6:41 PM
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
5 Views