@@ -43,28 +43,30 @@ def run_tests(self):
4343 sys .exit (errno )
4444
4545
46+ cmdclass = {'test' : PyTest }
4647try :
4748 from wheel .bdist_wheel import bdist_wheel
4849
49- class _bdist_wheel (bdist_wheel ):
50+ # This will create OS-dependent, but Python-independent wheels
51+ class bdist_wheel_half_pure (bdist_wheel ):
5052 def get_tag (self ):
51- tag = bdist_wheel .get_tag (self )
5253 pythons = 'py2.py3.cp26.cp27.cp32.cp33.cp34.cp35.pp27.pp32'
5354 if platform == 'darwin' :
54- oses = 'macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_5_x86_64'
55+ oses = 'macosx_10_6_intel.macosx_10_9_intel.' \
56+ 'macosx_10_9_x86_64.macosx_10_5_x86_64'
5557 elif platform == 'win32' :
5658 if architecture0 == '32bit' :
5759 oses = 'win32'
5860 else :
5961 oses = 'win_amd64'
6062 else :
63+ pythons = 'py2.py3'
6164 oses = 'any'
62- tag = (pythons , 'none' , oses )
63- return tag
65+ return pythons , 'none' , oses
6466
65- cmdclass = { 'bdist_wheel' : _bdist_wheel }
67+ cmdclass [ 'bdist_wheel' ] = bdist_wheel_half_pure
6668except ImportError :
67- cmdclass = {}
69+ pass
6870
6971setup (
7072 name = 'PySoundFile' ,
@@ -97,5 +99,5 @@ def get_tag(self):
9799 ],
98100 long_description = open ('README.rst' ).read (),
99101 tests_require = ['pytest' ],
100- cmdclass = dict ( cmdclass , test = PyTest )
102+ cmdclass = cmdclass ,
101103)
0 commit comments