uv icon indicating copy to clipboard operation
uv copied to clipboard

uv does not appear to parse multiple sources in pyproject.toml

Open jauderho opened this issue 1 year ago • 1 comments

uv 0.3.2

The latest releases of uv looked interesting with lock support so I decided to try converting one of my repos. I currently use pipenv to generate a requirements.txt

This is what I have in the Pipfile

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[[source]]
url = "https://www.piwheels.org/simple"
verify_ssl = true
name = "piwheels"

[packages]
ansible = "*"
ansible-lint = "*"
jmespath = "*"
pywinrm = {extras = ["kerberos", "credssp"], version = "*"}
requests-credssp = "*"
requests-kerberos = "*"
storops = "*"
wheel = "*"
#mitogen = { git = "https://github.com/mitogen-hq/mitogen.git", editable = true, ref = "bd3cfb4230a485c57a7ad63687ad15249ed341f8" }
#mitogen = { git = "https://github.com/mitogen-hq/mitogen.git", editable = true }
mitogen = "*"

[dev-packages]

[requires]
python_version = "3"

Based on what I could figure out, this should be a mostly equivalent pyproject.toml

[project]
name = "afiles"
version = "1.0.0"
description = "Private Ansible files"
authors = ["Jauder Ho <[email protected]>"]
requires-python = ">=3.12"
dependencies = [
    "ansible",
    "ansible-lint",
    "jmespath",
    "mitogen",
    "pywinrm[kerberos,credssp]",
    "requests-credssp",
    "requests-kerberos",
    "storops",
    "wheel",
]

[[tool.poetry.source]]
name = "pypi"
url = "https://pypi.org/simple"
default = true

[[tool.poetry.source]]
name = "piwheels"
url = "https://www.piwheels.org/simple"

[tool.pip-tools]
generate-hashes = false

However, after running uv lock and uv pip compile pyproject.toml -o requirements.txt, the resulting requirements.txt file does not have what I was expecting to see.

-i https://pypi.org/simple
--extra-index-url https://www.piwheels.org/simple

Hopefully, someone can point out what I'm missing here. Thanks in advance.

jauderho avatar Aug 23 '24 19:08 jauderho

I believe you're looking for #171 — which we want to do but haven't yet.

zanieb avatar Aug 23 '24 21:08 zanieb

I'm gonna combine with the existing issue -- thanks!

charliermarsh avatar Aug 26 '24 14:08 charliermarsh