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

rhythmic-morning-87313

04/30/2022, 4:07 AM
Q14:
./pants export
seems not to have any options. https://www.pantsbuild.org/docs/reference-export What does it do exactly? Could I use to generate a unified venv that includes all targets, for example? When I run it,
ExportError: Failed to write virtualenv for the resolve 'None' (using CPython==3.10.*) to dist/export/python/virtualenv
. So, my codes use Python 3.10 but pants is running with the apt-installed system Python 3.8. Can I change it as well (I’ve explicitly set pants.toml already…)?
1
ah.. i should configure the "resolve" first to get it working
the doc says "strongly recommended" but it seems that if i don't configure it, it does not work;
ok, setting it removes "None" from the error message
but still I'm getting another error
etcetra is a package that requires Python 3.9 or higher, and the target venv is using Python 3.10, so I believe it should be fine
hmm. I've regenerated the user lockfile after gathering all external dependencies to the unified requirements, and running
./pants export ::
gives me:
Copy code
Failed to digest inputs: "Error storing Digest { hash: Fingerprint<7ab31018a93d8802afa8cd123018cd5dfb3260da0678ad66acd9178a598fe02e>, size_bytes: 65795373 }: Input/output error"
;;
rerunning it...
Copy code
OSError: [Errno 28] No space left on device: '/home/joongi/.cache/pants/named_caches/pex_root/installed_wheels/7cf55410e8999025f1f5a33a38286296ccd25847fbd9e604ca4233b21fd254bf/pex-2.1.82-py2.py3-none-any.whl/pex/vendor/_vendored/attrs/attr/_cmp.py' -> '/tmp/process-executionhgFtkR/.tmp/tmp1lor3jw3/.bootstrap/pex/vendor/_vendored/attrs/attr/_cmp.py'
oops
ok, managed to extend the VM disk size...
hmmm
Copy code
pex.environment.ResolveError: A distribution for pyyaml could not be resolved in this environment.Found 1 distribution for pyyaml that do not apply:
1.) The wheel tags for PyYAML 5.4.1 are cp310-cp310-linux_aarch64 which do not match the supported tags of /usr/bin/python3.8:
it still gives errors like this
The size of
~/.cache/pants
is about 2 GiB...
hmmm this issue may be related to https://github.com/pantsbuild/pex/issues/1020
I think if I could rebuild my local pants source checkout using pyenv-provided Python 3.10 instead of apt-installed Python 3.8, I could workaround it
ok
PY=$(pyenv prefix 3.10.4)/bin/python ./pants-local export ::
resolves the issue.
it creates a unified venv that has all dependencies but it seems not be installing editable versions of the first-party packages
hmm
ok, although additionally installed editable pkgs in the exported venv need to be reinstalled whenever running
export
, but anyway I think we could make the plugin workflow.
5 Views