flat-zoo-31952
09/29/2020, 6:25 PM./pants dependencies --type=3rdparty
output the value of [python-repos].indexes.add
as well?hundreds-father-404
09/29/2020, 6:32 PM[python-repos].indexes
, you can use either ./pants help-advanced python-repos
, which will show you the current value. Or use ./pants help-all
, which will output JSON and you can use something like JQ to parse.flat-zoo-31952
09/29/2020, 6:50 PMhundreds-father-404
09/29/2020, 6:52 PMiām trying to script up creating a virtualenv from the deps so my IDE can understand whatās going onVery helpful indeed. See https://www.pantsbuild.org/docs/python-third-party-dependencies#tip-set-up-a-virtual-environment-optional for a starter script
witty-crayon-22786
09/29/2020, 7:02 PM./pants help-all | jq '.scope_to_help_info["python-repos"].advanced | map(select(.config_key=="indexes")) | .[0].value_history'
⦠although the structure doesnāt seem to render the final value directly, so youād still need some logic../pants help-all | jq '.scope_to_help_info["python-repos"].advanced | map(select(.config_key=="indexes")) | .[0].value_history.ranked_values[-1].value'
happy-kitchen-89482
09/29/2020, 8:00 PMflat-zoo-31952
09/29/2020, 8:28 PMbut more generally, we should probably expose venv export for IDE and jupyter purposeson this note, is there a good way to export "editable installs" to this venv? i'm trying a BUILD file in the source root and a
python_distribution()
target but there might be a better waywitty-crayon-22786
09/29/2020, 9:10 PMnice jq, i would have had no idea how to write thati learned yesterday! heh.
hundreds-father-404
09/29/2020, 9:17 PMis there a good way to export āeditable installsā to this venv?You want to create a
.whl
for your code, and then have pip install it via an editable install?
Whatās the motivation? Generally, for an IDE with creating the venv, Iād think you only want your 3rdparty reqs in it, and then have the IDE treat your first-party code like it normally would, rather than loading it via an editable installflat-zoo-31952
09/29/2020, 9:20 PMhundreds-father-404
09/29/2020, 9:20 PMflat-zoo-31952
09/29/2020, 9:21 PMhundreds-father-404
09/29/2020, 9:22 PMsrc/python
is a source root so that it knows the import pants.util.strutil
is really from src/python/pants/util/strutil.py
flat-zoo-31952
09/29/2020, 9:23 PM