diff --git a/Seabreeze/CMakeLists.txt b/Seabreeze/CMakeLists.txt index 4ac37b2f..5773d435 100644 --- a/Seabreeze/CMakeLists.txt +++ b/Seabreeze/CMakeLists.txt @@ -18,9 +18,9 @@ set_cmake_policies() setup_boost(program_options) setup_qt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/anabatic/CMakeLists.txt b/anabatic/CMakeLists.txt index dce068a6..2046b1a9 100644 --- a/anabatic/CMakeLists.txt +++ b/anabatic/CMakeLists.txt @@ -18,8 +18,8 @@ set_cmake_policies() setup_boost() setup_qt() + setup_python() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/anabatic/src/CMakeLists.txt b/anabatic/src/CMakeLists.txt index bd98aa1f..a4562213 100644 --- a/anabatic/src/CMakeLists.txt +++ b/anabatic/src/CMakeLists.txt @@ -14,7 +14,6 @@ endif ( CHECK_DETERMINISM ) ${QtX_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) set( includes anabatic/Constants.h anabatic/Configuration.h anabatic/Matrix.h diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 5ac1ba25..7552a3e1 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -11,8 +11,7 @@ list(INSERT CMAKE_MODULE_PATH 0 "${Bootstrap_SOURCE_DIR}/cmake_modules/") find_package(Bootstrap REQUIRED) - # find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) print_cmake_module_path() diff --git a/bootstrap/builder/Builder.py b/bootstrap/builder/Builder.py index 68a29c7d..2d4f06c1 100644 --- a/bootstrap/builder/Builder.py +++ b/bootstrap/builder/Builder.py @@ -35,6 +35,7 @@ class Builder: self._noCache = False self._ninja = False self._clang = False + self._manylinux = False self._noSystemBoost = False self._macports = False self._devtoolset = 0 @@ -62,6 +63,7 @@ class Builder: elif attribute == "noCache": self._noCache = value elif attribute == "ninja": self._ninja = value elif attribute == "clang": self._clang = value + elif attribute == "manylinux": self._manylinux = value elif attribute == "macports": self._macports = value if value: self._noSystemBoost = True @@ -177,6 +179,7 @@ class Builder: if self._bfd: command += [ "-D", "USE_LIBBFD:STRING=%s" % self._bfd ] if self._qt4: command += [ "-D", "WITH_QT4:STRING=TRUE" ] if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ] + if self._manylinux: command += [ "-D", "USE_MANYLINUX:STRING=TRUE" ] command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode #, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared , "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir diff --git a/bootstrap/ccb.py b/bootstrap/ccb.py index 1e454757..89b04430 100755 --- a/bootstrap/ccb.py +++ b/bootstrap/ccb.py @@ -211,6 +211,7 @@ parser.add_option ( "--bfd" , action="store_true" , parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." ) parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." ) parser.add_option ( "--clang" , action="store_true" , dest="clang" , help="Force use of Clang C/C++ compiler instead of system default." ) +parser.add_option ( "--manylinux" , action="store_true" , dest="manylinux" , help="Build target is manylinux (PyPY)." ) parser.add_option ( "--make" , action="store" , type="string", dest="makeArguments" , help="Arguments to pass to make (ex: \"-j4 install\")." ) parser.add_option ( "--project" , action="append" , type="string", dest="projects" , help="The name of a project to build (may appears any number of time)." ) parser.add_option ( "-t", "--tool" , action="append" , type="string", dest="tools" , help="The name of a tool to build (may appears any number of time)." ) @@ -282,6 +283,7 @@ else: if options.llvmtoolset: builder.llvmtoolset = options.llvmtoolset if options.bfd: builder.bfd = "ON" if options.qt4: builder.qt4 = True + if options.manylinux: builder.manylinux = True if options.openmp: builder.openmp = True if options.makeArguments: builder.makeArguments = options.makeArguments #if options.svnMethod: builder.svnMethod = options.svnMethod diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index 1f9c55db..2bcd02db 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -223,6 +223,20 @@ endif() endmacro(setup_boost) +# +# Setup Python, select detection depending on USE_MANYLINUX. +# + macro(setup_python) + set(pydevelArg "Development") + + if (USE_MANYLINUX) + message(STATUS "Build for manylinux") + set(pydevelArg "Development.Module") + endif() + find_package(Python 3 REQUIRED COMPONENTS Interpreter ${pydevelArg} ) + endmacro() + + # # Find Qt, the union of all the modules we need for the whole project. # diff --git a/bora/CMakeLists.txt b/bora/CMakeLists.txt index c0b0d7fc..cdad18f5 100644 --- a/bora/CMakeLists.txt +++ b/bora/CMakeLists.txt @@ -18,9 +18,9 @@ setup_boost(program_options) setup_qt() setup_qwt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/crlcore/CMakeLists.txt b/crlcore/CMakeLists.txt index 8a637c51..0e6e3515 100644 --- a/crlcore/CMakeLists.txt +++ b/crlcore/CMakeLists.txt @@ -21,6 +21,7 @@ setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options) setup_qt() + setup_python() cmake_policy(SET CMP0054 NEW) @@ -28,7 +29,6 @@ find_package(Libbfd) endif() find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) diff --git a/crlcore/src/cyclop/CMakeLists.txt b/crlcore/src/cyclop/CMakeLists.txt index 438233a0..6216cae8 100644 --- a/crlcore/src/cyclop/CMakeLists.txt +++ b/crlcore/src/cyclop/CMakeLists.txt @@ -1,6 +1,5 @@ # -*- explicit-buffer-name: "CMakeLists.txt" -*- - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore ${HURRICANE_INCLUDE_DIR} ${UTILITIES_INCLUDE_DIR} diff --git a/crlcore/src/pyCRL/CMakeLists.txt b/crlcore/src/pyCRL/CMakeLists.txt index 5103e903..f66dc190 100644 --- a/crlcore/src/pyCRL/CMakeLists.txt +++ b/crlcore/src/pyCRL/CMakeLists.txt @@ -32,8 +32,6 @@ -lutil ) - find_package (Python3 COMPONENTS Interpreter Development) - add_definitions( -DCORIOLIS_TOP="${CORIOLIS_TOP}" -DSYS_CONF_DIR="${SYS_CONF_DIR}" -DPYTHON_SITE_PACKAGES="${PYTHON_SITE_PACKAGES}" diff --git a/crlcore/src/x2y/CMakeLists.txt b/crlcore/src/x2y/CMakeLists.txt index 7a7538b2..9b1a9aa3 100644 --- a/crlcore/src/x2y/CMakeLists.txt +++ b/crlcore/src/x2y/CMakeLists.txt @@ -1,7 +1,6 @@ # -*- explicit-buffer-name: "CMakeLists.txt -*- - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore ${HURRICANE_INCLUDE_DIR} ${UTILITIES_INCLUDE_DIR} diff --git a/etesian/CMakeLists.txt b/etesian/CMakeLists.txt index 35eeda18..0cc4d88c 100644 --- a/etesian/CMakeLists.txt +++ b/etesian/CMakeLists.txt @@ -17,8 +17,8 @@ set_cmake_policies() setup_boost(program_options) + setup_python() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) #find_package(KATABATIC REQUIRED) diff --git a/etesian/src/CMakeLists.txt b/etesian/src/CMakeLists.txt index 149e64c0..fde42bd3 100644 --- a/etesian/src/CMakeLists.txt +++ b/etesian/src/CMakeLists.txt @@ -10,7 +10,6 @@ ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) set( includes etesian/Configuration.h etesian/Placement.h etesian/FeedCells.h diff --git a/flute/CMakeLists.txt b/flute/CMakeLists.txt index b8f55141..ffd9a41a 100644 --- a/flute/CMakeLists.txt +++ b/flute/CMakeLists.txt @@ -16,8 +16,8 @@ set_cmake_policies() check_distribution() setup_sysconfdir( "${CMAKE_INSTALL_PREFIX}" ) + setup_python() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/flute/src/3.1/CMakeLists.txt b/flute/src/3.1/CMakeLists.txt index d9ca1cfb..0d09854c 100644 --- a/flute/src/3.1/CMakeLists.txt +++ b/flute/src/3.1/CMakeLists.txt @@ -6,7 +6,6 @@ ${CONFIGURATION_INCLUDE_DIR} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) set( includes flute.h dl.h diff --git a/foehn/CMakeLists.txt b/foehn/CMakeLists.txt index 6bc7e2cc..77d06664 100644 --- a/foehn/CMakeLists.txt +++ b/foehn/CMakeLists.txt @@ -18,9 +18,9 @@ set_cmake_policies() setup_boost(program_options) setup_qt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index d398d482..ab937cc7 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -20,11 +20,11 @@ cmake_policy(SET CMP0054 NEW) setup_boost(program_options) setup_qt() + setup_python() find_package(BZip2 REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) find_package(PythonSitePackages REQUIRED) find_package(Libexecinfo REQUIRED) if (USE_LIBBFD) diff --git a/hurricane/src/isobar/CMakeLists.txt b/hurricane/src/isobar/CMakeLists.txt index 951f3701..7d2da0d3 100644 --- a/hurricane/src/isobar/CMakeLists.txt +++ b/hurricane/src/isobar/CMakeLists.txt @@ -8,7 +8,6 @@ ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) set( pyCpps ProxyProperty.cpp PythonAttributes.cpp PyBreakpoint.cpp diff --git a/ispd/CMakeLists.txt b/ispd/CMakeLists.txt index 4ccc9c26..701632e4 100644 --- a/ispd/CMakeLists.txt +++ b/ispd/CMakeLists.txt @@ -14,10 +14,10 @@ set_cmake_policies() #setup_apple() setup_boost(program_options) + setup_python() set(QT_USE_QTXML "true") find_package(Qt4 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/karakaze/CMakeLists.txt b/karakaze/CMakeLists.txt index bbaa19d3..5597414a 100644 --- a/karakaze/CMakeLists.txt +++ b/karakaze/CMakeLists.txt @@ -15,7 +15,7 @@ check_distribution() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + setup_python() find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/katana/CMakeLists.txt b/katana/CMakeLists.txt index c196c67c..9be4a8c4 100644 --- a/katana/CMakeLists.txt +++ b/katana/CMakeLists.txt @@ -18,9 +18,9 @@ set_cmake_policies() setup_boost(program_options) setup_qt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/katana/src/CMakeLists.txt b/katana/src/CMakeLists.txt index 88ab418a..be4a01f8 100644 --- a/katana/src/CMakeLists.txt +++ b/katana/src/CMakeLists.txt @@ -12,7 +12,6 @@ ${Boost_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ) - find_package (Python3 COMPONENTS Interpreter Development) set( includes katana/Constants.h katana/Block.h katana/TrackCost.h diff --git a/oroshi/CMakeLists.txt b/oroshi/CMakeLists.txt index d5f6890d..c857cdc4 100644 --- a/oroshi/CMakeLists.txt +++ b/oroshi/CMakeLists.txt @@ -14,11 +14,11 @@ set_cmake_policies() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options) + setup_python() if (USE_LIBBFD) find_package(Libbfd) endif() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt index 4b10fcff..ee90f606 100644 --- a/stratus1/CMakeLists.txt +++ b/stratus1/CMakeLists.txt @@ -12,6 +12,7 @@ list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) + setup_python() find_package(Bootstrap REQUIRED) set_cmake_policies() @@ -19,7 +20,6 @@ cmake_policy(SET CMP0002 OLD) setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/tramontana/CMakeLists.txt b/tramontana/CMakeLists.txt index 6af613ef..5dedfe37 100644 --- a/tramontana/CMakeLists.txt +++ b/tramontana/CMakeLists.txt @@ -17,8 +17,8 @@ set_cmake_policies() setup_boost() setup_qt() + setup_python() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/tutorial/CMakeLists.txt b/tutorial/CMakeLists.txt index 293de9a5..879f0f80 100644 --- a/tutorial/CMakeLists.txt +++ b/tutorial/CMakeLists.txt @@ -17,9 +17,9 @@ set_cmake_policies() setup_boost(program_options) setup_qt() + setup_python() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt index 119cb23e..ed1074d2 100644 --- a/unicorn/CMakeLists.txt +++ b/unicorn/CMakeLists.txt @@ -19,12 +19,12 @@ setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options) setup_qt() + setup_python() if (USE_LIBBFD) find_package(Libbfd) endif() find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(COLOQUINTE) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index e3287790..60909c27 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -21,13 +21,13 @@ setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options) setup_qt() + setup_python() if (USE_LIBBFD) find_package(Libbfd) endif() find_package(Libexecinfo REQUIRED) find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF) find_package(HURRICANE REQUIRED)