Skip to content

Commit 75aaec4

Browse files
committed
Remove wheel dependency
1 parent 711b137 commit 75aaec4

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.github/workflows/build_wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
CMAKE_GENERATOR_PLATFORM=x64
4949
CMAKE_BUILD_PARALLEL_LEVEL=${{ steps.get_num_cores.outputs.count }}
5050
CIBW_ARCHS: AMD64
51-
CIBW_BEFORE_BUILD: python -m pip install setuptools wheel delvewheel # skip CasADi and CMake
51+
CIBW_BEFORE_BUILD: python -m pip install setuptools delvewheel # skip CasADi and CMake
5252
CIBW_REPAIR_WHEEL_COMMAND: delvewheel repair --add-path C:/Windows/System32 -w {dest_dir} {wheel}
5353
CIBW_TEST_EXTRAS: "dev"
5454
CIBW_TEST_COMMAND: |
@@ -203,7 +203,7 @@ jobs:
203203
# 10.13 for Intel (macos-13), 11.0 for Apple Silicon (macos-14 and macos-latest)
204204
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-14' && '11.0' || '10.13' }}
205205
CIBW_ARCHS_MACOS: auto
206-
CIBW_BEFORE_BUILD: python -m pip install cmake casadi setuptools wheel delocate
206+
CIBW_BEFORE_BUILD: python -m pip install cmake casadi setuptools delocate
207207
CIBW_REPAIR_WHEEL_COMMAND: |
208208
if [[ $(uname -m) == "x86_64" ]]; then
209209
delocate-listdeps {wheel} && delocate-wheel -v -w {dest_dir} {wheel}

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = [
3-
"setuptools>=64",
4-
"wheel",
3+
"setuptools>=70.1.1",
54
# On Windows, use the CasADi vcpkg registry and CMake bundled from MSVC
65
"casadi>=3.6.7; platform_system!='Windows'",
76
# Note: the version of CasADi as a build-time dependency should be matched

setup.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
from multiprocessing import cpu_count
55
from pathlib import Path
66
from platform import system
7-
import wheel.bdist_wheel as orig
87

98
from setuptools import setup, Extension
109
from setuptools.command.install import install
1110
from setuptools.command.build_ext import build_ext
11+
from setuptools.command.bdist_wheel import bdist_wheel
1212

1313

1414
default_lib_dir = (
@@ -207,29 +207,29 @@ def run(self):
207207
# ---------- Custom class for building wheels ------------------------------------------
208208

209209

210-
class bdist_wheel(orig.bdist_wheel):
210+
class PyBaMMWheel(bdist_wheel):
211211
"""A custom installation command to add 2 build options"""
212212

213213
user_options = [
214-
*orig.bdist_wheel.user_options,
214+
*bdist_wheel.user_options,
215215
("suitesparse-root=", None, "suitesparse source location"),
216216
("sundials-root=", None, "sundials source location"),
217217
]
218218

219219
def initialize_options(self):
220-
orig.bdist_wheel.initialize_options(self)
220+
bdist_wheel.initialize_options(self)
221221
self.suitesparse_root = None
222222
self.sundials_root = None
223223

224224
def finalize_options(self):
225-
orig.bdist_wheel.finalize_options(self)
225+
bdist_wheel.finalize_options(self)
226226
if not self.suitesparse_root:
227227
self.suitesparse_root = default_lib_dir
228228
if not self.sundials_root:
229229
self.sundials_root = default_lib_dir
230230

231231
def run(self):
232-
orig.bdist_wheel.run(self)
232+
bdist_wheel.run(self)
233233

234234

235235
ext_modules = [
@@ -288,7 +288,7 @@ def run(self):
288288
ext_modules=ext_modules,
289289
cmdclass={
290290
"build_ext": CMakeBuild,
291-
"bdist_wheel": bdist_wheel,
291+
"bdist_wheel": PyBaMMWheel,
292292
"install": CustomInstall,
293293
},
294294
)

0 commit comments

Comments
 (0)