Skip to content

Commit 00e126f

Browse files
committed
Fix bdist_wheel support
1 parent 8aff3c8 commit 00e126f

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

setup.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,21 @@ def run(self):
203203
_install.run(self)
204204
self.cmake_install()
205205

206+
cmdclass={
207+
'build': BuildWithCmake,
208+
'build_ext': BuildExtWithCmake,
209+
'install': InstallWithCmake,
210+
}
211+
212+
try:
213+
from wheel.bdist_wheel import bdist_wheel
214+
class BdistWheelWithCmake(bdist_wheel):
215+
def finalize_options(self):
216+
bdist_wheel.finalize_options(self)
217+
self.root_is_pure = False
218+
cmdclass["bdist_wheel"] = BdistWheelWithCmake
219+
except ImportError:
220+
pass
206221

207222
long_description = '''
208223
SymEngine is a standalone fast C++ symbolic manipulation library.
@@ -218,11 +233,7 @@ def run(self):
218233
author_email="[email protected]",
219234
license="MIT",
220235
url="https://github.com/symengine/symengine.py",
221-
cmdclass={
222-
'build': BuildWithCmake,
223-
'build_ext': BuildExtWithCmake,
224-
'install': InstallWithCmake,
225-
},
236+
cmdclass = cmdclass,
226237
classifiers=[
227238
'License :: OSI Approved :: MIT License',
228239
'Operating System :: OS Independent',

0 commit comments

Comments
 (0)