able-shampoo-44547
07/09/2022, 1:46 PMpex.environment.ResolveError: Failed to resolve requirements from PEX environment @ /home/russell/.cache/pants/named_caches/pex_root/unzipped_pexes/65af0cca88bb416d7230e8e933478380260e9e31.
Needed cp39-cp39-manylinux_2_33_x86_64 compatible dependencies for:
1: Sphinx
Required by:
sphinxcontrib-cldomain 0.14
But this pex had no ProjectName(raw='Sphinx', normalized='sphinx') distributions.
2: setuptools
Required by:
sphinxcontrib-cldomain 0.14
But this pex had no ProjectName(raw='setuptools', normalized='setuptools') distributions.
I have verified that my python_distribution correctly generates with dependencies on these 2 libraries in it's metadata, and
the libraries show up as dependencies
$ ./pants dependencies --transitive tests:tests0
//:pyproject
//:sphinxcontrib-cldomain
//LICENSE:cldomain_files
//README.rst:cldomain_files
//src/sphinxcontrib/__init__.py:../../lib
//src/sphinxcontrib/cldomain/__init__.py:../../../lib
//src/sphinxcontrib/cldomain/cldomain.py:../../../lib
//src/sphinxcontrib/hyperspec/__init__.py:../../../lib
//src/sphinxcontrib/hyperspec/hyperspec.py:../../../lib
3rdparty/python#Sphinx
3rdparty/python#setuptools
3rdparty/python/requirements.txt
src/sphinxcontrib/cldomain/cldomain.lisp:lisp_lib
src/sphinxcontrib/cldomain/package.lisp:lisp_lib
src/sphinxcontrib/cldomain/test.lisp:lisp_lib
src/sphinxcontrib/cldomain/version.lisp-expr:lisp_lib
tests/test_cldomain.py:tests0
tests/test_hyperspec.py:tests0
but i get the ResolveError
as above when i run ./pants tests tests:tests0
the code i'm working off is https://github.com/russell/sphinxcontrib-cldomain/tree/013c10294fb63c5371cbef92ff6999a9845aee32able-shampoo-44547
07/09/2022, 1:47 PMProject
is a *.pex
directory in the execution process execution. but i haven't figured out how to map a 3rd party dependency into a pex file yetable-shampoo-44547
07/09/2022, 2:06 PMlocal_dists.pex/PEX-INFO
i can only see the library sphinxcontrib-cldomain
looking in my requirements.pex/PEX-INFO
i see the expected "requirements": ["Sphinx", "setuptools"],
and the associated dependencies they haveable-shampoo-44547
07/09/2022, 2:15 PM"--pex-path", "pytest.pex:requirements.pex:local_dists.pex"
so i think pex is being detected. I'm not familiar with pex so i'll start debugging it next i guesshappy-kitchen-89482
07/09/2022, 2:48 PMpants
script or pants.toml
in that repo you linked to?enough-analyst-54434
07/09/2022, 2:50 PMsphinxcontrib
namespace package with src/sphinxcontrib/__init__.py
. You need to delete that file. I see evidence for sphinxcontrib
being a namespace package by all the same-prefixed project names in your lock: https://github.com/russell/sphinxcontrib-cldomain/blob/013c10294fb63c5371cbef92ff6999a9845aee32/3rdparty/python/default.lock#L654enough-analyst-54434
07/09/2022, 2:53 PMenough-analyst-54434
07/09/2022, 2:54 PMable-shampoo-44547
07/09/2022, 3:53 PMI don't see ait's on a branch, i linked the commit because of that, but the branch is calledscript orpants
in that repo you linked to?pants.toml
build-tooling
able-shampoo-44547
07/09/2022, 3:55 PMenough-analyst-54434
07/09/2022, 3:58 PMable-shampoo-44547
07/09/2022, 3:58 PM./pants -ldebug test tests:tests0
able-shampoo-44547
07/09/2022, 3:59 PM{"bootstrap_hash": "c73b47f34b37d54ae038f1957cbeb175a5db8ff2", "build_properties": {"pex_version": "2.1.90"}, "code_hash": "0daa6940842ebea72601f860fa1fa42ecbbfe0db", "distributions": {"sphinxcontrib_cldomain-0.14-py37.py38.py39-none-any.whl": "1ff3a7d9ef09c93ef5da278f34d5bc587620b25f99187e4dc1347412d97bbc01", }, "emit_warnings": false, "ignore_errors": false, "includes_tools": false, "inherit_path": "false", "interpreter_constraints": [], "pex_hash": "c6e9c7eb2afe58e1116e36df30eee4cf753b0018", "pex_path": null, "requirements": ["sphinxcontrib-cldomain==0.14"], "strip_pex_env": true, "venv": false, "venv_bin_path": "false", "venv_copies": false, "venv_site_packages_copies": false}
able-shampoo-44547
07/09/2022, 3:59 PMable-shampoo-44547
07/09/2022, 4:00 PMable-shampoo-44547
07/09/2022, 4:01 PMenough-analyst-54434
07/09/2022, 4:02 PM//:sphinxcontrib-cldomain
(i.e.: do they rely on distribution metadata), or do they just test the production code. If the latter, this can probably be fixed by letting dep inference do its job. If the former, I can dig up an issue link and explain more what you need to do.enough-analyst-54434
07/09/2022, 4:03 PMable-shampoo-44547
07/09/2022, 4:04 PMenough-analyst-54434
07/09/2022, 4:04 PMenough-analyst-54434
07/09/2022, 4:05 PMpython_distribution
target.able-shampoo-44547
07/09/2022, 4:05 PMsrc/
is going to trip me up, i'll have to modify the python path tooenough-analyst-54434
07/09/2022, 4:06 PMsrc/
on Pants account. Presumably you're doing that for other reasons?enough-analyst-54434
07/09/2022, 4:08 PMenough-analyst-54434
07/09/2022, 4:10 PM./pants test tests::
working https://github.com/russell/sphinxcontrib-cldomain/tree/bulid-toolingable-shampoo-44547
07/09/2022, 4:10 PMable-shampoo-44547
07/09/2022, 4:10 PMenough-analyst-54434
07/09/2022, 4:10 PMable-shampoo-44547
07/09/2022, 4:11 PMenough-analyst-54434
07/09/2022, 4:12 PMable-shampoo-44547
07/09/2022, 4:29 PMenough-analyst-54434
07/09/2022, 4:36 PM