rhythmic-morning-87313
05/02/2022, 9:05 AMpython_sources
and python_distribution
to self-reference entrypoints as package metadata. I'm trying that now.python_distribution("dist") -> ":lib"
pex_binary("cli") -> ":lib", ":dist"
python_sources("lib")
makes ./pants run pkgpath:cli
to fail with missing 3rd party dependencies, which was fine until I add cli -> :dist
dependency relationship.pex.environment.ResolveError: Failed to resolve requirements from PEX environment @ /home/joongi/.cache/pants/named_caches/pex_root/unzipped_pexes/8a8630b19664717a8aabe2dc76c0019704a83f40.
Needed cp310-cp310-manylinux_2_31_aarch64 compatible dependencies for:
1: click>=7.1.2
Required by:
FingerprintedDistribution(distribution=backend.ai-cli 22.9.0.dev0 (/home/joongi/.cache/pants/named_caches/pex_root/installed_wheels/b90dd7e1886232c3c399cadb17c6baf5ecb3c9bd66694b059307004cdf0412ee/backend.ai_cli-22.9.0.dev0-py3-none-any.whl), fingerprint='5eaa7f063131fd1d7d1dbd6b495d91f1293d77aaa08bd1c1cddef7a4d669d30b')
But this pex had no 'click' distributions.
cli
to :dist
targets of other custom-entrypoint-exposing first party packages, because it is intended to detect and import them optionally.cli
-compatible packages may increase/decrease arbitrarily in the future.maanger
pkg exposes:backend.ai-cli
and backend.ai-manager
in the same venv, i could run:
<http://backend.ai|backend.ai> mgr start-server
backend.ai-cli
and backend.ai-agent
in another venv, then inside it i could run <http://backend.ai|backend.ai> ag ...
commands<http://backend.ai|backend.ai> xxx
variants in the unified venv/pex-env.:dist
to python_sources
instaed of pex_binary
, the sudden 3rd-party resolution failure occurs in the same way:dist
as explicit dependency of the run targets.
2. Write a custom editable installation rule....PEX_SCRIPT
trickpkg_resources
and scans BUILD files through the source directories, because it seems to take too much time for me to wait until pex
to support editable installations and/or pants
to support entrypoint metadata injection...