diff --git a/setup.py b/setup.py index 13045e88d..d3b2587fc 100644 --- a/setup.py +++ b/setup.py @@ -66,14 +66,34 @@ def run(self): self.failure = self.failure or package_failure +try: + from wheel.bdist_wheel import bdist_wheel + class bdist_wheel_win(bdist_wheel): + def get_tag(self): + win_plats = ( # Copied the list from DistUtils + "win-amd64", + "win32", + "win-arm64", + "win-arm32", + ) + tag = super().get_tag() + return tuple(tag[:-1]) + (".".join(wp.replace("-", "_") for wp in win_plats),) + +except ImportError: + bdist_wheel_win = None + + classifiers = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: Microsoft :: Windows', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Topic :: Software Development :: Libraries :: Python Modules', ] @@ -151,6 +171,7 @@ def run(self): cmdclass={ 'test': test, 'build_py': build_py, + 'bdist_wheel': bdist_wheel_win, 'install': post_install, }, @@ -162,6 +183,9 @@ def run(self): "comtypes.tools", "comtypes.test", ], + + platforms=["Windows"], + python_requires=">=3.7", ) if __name__ == '__main__':