Opened 17 years ago
Last modified 17 years ago
#1990 closed defect
python mapscript setup.py doesn't handle framework link options — at Initial Version
Reported by: | Owned by: | mapserverbugs | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapScript-Python | Version: | 4.10 |
Severity: | normal | Keywords: | |
Cc: |
Description
If a Mac OS X framework or framework path option are passed to setup.py, they are dropped because the setup script strips unknown options. This patch did the trick for me: --- setup.py-orig 2006-05-31 09:48:31.000000000 -0500 +++ setup.py 2006-12-22 20:57:35.000000000 -0600 @@ -57,18 +57,27 @@ libs = [] extras = [] +ex_next = False for x in lib_opts: - if x[:2] == '-l': + if ex_next: + extras.append(x) + ex_next = False + elif x[:2] == '-l': libs.append( x[2:] ) - if x[-4:] == '.lib' or x[-4:] == '.LIB': + elif x[-4:] == '.lib' or x[-4:] == '.LIB': dir, lib = os.path.split(x) libs.append( lib[:-4] ) if len(dir) > 0: lib_dirs.append( dir ) - if x[-2:] == '.a': + elif x[-2:] == '.a': + extras.append(x) + elif x[:10] == '-framework': extras.append(x) - + ex_next = True + elif x[:2] == '-F': + extras.append(x) + libs = unique(libs) # if we're msvc, just link against the stub lib Frameworks use the form: -framework foo, so are two words, thus the ex_next tracking. Framework path flags are like library path flags, but with -F. Distutils doesn't appear to know about frameworks, so I dump them all into extras.
Note:
See TracTickets
for help on using tickets.