uv supports pinning a package to an index. I tried this with hatch and it works:
[tool.hatch.envs.default]
installer = "uv"
dependencies = ["my-package"]
[tool.uv.sources]
my-package = { index = "foo" }
[[tool.uv.index]]
name = "foo"
url = "https://pkgs.dev.azure.com/foo/bar/_packaging/baz/pypi/simple/"
explicit = true
However, with hatch-pip-compile it does not work anymore:
[tool.hatch.envs.default]
type = "pip-compile"
pip-compile-resolver = "uv"
pip-compile-installer = "uv"
dependencies = ["my-package"]
[tool.uv.sources]
my-package = { index = "foo" }
[[tool.uv.index]]
name = "foo"
url = "https://pkgs.dev.azure.com/foo/bar/_packaging/baz/pypi/simple/"
explicit = true
I get an error that looks like:
× No solution found when resolving dependencies:
╰─▶ Because my-package was not found in the package registry and you require my-package, we can conclude
that your requirements are unsatisfiable.
uvsupports pinning a package to an index. I tried this withhatchand it works:However, with
hatch-pip-compileit does not work anymore:I get an error that looks like: