rhythmic-morning-87313
05/02/2022, 9:05 AMrhythmic-morning-87313
05/02/2022, 9:07 AMpython_sources and python_distribution to self-reference entrypoints as package metadata. I'm trying that now.rhythmic-morning-87313
05/02/2022, 9:14 AMpython_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.rhythmic-morning-87313
05/02/2022, 9:16 AMrhythmic-morning-87313
05/02/2022, 9:22 AMpex.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.rhythmic-morning-87313
05/02/2022, 9:22 AMrhythmic-morning-87313
05/02/2022, 9:23 AMrhythmic-morning-87313
05/02/2022, 9:24 AMcli to :dist targets of other custom-entrypoint-exposing first party packages, because it is intended to detect and import them optionally.rhythmic-morning-87313
05/02/2022, 9:26 AMcli-compatible packages may increase/decrease arbitrarily in the future.rhythmic-morning-87313
05/02/2022, 9:26 AMmaanger pkg exposes:rhythmic-morning-87313
05/02/2022, 9:28 AMbackend.ai-cli and backend.ai-manager in the same venv, i could run:
<http://backend.ai|backend.ai> mgr start-serverrhythmic-morning-87313
05/02/2022, 9:29 AMbackend.ai-cli and backend.ai-agent in another venv, then inside it i could run <http://backend.ai|backend.ai> ag ... commandsrhythmic-morning-87313
05/02/2022, 9:30 AMrhythmic-morning-87313
05/02/2022, 9:30 AM<http://backend.ai|backend.ai> xxx variants in the unified venv/pex-env.rhythmic-morning-87313
05/02/2022, 9:42 AM:dist to python_sources instaed of pex_binary, the sudden 3rd-party resolution failure occurs in the same wayrhythmic-morning-87313
05/02/2022, 1:32 PM:dist as explicit dependency of the run targets.
2. Write a custom editable installation rule....rhythmic-morning-87313
05/02/2022, 1:34 PMrhythmic-morning-87313
05/02/2022, 1:34 PMrhythmic-morning-87313
05/02/2022, 3:07 PMrhythmic-morning-87313
05/02/2022, 3:07 PMrhythmic-morning-87313
05/02/2022, 3:08 PMPEX_SCRIPT trickrhythmic-morning-87313
05/02/2022, 3:11 PMrhythmic-morning-87313
05/03/2022, 1:31 AMpkg_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...rhythmic-morning-87313
05/03/2022, 2:01 PMrhythmic-morning-87313
05/03/2022, 2:01 PM