Skip to content
Permalink
Browse files

Disable builtin pyyaml package with python 3

It's not compatible
  • Loading branch information
m-kuhn committed Aug 16, 2016
1 parent 112df2f commit 282f406e5bd5507e70ee7794aba0cf215426a8be
Showing with 12 additions and 4 deletions.
  1. +12 −4 python/ext-libs/CMakeLists.txt
@@ -8,9 +8,9 @@ IF (WITH_PYSPATIALITE)
ADD_SUBDIRECTORY(pyspatialite)
ENDIF (WITH_PYSPATIALITE)

MACRO(EXT_PYLIB lib)
MACRO(EXT_PYLIB lib enable_by_default)
STRING(TOUPPER ${lib} ulib)
SET (WITH_INTERNAL_${ulib} TRUE CACHE BOOL "Determines whether python ${lib} should be included")
SET (WITH_INTERNAL_${ulib} ${enable_by_default} CACHE BOOL "Determines whether python ${lib} should be included")
IF(WITH_INTERNAL_${ulib})
INSTALL(DIRECTORY ${lib} DESTINATION "${QGIS_PYTHON_DIR}")

@@ -33,8 +33,16 @@ MACRO(EXT_PYLIB lib)
ENDIF(WITH_INTERNAL_${ulib})
ENDMACRO(EXT_PYLIB lib)

FOREACH(pkg httplib2 jinja2 markupsafe owslib pygments dateutil pytz yaml nose2 requests)
EXT_PYLIB(${pkg})
# Our yaml package is not compatible with python 3
# Fallback to system package by default
IF(PYTHON_VER VERSION_LESS 3)
EXT_PYLIB(yaml TRUE)
ELSEIF(PYTHON_VER VERSION_LESS 3)
EXT_PYLIB(yaml FALSE)
ENDIF(PYTHON_VER VERSION_LESS 3)

FOREACH(pkg httplib2 jinja2 markupsafe owslib pygments dateutil pytz nose2 requests)
EXT_PYLIB(${pkg} TRUE)
ENDFOREACH(pkg)

IF(NOT ENABLE_PYTHON3)

0 comments on commit 282f406

Please sign in to comment.
You can’t perform that action at this time.