diff --git a/cocoa/wscript b/cocoa/wscript index be897eac..76699339 100644 --- a/cocoa/wscript +++ b/cocoa/wscript @@ -1,5 +1,6 @@ #!/usr/bin/env python +import sys import os import os.path as op @@ -25,8 +26,9 @@ def configure(conf): # I did a lot of fiddling-around, but I didn't find how to tell WAF the Python library name # to look for without making the whole compilation process fail, so I just create a symlink # with the name WAF is looking for. - if not op.exists('../build/libpython3.2.dylib'): - os.symlink('../build/Python', '../build/libpython3.2.dylib') + versioned_dylib_path = '../build/libpython{}.dylib'.format(sys.version[:3]) + if not op.exists(versioned_dylib_path): + os.symlink('../build/Python', versioned_dylib_path) # The rest is standard WAF code that you can find the the python and macapp demos. conf.load('compiler_c python') conf.check_python_version((3,2,0))