Skip to content

Commit

Permalink
Merge pull request #1219 from mattrobenolt/wheel
Browse files Browse the repository at this point in the history
Compile properly platform tagged wheel
  • Loading branch information
xrmx committed Mar 28, 2016
2 parents 58084ce + 7ebe957 commit 56bf91d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
from setuptools.command.install_lib import install_lib
from setuptools.command.build_ext import build_ext

try:
from wheel.bdist_wheel import bdist_wheel
HAS_WHEEL = True
except ImportError:
HAS_WHEEL = False

"""
This is a hack allowing you installing
uWSGI and uwsgidecorators via pip and easy_install
Expand Down Expand Up @@ -86,13 +92,22 @@ def run(self):
install_lib.run(self)


if HAS_WHEEL:
class uWSGIWheel(bdist_wheel):
def finalize_options(self):
bdist_wheel.finalize_options(self)
self.root_is_pure = False


class uWSGIDistribution(Distribution):

def __init__(self, *attrs):
Distribution.__init__(self, *attrs)
self.cmdclass['install'] = uWSGIInstall
self.cmdclass['install_lib'] = uWSGIInstallLib
self.cmdclass['build_ext'] = uWSGIBuilder
if HAS_WHEEL:
self.cmdclass['bdist_wheel'] = uWSGIWheel

def is_pure(self):
return False
Expand Down

0 comments on commit 56bf91d

Please sign in to comment.