Skip to content

uv lock keeps trailing / on Linux, but omits on macOS #13707

@ivanychev

Description

@ivanychev

Summary

Hey! Thanks for amazing work and this very useful project. I'm facing behavior where local macOS uv lock generates a different lock file from what is done on Linux.

My pyproject.toml file contains

[[tool.uv.index]]
name = "mycompany"
url = "https://mycompany-123.d.codeartifact.us-east-1.amazonaws.com/pypi/mycompany/simple/"
default = true
authenticate = "always"

and when executing uv lock on macOS, it contains entries like

[[package]]
name = "tomli"
version = "2.2.1"
source = { registry = "https://mycompany-123.d.codeartifact.us-east-1.amazonaws.com/pypi/mycompany/simple" }

However, when doing

uv sync --extra torch-gpu --locked --no-dev --no-install-project

during Docker build on Ubuntu 22.04 with same uv version, it fails because it tries to change the lock file. The diff -u showed this:

-source = { registry = "https://mycompany-123.d.codeartifact.us-east-1.amazonaws.com/pypi/mycompany/simple/" }
+source = { registry = "https://mycompany-123.d.codeartifact.us-east-1.amazonaws.com/pypi/mycompany/simple" }

During docker build, I have UV_INDEX_MYCOMPANY_USERNAME and UV_INDEX_MYCOMPANY_PASSWORD specified.

Do you have any idea what might have gone wrong here?

Platform

macOS 15.5 and Ubuntu 22.04

Version

0.7.8

Python version

3.11

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions