exclude docs from wheel; harden bundle item handling; single-source version
This commit is contained in:
+15
-2
@@ -28,14 +28,25 @@ def test_pyproject_dependencies(packaging_utils):
|
||||
|
||||
|
||||
def test_pyproject_dynamic_version(packaging_utils):
|
||||
"""The dynamic version must resolve to a valid version from one source.
|
||||
|
||||
Deliberately does NOT assert a literal version: pinning it here means every
|
||||
release has to edit this file too. ``src/orisys/__init__.py::__version__`` is
|
||||
the single source of truth, and build/release/version.py checks that the
|
||||
wheels agree with it.
|
||||
"""
|
||||
import re
|
||||
import sys
|
||||
|
||||
build_dir = REPO_ROOT / "build"
|
||||
if str(build_dir) not in sys.path:
|
||||
sys.path.insert(0, str(build_dir))
|
||||
from common.pyproject_utils import get_version
|
||||
from release.version import dynamic_version_attr
|
||||
|
||||
assert get_version(REPO_ROOT) == "0.5.2"
|
||||
version = get_version(REPO_ROOT)
|
||||
assert re.fullmatch(r"\d+(?:\.\d+)+(?:[-+][0-9A-Za-z.]+)?", version), version
|
||||
assert dynamic_version_attr(REPO_ROOT) == "orisys.__version__"
|
||||
|
||||
|
||||
def test_pyproject_bundle_manifest(packaging_utils):
|
||||
@@ -48,7 +59,9 @@ def test_pyproject_bundle_manifest(packaging_utils):
|
||||
|
||||
items = bundle_items(REPO_ROOT)
|
||||
names = {item["name"] for item in items}
|
||||
assert names == {"configs", "examples", "docs", "sensors"}
|
||||
# docs/ is intentionally not bundled: it ships with the GitHub repo and the
|
||||
# PyPI project page only, so doc edits do not invalidate built wheels.
|
||||
assert names == {"configs", "examples", "sensors"}
|
||||
|
||||
data_files = dict(bundle_data_files(REPO_ROOT))
|
||||
assert "orisys/configs" in data_files
|
||||
|
||||
Reference in New Issue
Block a user