Skip to content

Commit 8e00162

Browse files
committed
Try to get the wheel
1 parent 0f561db commit 8e00162

File tree

2 files changed

+42
-23
lines changed

2 files changed

+42
-23
lines changed

.github/workflows/dist.yml

+24-13
Original file line numberDiff line numberDiff line change
@@ -90,27 +90,28 @@ jobs:
9090
max-parallel: ${{ fromJSON(needs.setup_concurrency.outputs.max-parallel).v }}
9191
fail-fast: false
9292
matrix:
93-
os: ["ubuntu-22.04", "macos-13", "windows-2022"]
93+
# os: ["ubuntu-22.04", "macos-13", "windows-2022"]
94+
os: ["windows-2022"]
9495
python_version:
95-
- '3.8'
96+
# - '3.8'
9697
- '3.9'
97-
- '3.10'
98-
- '3.11'
99-
- '3.12'
100-
- '3.13'
98+
# - '3.10'
99+
# - '3.11'
100+
# - '3.12'
101+
# - '3.13'
101102
architecture: [x64]
102103
# exclude:
103104
# - os: macos-13
104105
# architecture: x86
105106
# - os: ubuntu-22.04
106107
# architecture: x86
107-
include:
108-
- os: macos-14
109-
python_version: 3.9
110-
architecture: arm64
111-
- os: ubuntu-22.04-arm
112-
python_version: 3.11
113-
architecture: arm64
108+
# include:
109+
# - os: macos-14
110+
# python_version: 3.9
111+
# architecture: arm64
112+
# - os: ubuntu-22.04-arm
113+
# python_version: 3.11
114+
# architecture: arm64
114115

115116
steps:
116117
- uses: actions/checkout@v3
@@ -149,6 +150,16 @@ jobs:
149150
working-directory: tests
150151
run: python -m pip --disable-pip-version-check install -r requirements.txt
151152

153+
- name: Build wheel
154+
working-directory: tests/cpp/sw-test-base
155+
run: python -m build -n
156+
157+
- name: Upload build artifacts
158+
uses: actions/upload-artifact@v4
159+
with:
160+
name: test-dist
161+
path: tests/cpp/sw-test-base/dist
162+
152163
- name: Test wheel
153164
working-directory: tests
154165
run: python run_tests.py

src/semiwrap/makeplan.py

+18-10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import collections
44
import dataclasses
5+
import os
56
import pathlib
67
import pprint
78
import sys
@@ -150,16 +151,23 @@ def generate(self):
150151

151152
yield from self._process_extension_module(package_name, extension)
152153

153-
# Make a pyi for every module
154-
# - they depend on every module because it needs a working environment
155-
# and the user might import something
156-
# - if there's a subpkg this fails, need to think about it
157-
for pyi_target in self.pyi_targets:
158-
yield BuildTarget(
159-
command="make-pyi",
160-
args=pyi_target.args + tuple(self.pyi_args),
161-
install_path=pyi_target.install_path,
162-
)
154+
# TODO: this conditional probably should be done in the build system instead
155+
# cannot build pyi files when cross-compiling
156+
if not (
157+
"_PYTHON_HOST_PLATFORM" in os.environ
158+
or "PYTHON_CROSSENV" in os.environ
159+
or os.environ.get("SEMIWRAP_SKIP_PYI") == "1"
160+
):
161+
# Make a pyi for every module
162+
# - they depend on every module because it needs a working environment
163+
# and the user might import something
164+
# - if there's a subpkg this fails, need to think about it
165+
for pyi_target in self.pyi_targets:
166+
yield BuildTarget(
167+
command="make-pyi",
168+
args=pyi_target.args + tuple(self.pyi_args),
169+
install_path=pyi_target.install_path,
170+
)
163171

164172
def _resolve_dep(self, dname: str):
165173
return self.local_dependencies.get(dname, dname)

0 commit comments

Comments
 (0)