Skip to content

Commit 1ad78bd

Browse files
committed
Revert "universal wheels"
This reverts commit 2f6befe.
1 parent 2f6befe commit 1ad78bd

File tree

2 files changed

+6
-47
lines changed

2 files changed

+6
-47
lines changed

devtools/subproject.py

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import os
21
import pathlib
32
import subprocess
43
import shlex
54
import shutil
65
import sys
76
import tempfile
8-
import textwrap
97
import typing as T
108

119
from packaging.requirements import Requirement
@@ -45,14 +43,9 @@ def is_meson_project(self) -> bool:
4543
# Tasks
4644
#
4745

48-
def _cmd(self, *args: str, cwd=None, env=None):
46+
def _cmd(self, *args: str, cwd=None):
4947
print("+", shlex.join(args))
50-
if env:
51-
envc = os.environ.copy()
52-
envc.update(env)
53-
env = envc
54-
55-
subprocess.check_call(args, cwd=cwd, env=env)
48+
subprocess.check_call(args, cwd=cwd)
5649

5750
def _run_pip(self, *args: str, cwd=None):
5851
self._cmd(
@@ -126,8 +119,6 @@ def build_wheel(
126119
# TODO: eventually it would be nice to use build isolation
127120

128121
with tempfile.TemporaryDirectory() as td:
129-
tdp = pathlib.Path(td)
130-
131122
# I wonder if we should use hatch build instead?
132123
self._cmd(
133124
sys.executable,
@@ -140,39 +131,9 @@ def build_wheel(
140131
cwd=self.path,
141132
)
142133

143-
# On macOS we need to build two wheels and merge them together to build
144-
# a universal wheel. Fun?
145-
# - Since this script is for CI, we assume that we are building on arm64
146-
if sys.platform == "darwin" and self.is_meson_project():
147-
148-
self._cmd(
149-
sys.executable,
150-
"-m",
151-
"build",
152-
"--no-isolation",
153-
"--outdir",
154-
td,
155-
*config_args,
156-
cwd=self.path,
157-
env=dict(ARCHFLAGS="-arch x86_64", SEMIWRAP_SKIP_PYI="1"),
158-
)
159-
160-
native_wheels = list(map(str, tdp.glob("*.whl")))
161-
162-
self._cmd(
163-
sys.executable,
164-
"-m",
165-
"delocate.cmd.delocate_merge",
166-
"-vv",
167-
*native_wheels,
168-
)
169-
170-
twhl = (set(map(str, tdp.glob("*.whl"))) - set(native_wheels)).pop()
171-
dst_whl = wheel_path / pathlib.Path(twhl).name
172-
else:
173-
twhl = list(tdp.glob("*.whl"))[0]
174-
dst_whl = wheel_path / self._fix_wheel_name(twhl.name)
175-
134+
tdp = pathlib.Path(td)
135+
twhl = list(tdp.glob("*.whl"))[0]
136+
dst_whl = wheel_path / self._fix_wheel_name(twhl.name)
176137
shutil.move(twhl, dst_whl)
177138

178139
if install:

rdev_requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ toposort
1010
validobj~=1.2
1111
wheel
1212

13-
delocate; platform_system == 'Darwin'
14-
15-
hatch-meson @ git+https://github.com/virtuald/hatch-meson@more-macos-cross-binaries
1613
semiwrap @ git+https://github.com/robotpy/robotpy-build@semiwrap
14+
hatch-meson
1715
hatch-robotpy @ git+https://github.com/robotpy/hatch-robotpy@main
1816
hatch-nativelib @ git+https://github.com/robotpy/hatch-nativelib@rm-macos-relink
1917
ninja

0 commit comments

Comments
 (0)