Skip to content

Commit

Permalink
better but backwards incompatible fix
Browse files Browse the repository at this point in the history
Using the `bdist.format_command`  property is not possible and not required anymore. The property was removed in setuptools 63.4.0 (commit c0a4ea65ab68c8c6cb6ad54cc646c58bede6f0f4 on the setuptools repo).

So with setuptools 63.4.0 it is enough to update the `format_commands` dict, however this also requires setuptools 63.4.0 to work. If setuptools <63.4.0 is required, then the previous commit offers a solution.
  • Loading branch information
StefanD986 committed Aug 3, 2022
1 parent 318c6b4 commit aadd766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def main():
py_modules=["setuptools_cythonize"],
include_package_data=True,
install_requires=[
'setuptools>=36.2.0, <=63.3.0',
'setuptools>=63.4.0',
'wheel>=0.29.0',
'cython>=0.25.2'
],
Expand Down
3 changes: 1 addition & 2 deletions setuptools_cythonize.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ def set_default_wheel_format(cls):
"""Set 'wheel' as default format.
"""
if "wheel" not in cls.format_commands:
cls.format_command['wheel'] = ('bdist_wheel', "Python .whl file")
cls.format_commands.append('wheel')
cls.format_commands['wheel'] = ('bdist_wheel', "Python .whl file")
for keyos in cls.default_format:
cls.default_format[keyos] = 'wheel'

Expand Down

0 comments on commit aadd766

Please sign in to comment.