Skip to content

Commit

Permalink
Add requires-python to test projects
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jun 5, 2024
1 parent bd44a5e commit 34aba12
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/uv/src/commands/project/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::borrow::Cow;

use distribution_types::{IndexLocations, UnresolvedRequirementSpecification};
use install_wheel_rs::linker::LinkMode;
use pep440_rs::{Version, VersionSpecifier, VersionSpecifiers};
use pep440_rs::{VersionSpecifier, VersionSpecifiers};
use uv_cache::Cache;
use uv_client::RegistryClientBuilder;
use uv_configuration::{
Expand Down
7 changes: 7 additions & 0 deletions crates/uv/tests/lock_scenarios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ fn fork_basic() -> Result<()> {
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.8"
dependencies = [
'''fork-basic-a>=2; sys_platform == "linux"''',
'''fork-basic-a<2; sys_platform == "darwin"''',
Expand Down Expand Up @@ -151,6 +152,7 @@ fn fork_marker_accrue() -> Result<()> {
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.8"
dependencies = [
'''fork-marker-accrue-a==1.0.0; implementation_name == "cpython"''',
'''fork-marker-accrue-b==1.0.0; implementation_name == "pypy"''',
Expand Down Expand Up @@ -277,6 +279,7 @@ fn fork_marker_selection() -> Result<()> {
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.8"
dependencies = [
'''fork-marker-selection-a''',
'''fork-marker-selection-b>=2; sys_platform == "linux"''',
Expand Down Expand Up @@ -426,6 +429,7 @@ fn fork_marker_track() -> Result<()> {
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.8"
dependencies = [
'''fork-marker-track-a''',
'''fork-marker-track-b>=2.8; sys_platform == "linux"''',
Expand Down Expand Up @@ -575,6 +579,7 @@ fn fork_non_fork_marker_transitive() -> Result<()> {
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.8"
dependencies = [
'''fork-non-fork-marker-transitive-a==1.0.0''',
'''fork-non-fork-marker-transitive-b==1.0.0''',
Expand Down Expand Up @@ -698,6 +703,7 @@ fn fork_non_local_fork_marker_direct() -> Result<()> {
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.8"
dependencies = [
'''fork-non-local-fork-marker-direct-a==1.0.0; sys_platform == "linux"''',
'''fork-non-local-fork-marker-direct-b==1.0.0; sys_platform == "darwin"''',
Expand Down Expand Up @@ -771,6 +777,7 @@ fn fork_non_local_fork_marker_transitive() -> Result<()> {
[project]
name = "project"
version = "0.1.0"
requires-python = ">=3.8"
dependencies = [
'''fork-non-local-fork-marker-transitive-a==1.0.0''',
'''fork-non-local-fork-marker-transitive-b==1.0.0''',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "bird-feeder"
version = "1.0.0"
requires-python = ">=3.12"
dependencies = ["anyio>=4.3.0,<5"]

[build-system]
Expand Down
1 change: 1 addition & 0 deletions scripts/workspaces/albatross-in-example/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "albatross"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["tqdm>=4,<5"]

[build-system]
Expand Down
1 change: 1 addition & 0 deletions scripts/workspaces/albatross-just-project/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "albatross"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["tqdm>=4,<5"]

[build-system]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "bird-feeder"
version = "1.0.0"
requires-python = ">=3.12"
dependencies = ["anyio>=4.3.0,<5"]

[build-system]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "albatross"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["tqdm>=4,<5"]

[tool.uv.workspace]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "bird-feeder"
version = "1.0.0"
requires-python = ">=3.12"
dependencies = ["anyio>=4.3.0,<5", "seeds"]

[tool.uv.sources]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "seeds"
version = "1.0.0"
requires-python = ">=3.12"
dependencies = ["idna==3.6"]

[build-system]
Expand Down
1 change: 1 addition & 0 deletions scripts/workspaces/albatross-root-workspace/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "albatross"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["bird-feeder", "tqdm>=4,<5"]

[tool.uv.sources]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "albatross"
version = "0.1.0"
requires-python = ">=3.12"
dependencies = ["bird-feeder", "tqdm>=4,<5"]

[tool.uv.sources]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "bird-feeder"
version = "1.0.0"
requires-python = ">=3.12"
dependencies = ["anyio>=4.3.0,<5", "seeds"]

[tool.uv.sources]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[project]
name = "seeds"
version = "1.0.0"
requires-python = ">=3.12"
dependencies = ["idna==3.6"]

[build-system]
Expand Down

0 comments on commit 34aba12

Please sign in to comment.