[Python-checkins] CVS: distutils/distutils/command build_ext.py,1.77,1.78
Thomas Heller
theller@users.sourceforge.net
Fri, 18 Jan 2002 12:30:55 -0800
Update of /cvsroot/python/distutils/distutils/command
In directory usw-pr-cvs1:/tmp/cvs-serv27251
Modified Files:
build_ext.py
Log Message:
SWIGing a source file <name>.i silently overwrites <name>.c if it is
present - at least the swigged file should be named <name>_wrap.c as
this is also SWIG's default. (Even better would be to generate the
wrapped sources in a different location, but I'll leave this for
later).
Newer versions of SWIG don't accept the -dnone flag any more.
Since virtually nobody uses SWIG with distutils, this should do no
harm.
Suggested be Martin Bless on c.l.p.
Index: build_ext.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/build_ext.py,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** build_ext.py 2001/12/06 22:59:54 1.77
--- build_ext.py 2002/01/18 20:30:53 1.78
***************
*** 512,516 ****
(base, ext) = os.path.splitext(source)
if ext == ".i": # SWIG interface file
! new_sources.append(base + target_ext)
swig_sources.append(source)
swig_targets[source] = new_sources[-1]
--- 512,516 ----
(base, ext) = os.path.splitext(source)
if ext == ".i": # SWIG interface file
! new_sources.append(base + '_wrap' + target_ext)
swig_sources.append(source)
swig_targets[source] = new_sources[-1]
***************
*** 522,526 ****
swig = self.find_swig()
! swig_cmd = [swig, "-python", "-dnone", "-ISWIG"]
if self.swig_cpp:
swig_cmd.append("-c++")
--- 522,526 ----
swig = self.find_swig()
! swig_cmd = [swig, "-python"]
if self.swig_cpp:
swig_cmd.append("-c++")