Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in uv 5.10 installing from directory/git package with pyproject.toml #10039

Open
peterroelants opened this issue Dec 19, 2024 · 2 comments
Labels
needs-mre Needs more information for reproduction

Comments

@peterroelants
Copy link

uv pip install a directory with a pyproject.toml fails with uv version 0.5.10 (and works with uv<0.5.10)

❯ uv pip install <package-name> @ git+ssh://git@<package_github_url>
Using Python 3.11.11 environment at: ~/miniforge3/envs/uv_test
 Updated ssh://git@<package_github_url> (abcdefg)
  × Failed to download and build `<package-name> @
  │ git+ssh://git@<package_github_url>`
  ├─▶ Failed to parse: `/home/peter/.cache/uv/git-v0/checkouts/asduhasdf/abcdefg/pyproject.toml`
  ╰─▶ TOML parse error at line 1, column 1
        |
      1 | [project]
        | ^^^^^^^^^
      `pyproject.toml` is using the `[project]` table, but the required `project.version` field is neither set nor present in the `project.dynamic` list

pyproject.toml looks like:

[project]
name = "<package-name>"
description = "Package discription"
version = "0.0.1"
readme = "README.md"
license = {text = "Proprietary/Confidential"}
classifiers = [
    "Programming Language :: Python :: 3",
]
requires-python = ">=3.9"
dynamic = [
  "dependencies",
]

[build-system]
requires = ["setuptools>=67", "wheel", "pip"]
build-backend = "setuptools.build_meta"

[tool.setuptools.dynamic]
dependencies = {file = ["env/requirements.txt"]}

[tool.setuptools.packages.find]
where = ["./src"]

[project.urls]
source = "<package_github_url>"

I can successfully install the package with uv-0.5.9 using uv pip install <package-name> @ git+ssh://git@<package_github_url>.

@charliermarsh
Copy link
Member

Please provide a Git repo that I can clone to reproduce.

@charliermarsh charliermarsh added the needs-mre Needs more information for reproduction label Dec 19, 2024
@peterroelants
Copy link
Author

peterroelants commented Dec 20, 2024

I'm sorry for not providing an MRE initially, I was having the issue with a private repo that I couldn't share.

However, I've been able to replicate it in the meantime at https://github.com/peterroelants/test_uv_pyproject_toml . The issue is a bit more complicated as I originally thought, more details are in the README of that repo

You can test it running:

uv pip install "test-uv-pyproject-toml @ git+ssh://[email protected]/peterroelants/test_uv_pyproject_toml.git#subdirectory=projects/subproject"

Using uv=0.5.10.

I'm not sure if it's an actual issue, but is definitely a regression (works with uv 0.5.9) and the behavior differs from pip, which also works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-mre Needs more information for reproduction
Projects
None yet
Development

No branches or pull requests

2 participants