aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build_scripts/main.py34
-rw-r--r--build_scripts/setup_runner.py6
-rw-r--r--build_scripts/utils.py2
-rw-r--r--sources/pyside2/CMakeLists.txt2
-rw-r--r--sources/shiboken2/CMakeLists.txt14
-rw-r--r--sources/shiboken2/data/shiboken_helpers.cmake6
-rw-r--r--sources/shiboken2/doc/CMakeLists.txt6
-rw-r--r--sources/shiboken2/libshiboken/CMakeLists.txt2
-rw-r--r--sources/shiboken2/tests/CMakeLists.txt34
-rw-r--r--sources/shiboken2/tests/test_generator/CMakeLists.txt12
10 files changed, 58 insertions, 60 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index b139519c3..99cc02185 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -356,7 +356,7 @@ class PysideInstall(_install):
def run(self):
_install.run(self)
- print('*** Install completed ({}s)'.format(elapsed()))
+ print('--- Install completed ({}s)'.format(elapsed()))
class PysideDevelop(_develop):
@@ -737,7 +737,7 @@ class PysideBuild(_build):
_build.run(self)
else:
log.info("Skipped preparing and building packages.")
- print('*** Build completed ({}s)'.format(elapsed()))
+ print('--- Build completed ({}s)'.format(elapsed()))
def log_pre_build_info(self):
if config.is_internal_shiboken_generator_build_and_part_of_top_level_all():
@@ -748,16 +748,16 @@ class PysideBuild(_build):
setuptools_install_prefix = OPTION["FINAL_INSTALL_PREFIX"]
log.info("=" * 30)
log.info("Package version: {}".format(get_package_version()))
- log.info("Build type: {}".format(self.build_type))
+ log.info("Build type: {}".format(self.build_type))
log.info("Build tests: {}".format(self.build_tests))
log.info("-" * 3)
- log.info("Make path: {}".format(self.make_path))
+ log.info("Make path: {}".format(self.make_path))
log.info("Make generator: {}".format(self.make_generator))
- log.info("Make jobs: {}".format(OPTION["JOBS"]))
+ log.info("Make jobs: {}".format(OPTION["JOBS"]))
log.info("-" * 3)
- log.info("setup.py directory: {}".format(self.script_dir))
+ log.info("setup.py directory: {}".format(self.script_dir))
log.info("Build scripts directory: {}".format(build_scripts_dir))
- log.info("Sources directory: {}".format(self.sources_dir))
+ log.info("Sources directory: {}".format(self.sources_dir))
log.info(dedent("""
Building {st_package_name} will create and touch directories
in the following order:
@@ -767,9 +767,9 @@ class PysideBuild(_build):
setuptools install directory
(usually path-installed-python/lib/python*/site-packages/*)
""").format(st_package_name=config.package_name()))
- log.info("make build directory: {}".format(self.build_dir))
+ log.info("make build directory: {}".format(self.build_dir))
log.info("make install directory: {}".format(self.install_dir))
- log.info("setuptools build directory: {}".format(self.st_build_dir))
+ log.info("setuptools build directory: {}".format(self.st_build_dir))
log.info("setuptools install directory: {}".format(setuptools_install_prefix))
log.info(dedent("""
make-installed site-packages directory: {}
@@ -779,15 +779,15 @@ class PysideBuild(_build):
self.site_packages_dir))
log.info("-" * 3)
log.info("Python executable: {}".format(self.py_executable))
- log.info("Python includes: {}".format(self.py_include_dir))
- log.info("Python library: {}".format(self.py_library))
- log.info("Python prefix: {}".format(self.py_prefix))
- log.info("Python scripts: {}".format(self.py_scripts_dir))
+ log.info("Python includes: {}".format(self.py_include_dir))
+ log.info("Python library: {}".format(self.py_library))
+ log.info("Python prefix: {}".format(self.py_prefix))
+ log.info("Python scripts: {}".format(self.py_scripts_dir))
log.info("-" * 3)
- log.info("Qt qmake: {}".format(self.qtinfo.qmake_command))
+ log.info("Qt qmake: {}".format(self.qtinfo.qmake_command))
log.info("Qt version: {}".format(self.qtinfo.version))
- log.info("Qt bins: {}".format(self.qtinfo.bins_dir))
- log.info("Qt docs: {}".format(self.qtinfo.docs_dir))
+ log.info("Qt bins: {}".format(self.qtinfo.bins_dir))
+ log.info("Qt docs: {}".format(self.qtinfo.docs_dir))
log.info("Qt plugins: {}".format(self.qtinfo.plugins_dir))
log.info("-" * 3)
if sys.platform == 'win32':
@@ -1074,7 +1074,7 @@ class PysideBuild(_build):
log.info("Reusing old configuration for module {} ({})...".format(
extension, module_src_dir))
- log.info("Compiling module {}...".format(extension))
+ log.info("-- Compiling module {}...".format(extension))
cmd_make = [self.make_path]
if OPTION["JOBS"]:
cmd_make.append(OPTION["JOBS"])
diff --git a/build_scripts/setup_runner.py b/build_scripts/setup_runner.py
index 1a7317e4d..b5b55fa20 100644
--- a/build_scripts/setup_runner.py
+++ b/build_scripts/setup_runner.py
@@ -41,6 +41,8 @@ import sys
import os
import textwrap
+import distutils.log as log
+
from build_scripts.config import config
from build_scripts.main import get_package_version, get_setuptools_extension_modules
from build_scripts.main import cmd_class_dict
@@ -49,6 +51,8 @@ from build_scripts.utils import run_process
from setuptools import setup
+if OPTION["VERBOSE_BUILD"]:
+ log.set_verbosity(1)
class SetupRunner(object):
def __init__(self, orig_argv):
@@ -148,7 +152,7 @@ class SetupRunner(object):
for cmd in self.invocations_list:
cmd_as_string = " ".join(cmd)
- print("\nRunning process: {}\n".format(cmd_as_string))
+ log.info("\nRunning setup: {}\n".format(cmd_as_string))
exit_code = run_process(cmd)
if exit_code != 0:
msg = textwrap.dedent("""
diff --git a/build_scripts/utils.py b/build_scripts/utils.py
index d1bc780dc..9f6d472cc 100644
--- a/build_scripts/utils.py
+++ b/build_scripts/utils.py
@@ -388,7 +388,7 @@ def run_process(args, initial_env=None):
No output is captured.
"""
command = " ".join([(" " in x and '"{}"'.format(x) or x) for x in args])
- log.info("Running process in directory {}: command {}".format(os.getcwd(), command))
+ log.info("In directory {}:\n\tRunning command: {}".format(os.getcwd(), command))
if initial_env is None:
initial_env = os.environ
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index bab97f41e..dc2beded0 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -83,7 +83,7 @@ find_package(Qt${QT_MAJOR_VERSION} 5.12 REQUIRED COMPONENTS Core)
add_definitions(${Qt${QT_MAJOR_VERSION}Core_DEFINITIONS})
find_file(GL_H "gl.h" PATH_SUFFIXES "GL")
-message("result:" "${GL_H}")
+message(STATUS "GL Headers path:" "${GL_H}")
include(FindQt5Extra)
set(XVFB_EXEC "")
diff --git a/sources/shiboken2/CMakeLists.txt b/sources/shiboken2/CMakeLists.txt
index 5877971a9..3de5d3223 100644
--- a/sources/shiboken2/CMakeLists.txt
+++ b/sources/shiboken2/CMakeLists.txt
@@ -66,13 +66,13 @@ set(shiboken2_library_so_version "${shiboken_MAJOR_VERSION}.${shiboken_MINOR_VER
compute_config_py_values(shiboken2_VERSION)
## For debugging the PYTHON* variables
-message("PYTHONLIBS_FOUND: " ${PYTHONLIBS_FOUND})
-message("PYTHON_LIBRARIES: " ${PYTHON_LIBRARIES})
-message("PYTHON_INCLUDE_DIRS: " ${PYTHON_INCLUDE_DIRS})
-message("PYTHON_DEBUG_LIBRARIES: " ${PYTHON_DEBUG_LIBRARIES})
-message("PYTHONINTERP_FOUND: " ${PYTHONINTERP_FOUND})
-message("PYTHON_EXECUTABLE: " ${PYTHON_EXECUTABLE})
-message("PYTHON_VERSION: " ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH})
+message(STATUS "PYTHONLIBS_FOUND: " ${PYTHONLIBS_FOUND})
+message(STATUS "PYTHON_LIBRARIES: " ${PYTHON_LIBRARIES})
+message(STATUS "PYTHON_INCLUDE_DIRS: " ${PYTHON_INCLUDE_DIRS})
+message(STATUS "PYTHON_DEBUG_LIBRARIES: " ${PYTHON_DEBUG_LIBRARIES})
+message(STATUS "PYTHONINTERP_FOUND: " ${PYTHONINTERP_FOUND})
+message(STATUS "PYTHON_EXECUTABLE: " ${PYTHON_EXECUTABLE})
+message(STATUS "PYTHON_VERSION: " ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH})
if (NOT PYTHON_EXTENSION_SUFFIX)
get_python_extension_suffix()
diff --git a/sources/shiboken2/data/shiboken_helpers.cmake b/sources/shiboken2/data/shiboken_helpers.cmake
index 6bd75d0ea..5e0c6ea72 100644
--- a/sources/shiboken2/data/shiboken_helpers.cmake
+++ b/sources/shiboken2/data/shiboken_helpers.cmake
@@ -244,7 +244,7 @@ macro(get_python_extension_suffix)
"
OUTPUT_VARIABLE PYTHON_EXTENSION_SUFFIX
OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("PYTHON_EXTENSION_SUFFIX: " ${PYTHON_EXTENSION_SUFFIX})
+ message(STATUS "PYTHON_EXTENSION_SUFFIX: " ${PYTHON_EXTENSION_SUFFIX})
endmacro()
macro(get_llvm_config)
@@ -260,7 +260,7 @@ macro(get_llvm_config)
"
OUTPUT_VARIABLE LLVM_CONFIG
OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("LLVM_CONFIG: " ${LLVM_CONFIG})
+ message(STATUS "LLVM_CONFIG: " ${LLVM_CONFIG})
endmacro()
macro(get_python_arch)
@@ -271,7 +271,7 @@ macro(get_python_arch)
"
OUTPUT_VARIABLE PYTHON_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("PYTHON_ARCH: " ${PYTHON_ARCH})
+ message(STATUS "PYTHON_ARCH: " ${PYTHON_ARCH})
endmacro()
macro(shiboken_parse_all_arguments prefix type flags options multiopts)
diff --git a/sources/shiboken2/doc/CMakeLists.txt b/sources/shiboken2/doc/CMakeLists.txt
index faad446a1..9fee96298 100644
--- a/sources/shiboken2/doc/CMakeLists.txt
+++ b/sources/shiboken2/doc/CMakeLists.txt
@@ -1,7 +1,9 @@
+cmake_minimum_required(VERSION 3.1)
+
find_program(SPHINX sphinx-build DOC "Path to sphinx-build binary.")
if (SPHINX)
- message("-- sphinx-build - found")
+ message(STATUS "sphinx-build - found")
configure_file(conf.py.in conf.py @ONLY)
# conditional tag for sphinx build
#string(JOIN "_" SPHINX_TAG ${DOC_OUTPUT_FORMAT} "format")
@@ -39,7 +41,7 @@ except:
VERBATIM)
endif()
else()
- message("-- sphinx-build - not found! doc target disabled")
+ message(WARNING "sphinx-build - not found! doc target disabled")
if (WIN32)
# if jom is used and we have no sphinx, then jom will crash.
# so for windows, we always create a doc target (until jom gets fixed...)
diff --git a/sources/shiboken2/libshiboken/CMakeLists.txt b/sources/shiboken2/libshiboken/CMakeLists.txt
index a38da8d89..dee5dbd21 100644
--- a/sources/shiboken2/libshiboken/CMakeLists.txt
+++ b/sources/shiboken2/libshiboken/CMakeLists.txt
@@ -14,7 +14,7 @@ macro(get_numpy_location)
break"
OUTPUT_VARIABLE PYTHON_NUMPY_LOCATION
OUTPUT_STRIP_TRAILING_WHITESPACE)
- message("PYTHON_NUMPY_LOCATION: " ${PYTHON_NUMPY_LOCATION})
+ message(STATUS "PYTHON_NUMPY_LOCATION: " ${PYTHON_NUMPY_LOCATION})
endmacro()
option(ENABLE_VERSION_SUFFIX "Used to use current version in suffix to generated files. This is used to allow multiples versions installed simultaneous." FALSE)
diff --git a/sources/shiboken2/tests/CMakeLists.txt b/sources/shiboken2/tests/CMakeLists.txt
index 0a9a6f11a..2ba951de1 100644
--- a/sources/shiboken2/tests/CMakeLists.txt
+++ b/sources/shiboken2/tests/CMakeLists.txt
@@ -1,3 +1,5 @@
+cmake_minimum_required(VERSION 3.1)
+
if(BUILD_TESTS)
find_package(Qt${QT_MAJOR_VERSION}Test 5.12 REQUIRED)
endif()
@@ -42,24 +44,20 @@ if(NOT CTEST_TESTING_TIMEOUT)
set(CTEST_TESTING_TIMEOUT 60)
endif()
-if(CMAKE_VERSION VERSION_LESS 2.8)
- message("CMake version greater than 2.8 necessary to run tests")
-else()
- get_filename_component(BUILD_DIR "${libminimal_BINARY_DIR}" DIRECTORY)
- get_filename_component(BUILD_DIR "${BUILD_DIR}" DIRECTORY)
- get_filename_component(BUILD_DIR "${BUILD_DIR}" DIRECTORY)
- foreach(test_file ${TEST_FILES})
- string(REGEX MATCH "/([^/]+)(binding|module)/([^/]+)_test.py" tmp ${test_file})
- set(test_name "${CMAKE_MATCH_1}_${CMAKE_MATCH_3}")
- list(FIND test_blacklist ${test_name} expect_fail)
- add_test(${test_name} ${PYTHON_EXECUTABLE} ${test_file})
- set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "BUILD_DIR=${BUILD_DIR}")
- set_tests_properties(${test_name} PROPERTIES TIMEOUT ${CTEST_TESTING_TIMEOUT})
- if (${expect_fail} GREATER -1)
- set_tests_properties(${test_name} PROPERTIES WILL_FAIL TRUE)
- endif()
- endforeach()
-endif()
+get_filename_component(BUILD_DIR "${libminimal_BINARY_DIR}" DIRECTORY)
+get_filename_component(BUILD_DIR "${BUILD_DIR}" DIRECTORY)
+get_filename_component(BUILD_DIR "${BUILD_DIR}" DIRECTORY)
+foreach(test_file ${TEST_FILES})
+ string(REGEX MATCH "/([^/]+)(binding|module)/([^/]+)_test.py" tmp ${test_file})
+ set(test_name "${CMAKE_MATCH_1}_${CMAKE_MATCH_3}")
+ list(FIND test_blacklist ${test_name} expect_fail)
+ add_test(${test_name} ${PYTHON_EXECUTABLE} ${test_file})
+ set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "BUILD_DIR=${BUILD_DIR}")
+ set_tests_properties(${test_name} PROPERTIES TIMEOUT ${CTEST_TESTING_TIMEOUT})
+ if (${expect_fail} GREATER -1)
+ set_tests_properties(${test_name} PROPERTIES WILL_FAIL TRUE)
+ endif()
+endforeach()
add_subdirectory(dumpcodemodel)
diff --git a/sources/shiboken2/tests/test_generator/CMakeLists.txt b/sources/shiboken2/tests/test_generator/CMakeLists.txt
index da8cde6f8..07611e32c 100644
--- a/sources/shiboken2/tests/test_generator/CMakeLists.txt
+++ b/sources/shiboken2/tests/test_generator/CMakeLists.txt
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.1)
project(test_generator)
set(dummy_generator_SRC dummygenerator.cpp)
@@ -32,15 +33,8 @@ if(WIN32)
endif()
macro(m_add_test testname)
- if(CMAKE_VERSION VERSION_LESS 2.8)
- add_test(${testname} ${CMAKE_COMMAND} -DTEST=${testname}
- -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}
- -DENV_PATH=${ENV_PATH} -DENV_QT_PLUGIN_PATH=${ENV_QT_PLUGIN_PATH}
- -P ${CMAKE_CURRENT_SOURCE_DIR}/run_test.cmake)
- else()
- add_test(${testname} ${testname})
- set_property(TEST ${testname} PROPERTY ENVIRONMENT "PATH=${ENV_PATH}" "QT_PLUGIN_PATH=${ENV_QT_PLUGIN_PATH}")
- endif()
+ add_test(${testname} ${testname})
+ set_property(TEST ${testname} PROPERTY ENVIRONMENT "PATH=${ENV_PATH}" "QT_PLUGIN_PATH=${ENV_QT_PLUGIN_PATH}")
endmacro()
macro(declare_test testname)