From 16a73bed2e3c237457c634801f6fce49cbe31a52 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Mon, 22 Dec 2025 12:13:39 -0800 Subject: [PATCH] move pyi generation to initialize and add asserts on pyi contents to publish step --- .github/workflows/publish.yml | 9 +++++++++ scripts/hatch_build.py | 11 ++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f4ce28306be..14908f87bc0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,5 +21,14 @@ jobs: - name: Build run: uv build + - name: Verify .pyi files in wheel + run: | + if unzip -l dist/*.whl | grep '\.pyi$'; then + echo "✓ .pyi files found in distribution" + else + echo "Error: No .pyi files found in wheel" + exit 1 + fi + - name: Publish run: uv publish diff --git a/scripts/hatch_build.py b/scripts/hatch_build.py index b4b67e0cfe6..088946c7393 100644 --- a/scripts/hatch_build.py +++ b/scripts/hatch_build.py @@ -25,15 +25,12 @@ def marker(self) -> pathlib.Path: / f".reflex-{self.metadata.version}.pyi_generated" ) - def finalize( - self, version: str, build_data: dict[str, Any], artifact_path: str - ) -> None: - """Finalize the build process. + def initialize(self, version: str, build_data: dict[str, Any]) -> None: + """Initialize the build hook. Args: - version: The version of the package. - build_data: The build data. - artifact_path: The path to the artifact. + version: The version being built. + build_data: Additional build data. """ if self.marker().exists(): return