loud-stone-80561
10/10/2024, 3:38 AMpoetry_requirements
, when the same package exists on pypi? For example (snippet of pyproject.toml
):
[tool.poetry.dependencies]
...
fiftyone = {version = "~0.16.0", source = "fiftyone-teams"}
...
[[tool.poetry.source]]
name = "fiftyone-teams"
url = "<https://pypi.fiftyone.ai/simple/>"
priority = "explicit"
I've also added this to our `pants.toml`:
[python-repos]
indexes = [
"<https://pypi.fiftyone.ai/simple/>",
"<https://pypi.org/simple/>"
]
In this setup, fiftyone
(which also exists on pypi) is resolved from pypi in the lockfile, vs <http://pypi.fiftyone.ai|pypi.fiftyone.ai>
loud-stone-80561
10/10/2024, 3:38 AMrequirements.txt
/ python_requirements
where this can be specified explicitly, but curious if there's something I'm missing from the poetry requirements side
Edit - Looks like this is an outstanding FR: https://github.com/pantsbuild/pants/issues/17565
I was able to unblock myself with the following (sub-optimal but works / is legible) - basically setting up a separate python_requirement
for any deps we need to resolve privately outside of `pyproject.toml`:
poetry_requirements(name = "root")
python_requirement(
requirements=[
"fiftyone@https://%(env.FIFTYONE_TOKEN)@pypi.fiftyone.ai/packages/fiftyone-<version>-py3-none-any.whl"
],
tags = ["private-deps"],
)