From 4d12d17b2ef7c44f3df1acd6ca69311a22418567 Mon Sep 17 00:00:00 2001 From: Alex Luck Date: Sat, 30 Aug 2025 20:17:34 -0500 Subject: [PATCH 1/4] explicit extras for build to exclude docs, dev --- .github/workflows/python_build.yaml | 8 +++++++- python/pyproject.toml | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python_build.yaml b/.github/workflows/python_build.yaml index 81b9177b6..0aa2a7f34 100644 --- a/.github/workflows/python_build.yaml +++ b/.github/workflows/python_build.yaml @@ -124,7 +124,13 @@ jobs: shell: bash run: | # Generate requirements file with all extras - pip-compile pyproject.toml --all-extras -o requirements-all.txt + pip-compile pyproject.toml \ + --extra tdms \ + --extra hdf5 \ + --extra sift-stream \ + --extra rosbags \ + --extra openssl \ + -o requirements-all.txt - name: Build dependency wheels working-directory: python diff --git a/python/pyproject.toml b/python/pyproject.toml index b51621220..4a5726467 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -62,6 +62,8 @@ tdms = ["npTDMS~=1.9"] rosbags = ["rosbags~=0.0"] sift-stream = ["sift-stream-bindings>=0.1.2"] hdf5 = ["h5py~=3.11", "polars~=1.8"] +# Ensure any new user build extras are added to .github/workflows/python_build.yaml + [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" From e72a3fc2a7ad5bfc67c35aebe5fbc4f15f8b0124 Mon Sep 17 00:00:00 2001 From: Alex Luck Date: Sat, 30 Aug 2025 20:22:53 -0500 Subject: [PATCH 2/4] explicit extras for build to exclude docs, dev --- .github/workflows/python_build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python_build.yaml b/.github/workflows/python_build.yaml index 0aa2a7f34..275af6c58 100644 --- a/.github/workflows/python_build.yaml +++ b/.github/workflows/python_build.yaml @@ -125,6 +125,7 @@ jobs: run: | # Generate requirements file with all extras pip-compile pyproject.toml \ + --extra build \ --extra tdms \ --extra hdf5 \ --extra sift-stream \ From 03b8aef867cb3b0e9265948771e22945f0ac7a8f Mon Sep 17 00:00:00 2001 From: Alex Luck Date: Sat, 30 Aug 2025 20:29:50 -0500 Subject: [PATCH 3/4] remove "development" and "docs" from build combination testing --- python/scripts/build_utils.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/python/scripts/build_utils.py b/python/scripts/build_utils.py index dd78afac1..607a95656 100644 --- a/python/scripts/build_utils.py +++ b/python/scripts/build_utils.py @@ -34,18 +34,25 @@ def get_extras_from_wheel(wheel_path: str) -> List[str]: return extras -def get_extra_combinations(extras: List[str]) -> List[str]: +def get_extra_combinations(extras: List[str], exclude: Optional[List[str]] = None) -> List[str]: """Generate all possible combinations of extras. Args: extras: List of extra names to generate combinations from. + exclude: Optional list of extra names to exclude from combinations. Returns: List of comma-separated strings representing each combination of extras. """ + # Filter out excluded extras + if exclude: + filtered_extras = [extra for extra in extras if extra not in exclude] + else: + filtered_extras = extras + all_combinations = [] - for r in range(len(extras) + 1): - all_combinations.extend(",".join(c) for c in combinations(extras, r)) + for r in range(len(filtered_extras) + 1): + all_combinations.extend(",".join(c) for c in combinations(filtered_extras, r)) return all_combinations @@ -100,7 +107,7 @@ def main(): # Get all extras from the wheel extras = get_extras_from_wheel(str(wheel_file)) - combinations = get_extra_combinations(extras) + combinations = get_extra_combinations(extras, ["development","docs"]) # Test base installation first test_install( From 3695034add83a625ec4b13c6d8f5139464e17ea3 Mon Sep 17 00:00:00 2001 From: Alex Luck Date: Sat, 30 Aug 2025 20:44:04 -0500 Subject: [PATCH 4/4] linting --- python/scripts/build_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/scripts/build_utils.py b/python/scripts/build_utils.py index 607a95656..877658faa 100644 --- a/python/scripts/build_utils.py +++ b/python/scripts/build_utils.py @@ -107,7 +107,7 @@ def main(): # Get all extras from the wheel extras = get_extras_from_wheel(str(wheel_file)) - combinations = get_extra_combinations(extras, ["development","docs"]) + combinations = get_extra_combinations(extras, ["development", "docs"]) # Test base installation first test_install(