Skip to content

Commit 61ddef4

Browse files
committed
fix: add tests for packaging issues related to pre-releases
Related: #4800 Related: #4795
1 parent b294d5b commit 61ddef4

File tree

3 files changed

+64
-11
lines changed

3 files changed

+64
-11
lines changed

pyproject.toml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ classifiers = [
3333
]
3434
dependencies = [
3535
"ansible-compat>=25.8.0", # indirect dependency of cryptography
36-
"ansible-core>=2.16.11", # indirect dependency of ansible-core
37-
"ansible-core>=2.20.0b1 ; python_full_version >= '3.14'", # indirect dependency of ansible-core
36+
"ansible-core>=2.16.11; python_version < '3.14'", # indirect dependency of ansible-core
37+
"ansible-core>=2.20.0b1 ; python_version >= '3.14'", # indirect dependency of ansible-core
3838
"black>=24.3.0", # indirect dependency of ansible-core
3939
"cffi>=1.17.1", # indirect dependency of ruamel-yaml
4040
"cryptography>=38",
@@ -44,14 +44,14 @@ dependencies = [
4444
"jsonschema>=4.10.0",
4545
"packaging>=22.0",
4646
"pathspec>=0.10.3",
47-
"pyyaml>=6.0.2",
48-
"pyyaml>=6.0.3 ; python_full_version < '3.14'", # py314 support
47+
"pyyaml>=6.0.2 ; python_version < '3.14'",
48+
"pyyaml>=6.0.3 ; python_version < '3.14'", # py314 support
4949
"referencing>=0.36.2",
5050
"ruamel-yaml>=0.18.11",
51-
"ruamel-yaml-clib>=0.2.12 ; python_full_version < '3.14'",
51+
"ruamel-yaml-clib>=0.2.12 ; python_version < '3.14'",
5252
"subprocess-tee>=0.4.1",
53-
"wcmatch>=8.1.2 ; python_full_version < '3.12'",
54-
"wcmatch>=8.5.0 ; python_full_version >= '3.12'",
53+
"wcmatch>=8.1.2 ; python_version < '3.12'",
54+
"wcmatch>=8.5.0 ; python_version >= '3.12'",
5555
"yamllint>=1.34.0",
5656
]
5757
dynamic = ["version"]
@@ -106,7 +106,13 @@ lint = [
106106
"pytest>=7.2.2",
107107
"setuptools>=51.1.1",
108108
]
109-
pkg = ["build>=0.9", "pip>=25.2", "pipx>=1.7.1", "twine>=4.0.1"]
109+
pkg = [
110+
"build>=0.9",
111+
"pip>=25.2",
112+
"pipx>=1.7.1",
113+
"setuptools-scm>=9.2.0",
114+
"twine>=4.0.1",
115+
]
110116
schemas = ["check-jsonschema>=0.26.3"]
111117

112118
[build-system]
@@ -720,6 +726,7 @@ commands = [
720726
"{tox_root}",
721727
],
722728
["sh", "-c", "python -m twine check --strict {tox_root}/dist/*"],
729+
["sh", "./tools/test-pkg.sh"],
723730
]
724731
commands_pre = []
725732
dependency_groups = ["pkg"]

tools/test-pkg.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
set -euxo pipefail
3+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
4+
5+
VERSION=$(python -m setuptools_scm)
6+
7+
TEST_DIR=${TOX_WORK_DIR:-.tox}/pkg/smoke
8+
mkdir -p "$TEST_DIR"
9+
rm -rf "${TEST_DIR:?}"/*
10+
11+
pushd "$TEST_DIR" > /dev/null
12+
13+
cat > pyproject.toml <<EOF
14+
[project]
15+
name = "2"
16+
version = "0.1.0"
17+
description = "Add your description here"
18+
readme = "README.md"
19+
requires-python = ">=3.13.7"
20+
dependencies = []
21+
22+
[[tool.uv.index]]
23+
name = "local"
24+
url = "../../../dist"
25+
format = "flat"
26+
EOF
27+
28+
uv add "ansible-lint==$VERSION"
29+
30+
popd > /dev/null

uv.lock

Lines changed: 19 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)