svn commit: samba r10798 - in trunk/source/python: .
tpot at samba.org
tpot at samba.org
Fri Oct 7 03:48:44 GMT 2005
Author: tpot
Date: 2005-10-07 03:48:43 +0000 (Fri, 07 Oct 2005)
New Revision: 10798
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10798
Log:
Cleanup of yucky code in setup.py with patch from Christian Andreetta.
Bugzilla #3141.
Modified:
trunk/source/python/setup.py
Changeset:
Modified: trunk/source/python/setup.py
===================================================================
--- trunk/source/python/setup.py 2005-10-07 02:08:38 UTC (rev 10797)
+++ trunk/source/python/setup.py 2005-10-07 03:48:43 UTC (rev 10798)
@@ -52,21 +52,28 @@
libraries = []
library_dirs = []
+next_is_path = 0
+next_is_flag = 0
+
for lib in string.split(samba_libs):
- if lib[0:2] == "-l":
+ if next_is_path != 0:
+ library_dirs.append(lib);
+ next_is_path = 0;
+ elif next_is_flag != 0:
+ next_is_flag = 0;
+ elif lib == "-Wl,-rpath":
+ next_is_path = 1;
+ elif lib[0:2] in ("-l","-pthread"):
libraries.append(lib[2:])
- continue
- if lib[0:8] == "-pthread":
- libraries.append(lib[2:])
- continue
- if lib[0:2] == "-L":
+ elif lib[0:2] == "-L":
library_dirs.append(lib[2:])
- continue
- if lib[0:2] == "-W":
- # Skip linker flags
- continue
- print "Unknown entry '%s' in $LIBS variable passed to setup.py" % lib
- sys.exit(1)
+ elif lib[0:2] in ("-W","-s"):
+ pass # Skip linker flags
+ elif lib[0:2] == "-z":
+ next_is_flag = 1 # Skip linker flags
+ else:
+ print "Unknown entry '%s' in $LIBS variable passed to setup.py" % lib
+ sys.exit(1)
flags_list = string.split(samba_cflags)
More information about the samba-cvs
mailing list