Skip to content
  • jcfr's avatar
    ENH: cmake: Check package availability when building against system python · 900fc739
    jcfr authored
    This commit implements the check looking for required python modules
    when building against system version of python.
    
    For example, assuming that all required packages are installed in
    a python virtual environment named "slicer":
    
    $ cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/path/to/bin/qmake \
      -DCMAKE_BUILD_TYPE:STRING=Release \
      -DSlicer_USE_SYSTEM_python:BOOL=1 \
      ../Slicer
    
    would output text like this one:
    
    [...]
    -- SuperBuild -         python-pyparsing => Requires python[INCLUDED],
    -- SuperBuild -         python-pyparsing[OK] (SYSTEM)
    -- PYPARSING_PATH: /home/jcfr/.virtualenvs/slicer/local/lib/python2.7/site-packages
    -- PYPARSING_VERSION: 2.2.0
    -- SuperBuild -       python-packaging[OK] (SYSTEM)
    -- PACKAGING_PATH: /home/jcfr/.virtualenvs/slicer/local/lib/python2.7/site-packages/packaging
    -- PACKAGING_VERSION: 16.8
    -- SuperBuild -       python-six => Requires python[INCLUDED],
    -- SuperBuild -       python-six[OK] (SYSTEM)
    -- SIX_PATH: /home/jcfr/.virtualenvs/slicer/local/lib/python2.7/site-packages
    -- SIX_VERSION: 1.10.0
    [...]
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@26055 3bd1e089-480b-0410-8dfb-8563597acbee
    900fc739