From cc4b9eda0e480cc3c1263731cc2315ff52973950 Mon Sep 17 00:00:00 2001 From: Eldritch Cheese Date: Wed, 30 Dec 2015 16:04:10 -0500 Subject: [PATCH] Undid the accidental breaking of unit tests. I forgot that I commented out the find_package(PythonInterp) line. In addition, python3.2 can't use the u'unicode string' syntax, and requires six.u('unicode string') instead. --- CMakeLists.txt | 4 ++-- example/example2.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 449970cf0..c179a0afe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,9 +23,9 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) endif() string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE) -set(Python_ADDITIONAL_VERSIONS 3.6 3.5 3.4 3.3 3.2) +set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6) find_package(PythonLibs ${PYBIND11_PYTHON_VERSION} REQUIRED) -#find_package(PythonInterp ${PYBIND11_PYTHON_VERSION} REQUIRED) +find_package(PythonInterp ${PYBIND11_PYTHON_VERSION} REQUIRED) include(CheckCXXCompilerFlag) diff --git a/example/example2.py b/example/example2.py index f42ee49bc..74964aacd 100755 --- a/example/example2.py +++ b/example/example2.py @@ -1,5 +1,6 @@ #!/usr/bin/env python from __future__ import print_function +import six import sys, pydoc sys.path.append('.') @@ -30,11 +31,11 @@ dict_result['key2'] = 'value2' instance.print_dict_2(dict_result) set_result = instance.get_set() -set_result.add(u'key3') +set_result.add(six.u('key3')) instance.print_set(set_result) set_result = instance.get_set2() -set_result.add(u'key3') +set_result.add(six.u('key3')) instance.print_set_2(set_result) list_result = instance.get_list()