diff --git a/pyproject.toml b/pyproject.toml index 9ef6463..d080d8c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools", "setuptools-scm"] +requires = ["setuptools", "setuptools-scm", "wheel"] build-backend = "setuptools.build_meta" [project] diff --git a/setup.py b/setup.py index cd48e48..226d889 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,8 @@ from setuptools import setup, Extension from setuptools.command.build_ext import build_ext +from wheel.bdist_wheel import bdist_wheel + # These were only added to setuptools in 59.0.1. try: @@ -96,10 +98,12 @@ def find_packages(location): def run_setup(with_cext): kwargs = {} + loc_cmdclass = cmdclass.copy() if with_cext: kwargs["ext_modules"] = ext_module + loc_cmdclass["bdist_wheel"] = bdist_wheel - setup(version=VERSION, cmdclass=cmdclass, **kwargs) + setup(version=VERSION, cmdclass=loc_cmdclass, **kwargs) if PYPY or JYTHON: