Skip to content
Snippets Groups Projects
  • Alexander Traud's avatar
    610e0581
    BuildSystem: Search for Python/C API when possibly needed only. · 610e0581
    Alexander Traud authored
    The Python/C API is used only if the Test Framework was enabled in Asterisk
    'make menuselect'. The Test Framework is available only if the Developer Mode
    was enabled in Asterisk './configure --enable-dev-mode'. And that Python/C API
    is used only if the PJProject was found and not disabled in Asterisk; the user
    did not go for './configure --without-pjproject'.
    
    Furthermore, because version 2 of that Python/C API is required (currently) and
    because some platforms do not offer a generic version 2, the script searches
    for 2.7 explicitly as well.
    
    To avoid version mismatch between the Python/C API and the Python environment,
    the script searches for the latter in the same versions, in the same the order
    as well. Because this Python/C API is just for (some) Asterisk contributors,
    the script also goes for the Python 3 environment as a last resort for all
    other Asterisk users. This allows 'make full' even on minimal installations of
    Ubuntu 18.04 LTS and newer.
    
    Because the Python/C API is Asterisk contributor specific, the Python packages
    are removed from the script './contrib/scripts/install_prereq' as this script
    is intended for Asterisk users. Asterisk contributors have to install much more
    packages in any case, like:
    sudo apt install autoconf automake git git-review python2.7-dev
    
    ASTERISK-28824
    ASTERISK-27717
    
    Change-Id: Id46d357e18869f64dcc217b8fdba821b63eeb876
    610e0581
    History
    BuildSystem: Search for Python/C API when possibly needed only.
    Alexander Traud authored
    The Python/C API is used only if the Test Framework was enabled in Asterisk
    'make menuselect'. The Test Framework is available only if the Developer Mode
    was enabled in Asterisk './configure --enable-dev-mode'. And that Python/C API
    is used only if the PJProject was found and not disabled in Asterisk; the user
    did not go for './configure --without-pjproject'.
    
    Furthermore, because version 2 of that Python/C API is required (currently) and
    because some platforms do not offer a generic version 2, the script searches
    for 2.7 explicitly as well.
    
    To avoid version mismatch between the Python/C API and the Python environment,
    the script searches for the latter in the same versions, in the same the order
    as well. Because this Python/C API is just for (some) Asterisk contributors,
    the script also goes for the Python 3 environment as a last resort for all
    other Asterisk users. This allows 'make full' even on minimal installations of
    Ubuntu 18.04 LTS and newer.
    
    Because the Python/C API is Asterisk contributor specific, the Python packages
    are removed from the script './contrib/scripts/install_prereq' as this script
    is intended for Asterisk users. Asterisk contributors have to install much more
    packages in any case, like:
    sudo apt install autoconf automake git git-review python2.7-dev
    
    ASTERISK-28824
    ASTERISK-27717
    
    Change-Id: Id46d357e18869f64dcc217b8fdba821b63eeb876