ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / python-mapnik / find-pycairo-with-pkg-config.patch
blob1f35af36ee82cb8070a2694a923baa48b179bf7e
1 diff --git a/setup.py b/setup.py
2 index 82a31d733..1c876a553 100755
3 --- a/setup.py
4 +++ b/setup.py
5 @@ -228,10 +228,9 @@ extra_comp_args = list(filter(lambda arg: arg != "-fvisibility=hidden", extra_co
6 if os.environ.get("PYCAIRO", "false") == "true":
7 try:
8 extra_comp_args.append('-DHAVE_PYCAIRO')
9 - print("-I%s/include/pycairo".format(sys.exec_prefix))
10 - extra_comp_args.append("-I{0}/include/pycairo".format(sys.exec_prefix))
11 - #extra_comp_args.extend(check_output(["pkg-config", '--cflags', 'pycairo']).strip().split(' '))
12 - #linkflags.extend(check_output(["pkg-config", '--libs', 'pycairo']).strip().split(' '))
13 + pycairo_name = 'py3cairo' if PYTHON3 else 'pycairo'
14 + extra_comp_args.extend(check_output(["pkg-config", '--cflags', pycairo_name]).strip().split(' '))
15 + linkflags.extend(check_output(["pkg-config", '--libs', pycairo_name]).strip().split(' '))
16 except:
17 raise Exception("Failed to find compiler options for pycairo")