Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cec1568

Browse files
committed
Rene Liebscher:
* reverse library names from bcpp_library to library_bcpp * move some code to the right places, to put the def-files in the right directories again
1 parent 7483d68 commit cec1568

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

Lib/distutils/bcppcompiler.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,6 @@ def link_shared_object (self,
224224
else:
225225
ld_args = self.ldflags_shared[:]
226226

227-
# Borland C++ has problems with '/' in paths
228-
objects = map(os.path.normpath, objects)
229-
startup_obj = 'c0d32'
230-
objects.insert(0, startup_obj)
231-
232-
# either exchange python15.lib in the python libs directory against
233-
# a Borland-like one, or create one with name bcpp_python15.lib
234-
# there and remove the pragmas from config.h
235-
libraries.append ('import32')
236-
libraries.append ('cw32mt')
237-
238227
# Create a temporary exports file for use by the linker
239228
head, tail = os.path.split (output_filename)
240229
modname, ext = os.path.splitext (tail)
@@ -246,6 +235,17 @@ def link_shared_object (self,
246235
self.execute(write_file, (def_file, contents),
247236
"writing %s" % def_file)
248237

238+
# Borland C++ has problems with '/' in paths
239+
objects = map(os.path.normpath, objects)
240+
startup_obj = 'c0d32'
241+
objects.insert(0, startup_obj)
242+
243+
# either exchange python15.lib in the python libs directory against
244+
# a Borland-like one, or create one with name bcpp_python15.lib
245+
# there and remove the pragmas from config.h
246+
libraries.append ('import32')
247+
libraries.append ('cw32mt')
248+
249249
# Start building command line flags and options.
250250

251251
for l in library_dirs:
@@ -377,9 +377,9 @@ def find_library_file (self, dirs, lib, debug=0):
377377
# seems to have a different format for static libraries.
378378
if debug:
379379
dlib = (lib + "_d")
380-
try_names = ("bcpp_" + dlib, "bcpp_" + lib, dlib, lib)
380+
try_names = (dlib + "_bcpp", lib + "_bcpp", dlib, lib)
381381
else:
382-
try_names = ("bcpp_" + lib, lib)
382+
try_names = (lib + "_bcpp", lib)
383383

384384
for dir in dirs:
385385
for name in try_names:

0 commit comments

Comments
 (0)