Skip to content

Commit

Permalink
Merge pull request bastibe#126 from bastibe/wheel-fun
Browse files Browse the repository at this point in the history
Wheels are now os-dependent but python-independent
  • Loading branch information
bastibe committed Apr 12, 2015
2 parents b3d35f3 + cecbc6a commit 3295675
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,31 @@ def run_tests(self):
sys.exit(errno)


cmdclass = {'test': PyTest}
try:
from wheel.bdist_wheel import bdist_wheel
except ImportError:
pass
else:
# This will create OS-dependent, but Python-independent wheels
class bdist_wheel_half_pure(bdist_wheel):
def 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'
elif platform == 'win32':
if architecture0 == '32bit':
oses = 'win32'
else:
oses = 'win_amd64'
else:
pythons = 'py2.py3'
oses = 'any'
return pythons, 'none', oses

cmdclass['bdist_wheel'] = bdist_wheel_half_pure

setup(
name='PySoundFile',
version='0.7.0',
Expand Down Expand Up @@ -74,5 +99,5 @@ def run_tests(self):
],
long_description=open('README.rst').read(),
tests_require=['pytest'],
cmdclass={'test': PyTest},
cmdclass=cmdclass,
)

0 comments on commit 3295675

Please sign in to comment.