Repository: mesonbuild/meson

Issue:
Meson 0.54.0: Boost Python detection fails on Ubuntu 18.04
**Describe the bug**
I have a project with this line
```
boost_dep = dependency('boost', modules: ['graph', 'python3'], include_type: 'system')
```
With 0.53.2 this has worked without problems:
```
$ CC=gcc CXX=g++ meson setup build_with_gcc_no_pch -Dcpp_args=-Werror -Db_pch=false --native-file native.txt
The Meson build system
Version: 0.53.2
...
Run-time dependency Boost (graph, python3) found: YES 1.65.1
```
With 0.54 is does not work anymore:
```
+ CC=gcc CXX=g++ meson setup build_with_gcc_no_pch -Dcpp_args=-Werror -Db_pch=false --native-file native.txt
The Meson build system
Version: 0.54.0
...
Run-time dependency Boost (found: graph | missing: python3) found: NO 

meson.build:28:0: ERROR: Dependency "boost" not found
```

**To Reproduce**
Trying to `meson build` with this build file is enough to trigger the error:
```
project('foobar', 'cpp',
  version : '0.1',
  default_options : ['warning_level=3'])

boost_dep = dependency('boost', modules: ['graph', 'python3'], include_type: 'system')
```
Version 0.53.2 works, version 0.54 not. The error messages match with the non minimal example posted above.

**Expected behavior**
Both version work.

**system parameters**
The build machine is an Ubuntu 18.04, Python 3.6.9

** Log for 0.54 **
```
Build started at 2020-04-01T04:47:45.939824
Main binary: /usr/bin/python3
Build Options: 
Python system: Linux
The Meson build system
Version: 0.54.0
Source dir: /home/srastaff/entrup/test
Build dir: /home/srastaff/entrup/test/build2
Build type: native build
None of 'PKG_CONFIG_PATH' are defined in the environment, not changing global flags.
None of 'PKG_CONFIG_PATH' are defined in the environment, not changing global flags.
Project name: foobar
Project version: 0.1
None of 'CXX' are defined in the environment, not changing global flags.
None of 'CXXFLAGS' are defined in the environment, not changing global flags.
None of 'LDFLAGS' are defined in the environment, not changing global flags.
None of 'CPPFLAGS' are defined in the environment, not changing global flags.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity testing C++ compiler: ccache c++
Is cross compiler: False.
Sanity check compiler command line: ccache c++ /home/srastaff/entrup/test/build2/meson-private/sanitycheckcpp.cc -o /home/srastaff/entrup/test/build2/meson-private/sanitycheckcpp.exe -pipe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /home/srastaff/entrup/test/build2/meson-private/sanitycheckcpp.exe
C++ compiler for the build machine: ccache c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C++ linker for the build machine: c++ ld.bfd 2.30
None of 'AR' are defined in the environment, not changing global flags.
None of 'CXX' are defined in the environment, not changing global flags.
None of 'CXXFLAGS' are defined in the environment, not changing global flags.
None of 'LDFLAGS' are defined in the environment, not changing global flags.
None of 'CPPFLAGS' are defined in the environment, not changing global flags.
None of 'CXX_LD' are defined in the environment, not changing global flags.
Sanity testing C++ compiler: ccache c++
Is cross compiler: False.
Sanity check compiler command line: ccache c++ /home/srastaff/entrup/test/build2/meson-private/sanitycheckcpp.cc -o /home/srastaff/entrup/test/build2/meson-private/sanitycheckcpp.exe -pipe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /home/srastaff/entrup/test/build2/meson-private/sanitycheckcpp.exe
C++ compiler for the host machine: ccache c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C++ linker for the host machine: c++ ld.bfd 2.30
None of 'AR' are defined in the environment, not changing global flags.
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Checking potential boost root /usr/include/c++
Checking potential boost root /usr/include/x86_64-linux-gnu/c++
Checking potential boost root /usr/include/c++/7
Checking potential boost root /usr/lib/gcc/x86_64-linux-gnu/7
Checking potential boost root /usr/local
Checking potential boost root /usr/include
  - found boost 1.65.1 include dir: /usr/include
  - filtered library list:
  - found:
  - NOT found:
    - boost_graph
    - boost_python3
Checking potential boost root /usr
  - found boost 1.65.1 include dir: /usr/include
  - filtered library list:
    - <LIB: -M ------ ??? ? x_xx boost_atomic                     /usr/lib/x86_64-linux-gnu/libboost_atomic.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_chrono                     /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_context                    /usr/lib/x86_64-linux-gnu/libboost_context.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_coroutine                  /usr/lib/x86_64-linux-gnu/libboost_coroutine.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_date_time                  /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_filesystem                 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_graph                      /usr/lib/x86_64-linux-gnu/libboost_graph.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_iostreams                  /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_locale                     /usr/lib/x86_64-linux-gnu/libboost_locale.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_log                        /usr/lib/x86_64-linux-gnu/libboost_log.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_log_setup                  /usr/lib/x86_64-linux-gnu/libboost_log_setup.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_prg_exec_monitor           /usr/lib/x86_64-linux-gnu/libboost_prg_exec_monitor.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_program_options            /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_regex                      /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_serialization              /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_system                     /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_thread                     /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_unit_test_framework        /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1>
    - <LIB: -M ------ ??? ? x_xx boost_wserialization             /usr/lib/x86_64-linux-gnu/libboost_wserialization.so.1.65.1>
  - found:
    - boost_graph              link=['/usr/lib/x86_64-linux-gnu/libboost_graph.so.1.65.1'] comp=['-DBOOST_GRAPH_DYN_LINK=1']
  - NOT found:
    - boost_python3
Run-time dependency Boost (found: graph | missing: python3) found: NO 

meson.build:5:0: ERROR: Dependency "boost" not found
```

