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

Support of using locked version when building. #7911

Open
Renkai opened this issue Oct 4, 2024 · 0 comments
Open

Support of using locked version when building. #7911

Renkai opened this issue Oct 4, 2024 · 0 comments

Comments

@Renkai
Copy link

Renkai commented Oct 4, 2024

Hi Y'all!
Due to some limitation of where I work, I can only install wheels using pip in production, but it's free to use uv to build wheels.
So when using uv, I want to define a loose range for dependencies for testing, let uv decide the final version for me, but produce a wheel with restrict dependency versions for pip install later. Is there a best practice exists?

Here is a some hypothetical user interface:

uv init --lib proj-for-pip
uv add requests
#got 
#dependencies = [
#    "requests>=2.32.3",
#]
#in pyproject.toml
#
#[[package]]
#name = "requests"
#version = "2.32.3"
#in uv.lock

uv build
# got dist/proj_for_pip-0.1.0-py3-none-any.whl
# Requires-Dist: requests>=2.32.3 in metadata of the wheel

uv build --some-parameter-to-lock-version
# got dist/proj_for_pip-0.1.0-py3-none-any.whl
# Requires-Dist: requests==2.32.3 in metadata of the wheel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant