mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-05-17 14:44:46 +00:00
Detect required-version from config file (#233)
1. If defined use version input 2. If defined use uv-file input 3. If defined use pyproject-file input 4. Search for required-version in uv.toml in repo root 5. Search for required-version in pyproject.toml in repo root 6. Use latest Closes: #215
This commit is contained in:
parent
d577e74f98
commit
5ce9ee0011
18 changed files with 2436 additions and 19 deletions
|
@ -0,0 +1 @@
|
|||
3.11
|
0
__tests__/fixtures/pyproject-toml-project/README.md
Normal file
0
__tests__/fixtures/pyproject-toml-project/README.md
Normal file
6
__tests__/fixtures/pyproject-toml-project/hello.py
Normal file
6
__tests__/fixtures/pyproject-toml-project/hello.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
def main():
|
||||
print("Hello from pyproject-toml-project!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
10
__tests__/fixtures/pyproject-toml-project/pyproject.toml
Normal file
10
__tests__/fixtures/pyproject-toml-project/pyproject.toml
Normal file
|
@ -0,0 +1,10 @@
|
|||
[project]
|
||||
name = "pyproject-toml-project"
|
||||
version = "0.1.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = []
|
||||
|
||||
[tool.uv]
|
||||
required-version = "==0.5.14"
|
1
__tests__/fixtures/uv-toml-project/.python-version
Normal file
1
__tests__/fixtures/uv-toml-project/.python-version
Normal file
|
@ -0,0 +1 @@
|
|||
3.11
|
0
__tests__/fixtures/uv-toml-project/README.md
Normal file
0
__tests__/fixtures/uv-toml-project/README.md
Normal file
6
__tests__/fixtures/uv-toml-project/hello.py
Normal file
6
__tests__/fixtures/uv-toml-project/hello.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
def main():
|
||||
print("Hello from uv-toml-project!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
10
__tests__/fixtures/uv-toml-project/pyproject.toml
Normal file
10
__tests__/fixtures/uv-toml-project/pyproject.toml
Normal file
|
@ -0,0 +1,10 @@
|
|||
[project]
|
||||
name = "uv-toml-project"
|
||||
version = "0.1.0"
|
||||
description = "Add your description here"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = []
|
||||
|
||||
[tool.uv]
|
||||
required-version = "==0.5.14"
|
1
__tests__/fixtures/uv-toml-project/uv.toml
Normal file
1
__tests__/fixtures/uv-toml-project/uv.toml
Normal file
|
@ -0,0 +1 @@
|
|||
required-version = "==0.5.15"
|
Loading…
Add table
Add a link
Reference in a new issue