** Log for 0.53.0 **
```
Build started at 2020-04-01T04:47:13.763943
Main binary: /usr/bin/python3
Build Options: 
Python system: Linux
The Meson build system
Version: 0.53.0
Source dir: /home/srastaff/entrup/test
Build dir: /home/srastaff/entrup/test/build
Build type: native build
Project name: foobar
Project version: 0.1
No CXXFLAGS in the environment, not changing global flags.
No LDFLAGS in the environment, not changing global flags.
No CPPFLAGS in the environment, not changing global flags.
Sanity testing C++ compiler: ccache c++
Is cross compiler: False.
Sanity check compiler command line: ccache c++ /home/srastaff/entrup/test/build/meson-private/sanitycheckcpp.cc -o /home/srastaff/entrup/test/build/meson-private/sanitycheckcpp.exe -pipe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /home/srastaff/entrup/test/build/meson-private/sanitycheckcpp.exe
C++ compiler for the build machine: ccache c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C++ linker for the build machine: c++ GNU ld.bfd 2.30
No CXXFLAGS in the environment, not changing global flags.
No LDFLAGS in the environment, not changing global flags.
No CPPFLAGS in the environment, not changing global flags.
Sanity testing C++ compiler: ccache c++
Is cross compiler: False.
Sanity check compiler command line: ccache c++ /home/srastaff/entrup/test/build/meson-private/sanitycheckcpp.cc -o /home/srastaff/entrup/test/build/meson-private/sanitycheckcpp.exe -pipe -D_FILE_OFFSET_BITS=64
Sanity check compile stdout:

-----
Sanity check compile stderr:

-----
Running test binary command: /home/srastaff/entrup/test/build/meson-private/sanitycheckcpp.exe
C++ compiler for the host machine: ccache c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C++ linker for the host machine: c++ GNU ld.bfd 2.30
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Boost library root dir is None
Boost include directory is None
Running compile:
Working directory:  /home/srastaff/entrup/test/build/meson-private/tmp9grbt8qg
Command line:  ccache c++ /home/srastaff/entrup/test/build/meson-private/tmp9grbt8qg/testfile.cpp -pipe -E -P -D_FILE_OFFSET_BITS=64 -P -O0 -fpermissive 

Code:
 
        #include <boost/version.hpp>
        #ifndef BOOST_LIB_VERSION
        # define BOOST_LIB_VERSION
        #endif
        "MESON_GET_DEFINE_DELIMITER"
BOOST_LIB_VERSION
Compiler stdout:
         "MESON_GET_DEFINE_DELIMITER"
"1_65_1"

Compiler stderr:
 
Running compile:
Working directory:  /home/srastaff/entrup/test/build/meson-private/tmpqe9py_n8
Command line:  ccache c++ /home/srastaff/entrup/test/build/meson-private/tmpqe9py_n8/testfile.cpp -o /home/srastaff/entrup/test/build/meson-private/tmpqe9py_n8/output.exe -pipe -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -Wl,--start-group -lboost_graph -Wl,--end-group -Wl,--allow-shlib-undefined 

Code:
 int main(void) { return 0; }
Compiler stdout:
 
Compiler stderr:
 
Link args for boost module "graph" are ['-lboost_graph']
Running compile:
Working directory:  /home/srastaff/entrup/test/build/meson-private/tmp0a0sn_oo
Command line:  ccache c++ /home/srastaff/entrup/test/build/meson-private/tmp0a0sn_oo/testfile.cpp -o /home/srastaff/entrup/test/build/meson-private/tmp0a0sn_oo/output.exe -pipe -D_FILE_OFFSET_BITS=64 -O0 -fpermissive -Wl,--start-group -lboost_python3 -Wl,--end-group -Wl,--allow-shlib-undefined 

Code:
 int main(void) { return 0; }
Compiler stdout:
 
Compiler stderr:
 
Link args for boost module "python3" are ['-lboost_python3']
Boost library directory is None
Installed Boost libraries: 
boost_graph ['-lboost_graph']
boost_python3 ['-lboost_python3']
Run-time dependency Boost (graph, python3) found: YES 1.65.1
Build targets in project: 0

Found ninja-1.10.0 at /usr/bin/ninja
```



Discussion:
Just an additional info for this machine:
```
$ ls -lh /usr/lib/x86_64-linux-gnu/libboost*
-rw-r--r-- 1 root root 2,4K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_atomic.a
lrwxrwxrwx 1 root root   25 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_atomic.so -> libboost_atomic.so.1.65.1
-rw-r--r-- 1 root root 5,7K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_atomic.so.1.65.1
-rw-r--r-- 1 root root  55K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_chrono.a
lrwxrwxrwx 1 root root   25 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_chrono.so -> libboost_chrono.so.1.65.1
-rw-r--r-- 1 root root  19K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.65.1
-rw-r--r-- 1 root root  11K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_context.a
lrwxrwxrwx 1 root root   26 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_context.so -> libboost_context.so.1.65.1
-rw-r--r-- 1 root root  11K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_context.so.1.65.1
-rw-r--r-- 1 root root 160K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_coroutine.a
lrwxrwxrwx 1 root root   28 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_coroutine.so -> libboost_coroutine.so.1.65.1
-rw-r--r-- 1 root root  71K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_coroutine.so.1.65.1
-rw-r--r-- 1 root root 148K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_date_time.a
lrwxrwxrwx 1 root root   28 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_date_time.so -> libboost_date_time.so.1.65.1
-rw-r--r-- 1 root root  67K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.65.1
-rw-r--r-- 1 root root 103K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.65.1
-rw-r--r-- 1 root root 735K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_graph.a
lrwxrwxrwx 1 root root   24 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_graph.so -> libboost_graph.so.1.65.1
-rw-r--r-- 1 root root 315K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_graph.so.1.65.1
-rw-r--r-- 1 root root 103K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_iostreams.so.1.65.1
-rw-r--r-- 1 root root 933K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_locale.so.1.65.1
-rw-r--r-- 1 root root 657K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_log_setup.so.1.65.1
-rw-r--r-- 1 root root 885K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_log.so.1.65.1
-rw-r--r-- 1 root root 163K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_prg_exec_monitor.a
lrwxrwxrwx 1 root root   35 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_prg_exec_monitor.so -> libboost_prg_exec_monitor.so.1.65.1
-rw-r--r-- 1 root root  63K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_prg_exec_monitor.so.1.65.1
-rw-r--r-- 1 root root 515K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.65.1
lrwxrwxrwx 1 root root   23 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python3.a -> libboost_python3-py36.a
-rw-r--r-- 1 root root 570K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.a
lrwxrwxrwx 1 root root   31 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so -> libboost_python3-py36.so.1.65.1
-rw-r--r-- 1 root root 251K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python3-py36.so.1.65.1
lrwxrwxrwx 1 root root   24 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python3.so -> libboost_python3-py36.so
lrwxrwxrwx 1 root root   22 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python.a -> libboost_python-py27.a
-rw-r--r-- 1 root root 579K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python-py27.a
lrwxrwxrwx 1 root root   30 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python-py27.so -> libboost_python-py27.so.1.65.1
-rw-r--r-- 1 root root 255K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.65.1
lrwxrwxrwx 1 root root   23 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python-py36.a -> libboost_python3-py36.a
lrwxrwxrwx 1 root root   24 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python-py36.so -> libboost_python3-py36.so
lrwxrwxrwx 1 root root   23 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_python.so -> libboost_python-py27.so
-rw-r--r-- 1 root root 2,8M Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_regex.a
lrwxrwxrwx 1 root root   24 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_regex.so -> libboost_regex.so.1.65.1
-rw-r--r-- 1 root root 1,1M Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.65.1
-rw-r--r-- 1 root root 1,1M Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_serialization.a
lrwxrwxrwx 1 root root   32 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_serialization.so -> libboost_serialization.so.1.65.1
-rw-r--r-- 1 root root 247K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.65.1
-rw-r--r-- 1 root root  63K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_system.a
lrwxrwxrwx 1 root root   25 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_system.so -> libboost_system.so.1.65.1
-rw-r--r-- 1 root root  19K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1
-rw-r--r-- 1 root root 2,2M Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_test_exec_monitor.a
-rw-r--r-- 1 root root 366K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_thread.a
lrwxrwxrwx 1 root root   25 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_thread.so -> libboost_thread.so.1.65.1
-rw-r--r-- 1 root root 147K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1
-rw-r--r-- 1 root root 2,2M Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.a
lrwxrwxrwx 1 root root   38 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so -> libboost_unit_test_framework.so.1.65.1
-rw-r--r-- 1 root root 804K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1
-rw-r--r-- 1 root root 738K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_wserialization.a
lrwxrwxrwx 1 root root   33 Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_wserialization.so -> libboost_wserialization.so.1.65.1
-rw-r--r-- 1 root root 171K Mär  6  2018 /usr/lib/x86_64-linux-gnu/libboost_wserialization.so.1.65.1
```
`libboost_python3` is present there.

