Skip to content

Commit

Permalink
#1275: we have to set the PKG_CONFIG_PATH early, as we use pkgconfig …
Browse files Browse the repository at this point in the history
…to set the default values of build flags, before processing the rest of the command line arguments

git-svn-id: https://xpra.org/svn/Xpra/trunk@13235 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Aug 5, 2016
1 parent d70a68b commit 9d80c78
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ def get_status_output(*args, **kwargs):
if has_pkg_config:
print("found pkg-config version: %s" % pkg_config_version[1].strip("\n\r"))

for arg in list(sys.argv):
if arg.startswith("--pkg-config-path="):
pcp = arg[len("--pkg-config-path="):]
pcps = os.environ.get("PKG_CONFIG_PATH", "").split(os.path.pathsep) + [pcp]
os.environ["PKG_CONFIG_PATH"] = os.path.pathsep.join([x for x in pcps if x])
print("using PKG_CONFIG_PATH=%s" % (os.environ["PKG_CONFIG_PATH"], ))
sys.argv.remove(arg)

def pkg_config_ok(*args, **kwargs):
if not has_pkg_config:
return kwargs.get("fallback", False)
Expand Down Expand Up @@ -257,12 +265,6 @@ def is_msvc():
filtered_args = []
for arg in sys.argv:
matched = False
if arg.startswith("--pkg-config-path="):
pcp = arg[len("--pkg-config-path="):]
pcps = os.environ.get("PKG_CONFIG_PATH", "").split(os.path.pathsep) + [pcp]
os.environ["PKG_CONFIG_PATH"] = os.path.pathsep.join([x for x in pcps if x])
print("using PKG_CONFIG_PATH=%s" % (os.environ["PKG_CONFIG_PATH"], ))
matched = True
for x in SWITCHES:
with_str = "--with-%s" % x
without_str = "--without-%s" % x
Expand Down

0 comments on commit 9d80c78

Please sign in to comment.