Skip to content

Commit

Permalink
Add support for building bdist_wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Nov 1, 2023
1 parent 54b5356 commit 775a8c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "setuptools-scm"]
requires = ["setuptools", "setuptools-scm", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 775a8c5

Please sign in to comment.