From 4453a657d3959c5e287bbf1a6793b0d5775e6126 Mon Sep 17 00:00:00 2001 From: regrain Date: Thu, 19 Feb 2004 13:16:23 +0000 Subject: [PATCH] * FIX : distutilsWrapping.py : copy of .lib file for windows systems -- BeNours --- distutilsWrapping.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/distutilsWrapping.py b/distutilsWrapping.py index 96152a9b..e1fbcb09 100644 --- a/distutilsWrapping.py +++ b/distutilsWrapping.py @@ -1,7 +1,9 @@ from distutils.command.build_ext import build_ext from distutils.core import Extension +from distutils.file_util import copy_file from types import ListType import os +import string class build_extWrap(build_ext): """ @@ -16,6 +18,26 @@ class build_extWrap(build_ext): self.__ext=ext build_ext.build_extension(self,ext) + if(os.name!='posix'): + # Copy the .lib file + fullname = self.get_ext_fullname(ext.name) + modpath = string.split(fullname, '.') + package = string.join(modpath[0:-1], '.') + base = modpath[-1] + if self.inplace: + # ignore build-lib -- put the compiled extension into + # the source tree along with pure Python modules + build_py = self.get_finalized_command('build_py') + package_dir = build_py.get_package_dir(package) + dstLib=package_dir + else: + dstLib=self.build_lib + + srcLib=os.path.join(self.build_temp,base+".lib") + dstLib=os.path.join(dstLib,package) + + copy_file(srcLib,dstLib) + def swig_sources(self,sources): """Walk the list of source files in 'sources',looking for SWIG interface(.i) files. Run SWIG on all that are found,and -- 2.48.1