Bug 13525 - Python 3 libraries not built if Python 2 system libraries are up-to-date
Summary: Python 3 libraries not built if Python 2 system libraries are up-to-date
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2018-07-11 21:27 UTC by Douglas Bagnall
Modified: 2018-07-11 21:27 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Bagnall 2018-07-11 21:27:33 UTC
The existence of (to use a real example) an up-to-date system tdb with python2.7 bindings
means the python3 tdb bindings won't be built.

In buildtools/wafsamba/samba_bundled.py, we have:

def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
    '''check if a python module is available on the system and
    has the specified minimum version.
    if conf.LIB_MUST_BE_BUNDLED(libname):
        return False

    # see if the library should only use a system version if another dependent
    # system version is found. That prevents possible use of mixed library
    # versions
    minversion = minimum_library_version(conf, libname, minversion)

        m = __import__(modulename)
    except ImportError:
        found = False
            version = m.__version__
        except AttributeError:
            found = False
            found = tuplize_version(version) >= tuplize_version(minversion)
    if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
        Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
    return found

So the python running waf decides whether the library exists.
It would be better to run the check in a subprocess, and do it with each python.