Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 244e761

Browse files
committed
As of OS X 10.1.1 the version numbering scheme has changed. Convert all "darwin*" to "darwin" and use that for testing.
1 parent 2d4e03b commit 244e761

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def build_extensions(self):
9292

9393
# Platform-dependent module source and include directories
9494
platform = self.get_platform()
95-
if platform == 'darwin1':
95+
if platform == 'darwin':
9696
# Mac OS X also includes some mac-specific modules
9797
macmoddir = os.path.join(os.getcwd(), srcdir, 'Mac/Modules')
9898
moddirlist.append(macmoddir)
@@ -177,6 +177,8 @@ def get_platform (self):
177177
platform = 'cygwin'
178178
elif platform[:4] =='beos':
179179
platform = 'beos'
180+
elif platform[:6] == 'darwin':
181+
platform = 'darwin'
180182

181183
return platform
182184

@@ -203,7 +205,7 @@ def detect_modules(self):
203205

204206
# Check for MacOS X, which doesn't need libm.a at all
205207
math_libs = ['m']
206-
if platform in ['Darwin1.2', 'beos']:
208+
if platform in ['darwin', 'beos']:
207209
math_libs = []
208210

209211
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
@@ -459,7 +461,7 @@ def detect_modules(self):
459461
curses_libs = ['ncurses']
460462
exts.append( Extension('_curses', ['_cursesmodule.c'],
461463
libraries = curses_libs) )
462-
elif (self.compiler.find_library_file(lib_dirs, 'curses')) and platform != 'darwin1':
464+
elif (self.compiler.find_library_file(lib_dirs, 'curses')) and platform != 'darwin':
463465
# OSX has an old Berkeley curses, not good enough for the _curses module.
464466
if (self.compiler.find_library_file(lib_dirs, 'terminfo')):
465467
curses_libs = ['curses', 'terminfo']
@@ -561,7 +563,7 @@ def detect_modules(self):
561563
# SunOS specific modules
562564
exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
563565

564-
if platform == 'darwin1':
566+
if platform == 'darwin':
565567
# Mac OS X specific modules. These are ported over from MacPython
566568
# and still experimental. Some (such as gestalt or icglue) are
567569
# already generally useful, some (the GUI ones) really need to

0 commit comments

Comments
 (0)