Skip to content

Commit 534bb5e

Browse files
committed
fix macos build
1 parent 7372184 commit 534bb5e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/scripts/build-macos.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ set -x
2929
popd
3030

3131
# Install dependencies
32-
pip install numpy==$NUMPY_VERSION wheel delocate
32+
pip install numpy==$NUMPY_VERSION wheel delocate setuptools
3333

3434
# List installed packages
3535
pip freeze

setup.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import platform
44
import sys
55
import glob
6-
from distutils.unixccompiler import UnixCCompiler
76
from setuptools import setup, Extension, find_packages
87
from setuptools.command.build_ext import build_ext
98
import setuptools
109

10+
from distutils.unixccompiler import UnixCCompiler
11+
1112
class get_pybind_include(object):
1213
"""Helper class to determine the pybind11 include path
1314
The purpose of this class is to postpone importing pybind11
@@ -85,7 +86,7 @@ def has_flag(compiler, flagname):
8586
fname = f.name
8687
try:
8788
compiler.compile([fname], extra_postargs=[flagname])
88-
except setuptools.distutils.errors.CompileError:
89+
except setuptools.errors.CompileError:
8990
return False
9091
finally:
9192
try:

0 commit comments

Comments
 (0)