Support for wheel packages.
diff --git a/setup.py b/setup.py
index f05558e..37ab89b 100644
--- a/setup.py
+++ b/setup.py
@@ -82,6 +82,11 @@
except ImportError:
pass
+try:
+ from wheel.bdist_wheel import bdist_wheel
+except ImportError:
+ bdist_wheel = None
+
class Distribution(_Distribution):
@@ -300,6 +305,15 @@
raise DistutilsError("Tests failed")
+cmdclass = {
+ 'build_ext': build_ext,
+ 'bdist_rpm': bdist_rpm,
+ 'test': test,
+}
+if bdist_wheel:
+ cmdclass['bdist_wheel'] = bdist_wheel
+
+
if __name__ == '__main__':
setup(
@@ -324,11 +338,6 @@
],
distclass=Distribution,
-
- cmdclass={
- 'build_ext': build_ext,
- 'bdist_rpm': bdist_rpm,
- 'test': test,
- },
+ cmdclass=cmdclass,
)