Good morning. I am having an issue resolving an in...
# general
a
Good morning. I am having an issue resolving an internal python distribution that we publish to our private repo. When I install it in another code repository and try to package a pex file I get
Failed to resolve all requirements for complete platform cp311-cp311-manylinux_2_36_x86_64
. I am using
complete_platforms
, and there is a compatibility tag for
py311-none-any
, which matches the wheel file I am installing. Any pointers on where I am going wrong, or where my lack of understanding lies 🙏
b
Can you share as much of your pants.toml and BUILD files as you can/is relevant? Thanks and sorry for the trouble
a
No trouble at all 😛
Copy code
[GLOBAL]
pants_version = "2.20.0"
remote_store_address ="
remote_instance_name =
remote_oauth_bearer_token = "@./.token"
remote_cache_read = true
remote_cache_write = true
concurrent = true
pants_ignore = ["!experiments/"]

plugins = [
    "pants_backend_oci @ git+<https://github.com/tgolsson/pants-backends@064c00b67311675971449b51962ce62e766d500d#egg=pants_backend_oci&subdirectory=pants-plugins/oci>",
]

backend_packages = [
    "pants.backend.docker",
    "pants.backend.python",
    "pants.backend.python.lint.autoflake",
    "pants.backend.python.lint.black",
    "pants.backend.python.lint.flake8",
    "pants.backend.python.lint.isort",
    "pants.backend.python.typecheck.mypy",
    "pants.backend.shell",
    "pants.backend.experimental.adhoc",
    "pants_backend_oci"
]


[tailor]
ignore_paths = [
    "local/**"
]

[python]
interpreter_constraints = ["==3.11.*"]
enable_resolves = true

resolves = { python-default = "python-default.lock" }


[python-bootstrap]
# We search for interpreters both on the $PATH and in the `$(pyenv root)/versions` folder.
#  If you're using macOS, you may want to leave off the <PATH> entry to avoid using the
#  problematic system Pythons. See
#  <https://www.pantsbuild.org/docs/python-interpreter-compatibility#changing-the-interpreter-search-path>.
# search_path = ["<PATH>", "<PYENV>"]

[python-infer]
# 2.17 is transitioning to a new, faster parser for dependency inference:
use_rust_parser = true


[subprocess-environment]
env_vars = [
    'HOME',
]

# For oci backend
[umoci]
version = "nightly"
root BUILD
Copy code
poetry_requirements(
    name="root",
)

files(name="platforms", sources=["platforms.json"])
package BUILD
Copy code
python_sources(
    dependencies = [
        "//:root#optimeering-python-client"
    ]
)

pex_binary(
    name="local",
    entry_point="__main__.py",
    complete_platforms=["//:platforms"],
    layout="packed"
)
platforms.json
I think I've found my issue. The lock file was not being generated because its a private repo and I hadn't configured pants accordingly 😊
b
Ah, I see!