Skip to content

Commit

Permalink
small refinements to setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
bastibe committed Apr 12, 2015
1 parent 6579984 commit 14c1a21
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,30 @@ def run_tests(self):
sys.exit(errno)


cmdclass = {'test': PyTest}
try:
from wheel.bdist_wheel import bdist_wheel

class _bdist_wheel(bdist_wheel):
# This will create OS-dependent, but Python-independent wheels
class bdist_wheel_half_pure(bdist_wheel):
def get_tag(self):
tag = bdist_wheel.get_tag(self)
pythons = 'py2.py3.cp26.cp27.cp32.cp33.cp34.cp35.pp27.pp32'
if platform == 'darwin':
oses = 'macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_5_x86_64'
oses = 'macosx_10_6_intel.macosx_10_9_intel.' \
'macosx_10_9_x86_64.macosx_10_5_x86_64'
elif platform == 'win32':
if architecture0 == '32bit':
oses = 'win32'
else:
oses = 'win_amd64'
else:
pythons = 'py2.py3'
oses = 'any'
tag = (pythons, 'none', oses)
return tag
return pythons, 'none', oses

cmdclass = {'bdist_wheel': _bdist_wheel}
cmdclass['bdist_wheel'] = bdist_wheel_half_pure
except ImportError:
cmdclass = {}
pass

setup(
name='PySoundFile',
Expand Down Expand Up @@ -97,5 +99,5 @@ def get_tag(self):
],
long_description=open('README.rst').read(),
tests_require=['pytest'],
cmdclass=dict(cmdclass, test=PyTest)
cmdclass=cmdclass,
)

0 comments on commit 14c1a21

Please sign in to comment.