Edit:
This also does not work (the idea comes from [here](https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/boost.py#L106))
```
boost_dep = dependency('boost', modules: ['graph', 'python'], include_type: 'system')
```

Resolving patch:
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py
--- a/mesonbuild/dependencies/boost.py
+++ b/mesonbuild/dependencies/boost.py
@@ -152,6 +152,9 @@ def __init__(self, path: Path):
 
         # Process tags
         tags = self.nametags[1:]
+        # Filter out the python version tag and fix modname
+        if self.is_python_lib():
+            tags = self.fix_python_name(tags)
         if not tags:
             return
 
@@ -226,6 +229,40 @@ def is_boost(self) -> bool:
     def is_python_lib(self) -> bool:
         return any([self.mod_name.startswith(x) for x in BoostLibraryFile.boost_python_libs])
 
+    def fix_python_name(self, tags: T.List[str]) -> T.List[str]:
+        # Handle the boost_python naming madeness.
+        # See https://github.com/mesonbuild/meson/issues/4788 for some distro
+        # specific naming variantions.
+        other_tags = []  # type: T.List[str]
+
+        # Split the current modname into the base name and the version
+        m_cur = BoostLibraryFile.reg_python_mod_split.match(self.mod_name)
+        cur_name = m_cur.group(1)
+        cur_vers = m_cur.group(2)
+
+        # Update the current version string if the new version string is longer
+        def update_vers(new_vers: str) -> None:
+            nonlocal cur_vers
+            new_vers = new_vers.replace('_', '')
+            new_vers = new_vers.replace('.', '')
+            if not new_vers.isdigit():
+                return
+            if len(new_vers) > len(cur_vers):
+                cur_vers = new_vers
+
+        for i in tags:
+            if i.startswith('py'):
+                update_vers(i[2:])
+            elif i.isdigit():
+                update_vers(i)
+            elif len(i) >= 3 and i[0].isdigit and i[2].isdigit() and i[1] == '.':
+                update_vers(i)
+            else:
+                other_tags += [i]
+
+        self.mod_name = cur_name + cur_vers
+        return other_tags
+
     def mod_name_matches(self, mod_name: str) -> bool:
         if self.mod_name == mod_name:
             return True


Test patch:
diff --git a/test cases/frameworks/1 boost/meson.build b/test cases/frameworks/1 boost/meson.build
--- a/test cases/frameworks/1 boost/meson.build	
+++ b/test cases/frameworks/1 boost/meson.build	
@@ -36,7 +36,7 @@ else
 endif
 
 if(python3dep.found() and host_machine.system() == 'linux' and not s)
-  bpython3dep = dependency('boost', static: s, modules : ['python3'], required: false, disabler: true)
+  bpython3dep = dependency('boost', static: s, modules : ['python3'])
 else
   python3dep = disabler()
   bpython3dep = disabler()