[Python-checkins] CVS: python/dist/src/Lib/distutils/command build_ext.py,1.69,1.70
A.M. Kuchling
akuchling@users.sourceforge.net
Wed, 24 Jan 2001 07:43:12 -0800
Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory usw-pr-cvs1:/tmp/cvs-serv25692
Modified Files:
build_ext.py
Log Message:
Part of patch #102409: special cases for Cygwin:
Lib/distutils/command/build_ext.py(build_ext.finalize_options): Add
Cygwin specific code to append Python's library directory to the
extension's list of library directories.
(build_ext.get_libraries): Add Cygwin specific code to append Python's
(import) library to the extension's list of libraries.
Index: build_ext.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_ext.py,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -r1.69 -r1.70
*** build_ext.py 2001/01/09 03:15:47 1.69
--- build_ext.py 2001/01/24 15:43:09 1.70
***************
*** 164,167 ****
--- 164,178 ----
else:
self.build_temp = os.path.join(self.build_temp, "Release")
+
+ # for extensions under Cygwin Python's library directory must be
+ # appended to library_dirs
+ if sys.platform[:6] == 'cygwin':
+ if string.find(sys.executable, sys.exec_prefix) != -1:
+ # building third party extensions
+ self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + sys.version[:3], "config"))
+ else:
+ # building python standard extensions
+ self.library_dirs.append('.')
+
# finalize_options ()
***************
*** 572,575 ****
--- 583,593 ----
if self.debug:
template = template + '_d'
+ pythonlib = (template %
+ (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
+ # don't extend ext.libraries, it may be shared with other
+ # extensions, it is a reference to the original list
+ return ext.libraries + [pythonlib]
+ elif sys.platform[:6] == "cygwin":
+ template = "python%d.%d"
pythonlib = (template %
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))