Skip to content

Commit

Permalink
Add test cases for using different direct URLs in forks
Browse files Browse the repository at this point in the history
Add test packages for different cases we want or don't want to support.
  • Loading branch information
konstin committed Jun 24, 2024
1 parent 4965708 commit eea3fef
Show file tree
Hide file tree
Showing 33 changed files with 235 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/branching-urls/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uv.lock
Empty file.
14 changes: 14 additions & 0 deletions scripts/branching-urls/a1-root-allowed/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
name = "a"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
# Valid, disjoint split
"iniconfig @ https://files.pythonhosted.org/packages/9b/dd/b3c12c6d707058fa947864b67f0c4e0c39ef8610988d7baea9578f3c48f3/iniconfig-1.1.1-py2.py3-none-any.whl ; python_version < '3.12'",
"iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl ; python_version >= '3.12'",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
14 changes: 14 additions & 0 deletions scripts/branching-urls/a2-root-conflict/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
name = "a"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
# Conflicting split
"iniconfig @ https://files.pythonhosted.org/packages/9b/dd/b3c12c6d707058fa947864b67f0c4e0c39ef8610988d7baea9578f3c48f3/iniconfig-1.1.1-py2.py3-none-any.whl ; python_version < '3.12'",
"iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl ; python_version >= '3.11'",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
Empty file.
17 changes: 17 additions & 0 deletions scripts/branching-urls/a3-transitive-conflict/b/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[project]
name = "b"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
"b1",
"b2",
]
requires-python = ">=3.11,<3.13"

[tool.uv.sources]
b1 = { path = "../b1" }
b2 = { path = "../b2" }

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
12 changes: 12 additions & 0 deletions scripts/branching-urls/a3-transitive-conflict/b1/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "b1"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
"iniconfig @ https://files.pythonhosted.org/packages/9b/dd/b3c12c6d707058fa947864b67f0c4e0c39ef8610988d7baea9578f3c48f3/iniconfig-1.1.1-py2.py3-none-any.whl",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
12 changes: 12 additions & 0 deletions scripts/branching-urls/a3-transitive-conflict/b2/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "b2"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
"iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
18 changes: 18 additions & 0 deletions scripts/branching-urls/a3-transitive-conflict/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[project]
name = "a"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
# Force a split
"anyio==4.3.0 ; python_version >= '3.12'",
"anyio==4.2.0 ; python_version < '3.12'",
"b"
]
requires-python = ">=3.11,<3.13"

[tool.uv.sources]
b = { path = "b" }

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
Empty file.
18 changes: 18 additions & 0 deletions scripts/branching-urls/a4-transitive-allowed/b/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[project]
name = "b"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
# Only one is used in each split.
"b1 ; python_version < '3.12'",
"b2 ; python_version >= '3.12'",
]
requires-python = ">=3.11,<3.13"

[tool.uv.sources]
b1 = { path = "../b1" }
b2 = { path = "../b2" }

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
12 changes: 12 additions & 0 deletions scripts/branching-urls/a4-transitive-allowed/b1/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "b1"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
"iniconfig @ https://files.pythonhosted.org/packages/9b/dd/b3c12c6d707058fa947864b67f0c4e0c39ef8610988d7baea9578f3c48f3/iniconfig-1.1.1-py2.py3-none-any.whl",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
12 changes: 12 additions & 0 deletions scripts/branching-urls/a4-transitive-allowed/b2/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "b2"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
"iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
19 changes: 19 additions & 0 deletions scripts/branching-urls/a4-transitive-allowed/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[project]
name = "a"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
# Force a split
"anyio==4.3.0 ; python_version >= '3.12'",
"anyio==4.2.0 ; python_version < '3.12'",
# Include URLs transitively
"b"
]
requires-python = ">=3.11,<3.13"

[tool.uv.sources]
b = { path = "b" }

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
Empty file.
12 changes: 12 additions & 0 deletions scripts/branching-urls/a5-fork-in-root/b1/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "b1"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
"iniconfig==1.1.1",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
12 changes: 12 additions & 0 deletions scripts/branching-urls/a5-fork-in-root/b2/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[project]
name = "b2"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
"iniconfig==2.0.0",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
21 changes: 21 additions & 0 deletions scripts/branching-urls/a5-fork-in-root/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[project]
name = "a"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
# Force a split
"anyio==4.3.0 ; python_version >= '3.12'",
"anyio==4.2.0 ; python_version < '3.12'",
# These two are currently included in both parts of the split.
"b1 ; python_version < '3.12'",
"b2 ; python_version >= '3.12'",
]
requires-python = ">=3.11,<3.13"

[tool.uv.sources]
b1 = { path = "b1" }
b2 = { path = "b2" }

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[project]
name = "a"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
"iniconfig == 1.1.1 ; python_version < '3.12'",
"iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl ; python_version >= '3.12'",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
name = "a"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
# Valid, disjoint split
"iniconfig @ https://files.pythonhosted.org/packages/9b/dd/b3c12c6d707058fa947864b67f0c4e0c39ef8610988d7baea9578f3c48f3/iniconfig-1.1.1-py2.py3-none-any.whl ; python_version < '3.12'",
"iniconfig @ git+https://github.com/pytest-dev/iniconfig@93f5930e668c0d1ddf4597e38dd0dea4e2665e7a ; python_version >= '3.12'",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[project]
name = "a"
version = "0.1.0"
description = "Test package for direct URLs in branches"
dependencies = [
# Conflicting split
"iniconfig @ https://files.pythonhosted.org/packages/9b/dd/b3c12c6d707058fa947864b67f0c4e0c39ef8610988d7baea9578f3c48f3/iniconfig-1.1.1-py2.py3-none-any.whl ; python_version < '3.12'",
"iniconfig @ git+https://github.com/pytest-dev/iniconfig@93f5930e668c0d1ddf4597e38dd0dea4e2665e7a ; python_version >= '3.11'",
]
requires-python = ">=3.11,<3.13"

[build-system]
requires = ["flit_core>=3.8,<4"]
build-backend = "flit_core.buildapi"

0 comments on commit eea3fef

Please sign in to comment.