[Python-checkins] CVS: python/dist/src/Lib/distutils/command build_ext.py,1.68,1.68.2.1
Moshe Zadka
moshez@users.sourceforge.net
Sat, 31 Mar 2001 08:09:34 -0800
Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory usw-pr-cvs1:/tmp/cvs-serv4312/Lib/distutils/command
Modified Files:
Tag: release20-maint
build_ext.py
Log Message:
- #233253 - distutils/command/build_ext.py - the --define and --undef options
didn't work, whether specified on the command-line or in setup.cfg.
- distutils/command/build_ext.py - make docstrings raw
- #128930 - distutils/command/build_ext.py - split rpath argument
Suggested by AMK, but had to be massaged a bit from the cvs diff
Index: build_ext.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v
retrieving revision 1.68
retrieving revision 1.68.2.1
diff -C2 -r1.68 -r1.68.2.1
*** build_ext.py 2000/09/30 18:27:54 1.68
--- build_ext.py 2001/03/31 16:09:32 1.68.2.1
***************
*** 152,155 ****
--- 152,157 ----
if self.rpath is None:
self.rpath = []
+ elif type(self.rpath) is StringType:
+ self.rpath = string.split(self.rpath, os.pathsep)
# for extensions under windows use different directories
***************
*** 162,165 ****
--- 164,183 ----
else:
self.build_temp = os.path.join(self.build_temp, "Release")
+
+ # The argument parsing will result in self.define being a string, but
+ # it has to be a list of 2-tuples. All the preprocessor symbols
+ # specified by the 'define' option will be set to '1'. Multiple
+ # symbols can be separated with commas.
+
+ if self.define:
+ defines = string.split(self.define, ',')
+ self.define = map(lambda symbol: (symbol, '1'), defines)
+
+ # The option for macros to undefine is also a string from the
+ # option parsing, but has to be a list. Multiple symbols can also
+ # be separated with commas here.
+ if self.undef:
+ self.undef = string.split(self.undef, ',')
+
# finalize_options ()
***************
*** 529,533 ****
def get_ext_filename (self, ext_name):
! """Convert the name of an extension (eg. "foo.bar") into the name
of the file from which it will be loaded (eg. "foo/bar.so", or
"foo\bar.pyd").
--- 547,551 ----
def get_ext_filename (self, ext_name):
! r"""Convert the name of an extension (eg. "foo.bar") into the name
of the file from which it will be loaded (eg. "foo/bar.so", or
"foo\bar.pyd").