Commit ab5320bf authored by Jack Jansen's avatar Jack Jansen

Fixed various MacPython-specific issues found by attempting to use the...

Fixed various MacPython-specific issues found by attempting to use the standard core setup.py for MacPython.
parent 0a2963c7
...@@ -161,7 +161,7 @@ class MWerksCompiler (CCompiler) : ...@@ -161,7 +161,7 @@ class MWerksCompiler (CCompiler) :
return return
# Build the export file # Build the export file
exportfilename = os.path.join(build_temp, exportname) exportfilename = os.path.join(build_temp, exportname)
log.debug("\tCreate export file", exportfilename) log.debug("\tCreate export file %s", exportfilename)
fp = open(exportfilename, 'w') fp = open(exportfilename, 'w')
fp.write('%s\n'%export_symbols[0]) fp.write('%s\n'%export_symbols[0])
fp.close() fp.close()
...@@ -182,7 +182,7 @@ class MWerksCompiler (CCompiler) : ...@@ -182,7 +182,7 @@ class MWerksCompiler (CCompiler) :
# because we pass this pathname to CodeWarrior in an AppleEvent, and CW # because we pass this pathname to CodeWarrior in an AppleEvent, and CW
# doesn't have a clue about our working directory. # doesn't have a clue about our working directory.
xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname)) xmlfilename = os.path.join(os.getcwd(), os.path.join(build_temp, xmlname))
log.debug("\tCreate XML file", xmlfilename) log.debug("\tCreate XML file %s", xmlfilename)
xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings) xmlbuilder = mkcwproject.cwxmlgen.ProjectBuilder(settings)
xmlbuilder.generate() xmlbuilder.generate()
xmldata = settings['tmp_projectxmldata'] xmldata = settings['tmp_projectxmldata']
...@@ -191,7 +191,7 @@ class MWerksCompiler (CCompiler) : ...@@ -191,7 +191,7 @@ class MWerksCompiler (CCompiler) :
fp.close() fp.close()
# Generate the project. Again a full pathname. # Generate the project. Again a full pathname.
projectfilename = os.path.join(os.getcwd(), os.path.join(build_temp, projectname)) projectfilename = os.path.join(os.getcwd(), os.path.join(build_temp, projectname))
log.debug('\tCreate project file', projectfilename) log.debug('\tCreate project file %s', projectfilename)
mkcwproject.makeproject(xmlfilename, projectfilename) mkcwproject.makeproject(xmlfilename, projectfilename)
# And build it # And build it
log.debug('\tBuild project') log.debug('\tBuild project')
...@@ -213,3 +213,31 @@ class MWerksCompiler (CCompiler) : ...@@ -213,3 +213,31 @@ class MWerksCompiler (CCompiler) :
if components[i] == '..': if components[i] == '..':
components[i] = '' components[i] = ''
return string.join(components, ':') return string.join(components, ':')
def library_dir_option (self, dir):
"""Return the compiler option to add 'dir' to the list of
directories searched for libraries.
"""
return # XXXX Not correct...
def runtime_library_dir_option (self, dir):
"""Return the compiler option to add 'dir' to the list of
directories searched for runtime libraries.
"""
# Nothing needed or Mwerks/Mac.
return
def library_option (self, lib):
"""Return the compiler option to add 'dir' to the list of libraries
linked into the shared library or executable.
"""
return
def find_library_file (self, dirs, lib, debug=0):
"""Search the specified list of directories for a static or shared
library file 'lib' and return the full path to that file. If
'debug' true, look for a debugging version (if that makes sense on
the current platform). Return None if 'lib' wasn't found in any of
the specified directories.
"""
return 0
...@@ -66,6 +66,9 @@ def get_python_inc(plat_specific=0, prefix=None): ...@@ -66,6 +66,9 @@ def get_python_inc(plat_specific=0, prefix=None):
elif os.name == "nt": elif os.name == "nt":
return os.path.join(prefix, "include") return os.path.join(prefix, "include")
elif os.name == "mac": elif os.name == "mac":
if plat_specific:
return os.path.join(prefix, "Mac", "Include")
else:
return os.path.join(prefix, "Include") return os.path.join(prefix, "Include")
elif os.name == "os2": elif os.name == "os2":
return os.path.join(prefix, "Include") return os.path.join(prefix, "Include")
...@@ -403,6 +406,8 @@ def _init_mac(): ...@@ -403,6 +406,8 @@ def _init_mac():
g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib") g['install_lib'] = os.path.join(EXEC_PREFIX, "Lib")
g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib") g['install_platlib'] = os.path.join(EXEC_PREFIX, "Mac", "Lib")
# These are used by the extension module build
g['srcdir'] = ':'
global _config_vars global _config_vars
_config_vars = g _config_vars = g
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment