4 def pkg_config(package
, prefix
=""):
6 if type(package
) is StringType
:
8 command2
= ("""bash -c 'PKG_CONFIG_PATH=\"""" + prefix +
9 """\" pkg
-config
--cflags
""" + package + """' """)
11 pkgpipe = os.popen(command2)
12 flags = (pkgpipe.read())[:-1]
17 command1 = ("""bash -c 'PKG_CONFIG_PATH
=\"""
" +
18 prefix + """\" pkg-config --libs """ + package +
19 """ | sed -e "s
/-l
/""" + slash_en +
20 """LIB
/g
" | grep LIB | sed -e "s
/LIB
//g
" | tr -d " "'""")
22 pkgpipe = os.popen(command1)
23 libs = (pkgpipe.read().split('\n'))[1:-1]
28 if type(package) is TupleType or type(package) is ListType:
33 result = pkg_config(input, prefix)
36 results[0] += result[0]
37 results[1] += result[1]
41 def other_command(command):
43 command_pipe = os.popen(command)
44 results = (command_pipe.read())[:-1]