diff --git a/Seabreeze/CMakeLists.txt b/Seabreeze/CMakeLists.txt index 77335161..78c06c11 100644 --- a/Seabreeze/CMakeLists.txt +++ b/Seabreeze/CMakeLists.txt @@ -20,7 +20,7 @@ setup_qt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/anabatic/CMakeLists.txt b/anabatic/CMakeLists.txt index 825c5bd7..2bb1c8b4 100644 --- a/anabatic/CMakeLists.txt +++ b/anabatic/CMakeLists.txt @@ -19,7 +19,7 @@ setup_boost() setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 0194a460..b1e1c543 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -11,7 +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.Module ) find_package(PythonSitePackages REQUIRED) print_cmake_module_path() diff --git a/bora/CMakeLists.txt b/bora/CMakeLists.txt index 47ff1916..f7555857 100644 --- a/bora/CMakeLists.txt +++ b/bora/CMakeLists.txt @@ -20,7 +20,7 @@ setup_qwt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/build.py b/builder.py similarity index 98% rename from build.py rename to builder.py index 2de84897..85344198 100644 --- a/build.py +++ b/builder.py @@ -5,18 +5,18 @@ import platform import re import subprocess import sys -import sysconfig from distutils.version import LooseVersion from distutils.dir_util import copy_tree, remove_tree from distutils.sysconfig import get_python_inc -import distutils.sysconfig as sysconfig +from distutils import sysconfig from find_libpython import find_libpython from typing import Any, Dict from setuptools.command.build_ext import build_ext from setuptools.extension import Extension + class CMakeExtension(Extension): name: str # exists, even though IDE doesn't find it @@ -86,7 +86,6 @@ class ExtensionBuilder(build_ext): cmake_args += [f"-DCORIOLIS_USER_TOP={install_dir}"] cmake_args += [f"-DPython_EXECUTABLE={sys.executable}"] - cmake_args += [f"-DPython_LIBRARY={find_libpython()}"] cmake_args += ["-DPOETRY=1"] cmake_args += ["-DWITH_QT5=1"] @@ -96,6 +95,8 @@ class ExtensionBuilder(build_ext): cmake_args += ["-DCMAKE_INSTALL_RPATH='$ORIGIN/lib:$ORIGIN'"] cmake_args += ["-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"] + + print(f"Using cmake args: {cmake_args}") subprocess.check_call(["cmake", "--debug-find", "--trace-redirect=build.cmake.trace", "--trace-expand", ext.sourcedir] + cmake_args, cwd=build_dir, env=env) subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=build_dir) subprocess.check_call(["cmake", "--install", ".", "--prefix", install_dir] + install_args, cwd=build_dir) diff --git a/crlcore/CMakeLists.txt b/crlcore/CMakeLists.txt index c33b7b82..00e82ed1 100644 --- a/crlcore/CMakeLists.txt +++ b/crlcore/CMakeLists.txt @@ -28,7 +28,7 @@ find_package(Libbfd) endif() find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) diff --git a/cumulus/CMakeLists.txt b/cumulus/CMakeLists.txt index 88663684..0b9c327c 100644 --- a/cumulus/CMakeLists.txt +++ b/cumulus/CMakeLists.txt @@ -15,7 +15,7 @@ set_cmake_policies() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/deprecated/katabatic/CMakeLists.txt b/deprecated/katabatic/CMakeLists.txt index c87080a7..f0a2c54b 100644 --- a/deprecated/katabatic/CMakeLists.txt +++ b/deprecated/katabatic/CMakeLists.txt @@ -19,7 +19,7 @@ setup_boost(program_options) setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/deprecated/kite/CMakeLists.txt b/deprecated/kite/CMakeLists.txt index f1922c66..f3dfa321 100644 --- a/deprecated/kite/CMakeLists.txt +++ b/deprecated/kite/CMakeLists.txt @@ -19,7 +19,7 @@ setup_boost(program_options) setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(FLUTE REQUIRED) find_package(LEFDEF REQUIRED) diff --git a/deprecated/nimbus/CMakeLists.txt b/deprecated/nimbus/CMakeLists.txt index 0b549ca9..aaedfdd6 100644 --- a/deprecated/nimbus/CMakeLists.txt +++ b/deprecated/nimbus/CMakeLists.txt @@ -14,7 +14,7 @@ setup_boost(program_options) setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/deprecated/vlsisapd/CMakeLists.txt b/deprecated/vlsisapd/CMakeLists.txt index 984b1ddc..71da9818 100644 --- a/deprecated/vlsisapd/CMakeLists.txt +++ b/deprecated/vlsisapd/CMakeLists.txt @@ -18,7 +18,7 @@ setup_boost(program_options python) find_package(LibXml2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) diff --git a/etesian/CMakeLists.txt b/etesian/CMakeLists.txt index ae9b82b0..a859a644 100644 --- a/etesian/CMakeLists.txt +++ b/etesian/CMakeLists.txt @@ -18,7 +18,7 @@ set_cmake_policies() setup_boost(program_options) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) #find_package(KATABATIC REQUIRED) diff --git a/flute/CMakeLists.txt b/flute/CMakeLists.txt index b7011add..61da4ea1 100644 --- a/flute/CMakeLists.txt +++ b/flute/CMakeLists.txt @@ -17,7 +17,7 @@ check_distribution() setup_sysconfdir( "${CMAKE_INSTALL_PREFIX}" ) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/foehn/CMakeLists.txt b/foehn/CMakeLists.txt index 09beea02..e679786a 100644 --- a/foehn/CMakeLists.txt +++ b/foehn/CMakeLists.txt @@ -20,7 +20,7 @@ setup_qt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index 91c9b06f..8b582fc0 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -24,7 +24,7 @@ find_package(BZip2 REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development ) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module ) find_package(PythonSitePackages REQUIRED) find_package(Libexecinfo REQUIRED) if (USE_LIBBFD) diff --git a/ispd/CMakeLists.txt b/ispd/CMakeLists.txt index 63932fc5..db474da9 100644 --- a/ispd/CMakeLists.txt +++ b/ispd/CMakeLists.txt @@ -17,7 +17,7 @@ set(QT_USE_QTXML "true") find_package(Qt4 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/karakaze/CMakeLists.txt b/karakaze/CMakeLists.txt index e9ecd1c2..eb61086a 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) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/katana/CMakeLists.txt b/katana/CMakeLists.txt index 3ba565a5..ad288fce 100644 --- a/katana/CMakeLists.txt +++ b/katana/CMakeLists.txt @@ -20,7 +20,7 @@ setup_qt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(FLUTE REQUIRED) diff --git a/mauka/CMakeLists.txt b/mauka/CMakeLists.txt index 9e3e2fbe..e63de3fd 100644 --- a/mauka/CMakeLists.txt +++ b/mauka/CMakeLists.txt @@ -15,7 +15,7 @@ setup_boost(program_options) setup_qt() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/metis/CMakeLists.txt b/metis/CMakeLists.txt index 0ff95e81..16238519 100644 --- a/metis/CMakeLists.txt +++ b/metis/CMakeLists.txt @@ -14,7 +14,7 @@ set_cmake_policies() setup_boost() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/oroshi/CMakeLists.txt b/oroshi/CMakeLists.txt index 61b35bf0..b22da068 100644 --- a/oroshi/CMakeLists.txt +++ b/oroshi/CMakeLists.txt @@ -18,7 +18,7 @@ if (USE_LIBBFD) find_package(Libbfd) endif() - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/poetry.lock b/poetry.lock index adf2e059..eadf4b85 100644 --- a/poetry.lock +++ b/poetry.lock @@ -33,7 +33,7 @@ test = ["codecov (>=2.0.5)", "coverage (>=4.2)", "flake8 (>=3.0.4)", "path.py (> name = "find-libpython" version = "0.3.0" description = "Finds the libpython associated with your environment, wherever it may be hiding" -category = "dev" +category = "main" optional = false python-versions = "*" files = [ @@ -43,5 +43,5 @@ files = [ [metadata] lock-version = "2.0" -python-versions = "^3.6" -content-hash = "3977d779a407995475d178890d20631837483f241de6836600bb92b3d211766b" +python-versions = "^3.8" +content-hash = "abbc1ba1fde22ac8e6b5fc0fe7430c18cad5c97aea6a80ea9283c0b11099c71d" diff --git a/pyproject.toml b/pyproject.toml index bfb88842..198a1e2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,13 +3,14 @@ name = "Coriolis" version = "2.5.0" description = "Place and Route for semiconductors" authors = ["Jean-Paul Chaput "] -build = "build.py" +build = "builder.py" packages = [ { include = "Coriolis"} ] [tool.poetry.dependencies] -python = "^3.6" +python = "^3.8" +find-libpython = "^0.3.0" [tool.poetry.dev-dependencies] cmake = ">=3" @@ -23,10 +24,12 @@ unittests = 'Coriolis:unittests' yosys_coriolis = 'Coriolis:yosys_coriolis' [build-system] -requires = ["poetry-core", "setuptools", "cmake", "patchelf", "find_libpython"] +requires = ["poetry-core", "setuptools", "cmake", "patchelf", "find-libpython"] build-backend = "poetry.core.masonry.api" [tool.cibuildwheel.linux] +skip = ["cp36-*", "cp37-*", "pp*"] +build-frontend = "build" before-all = ''' yum install -y \ qt5-qtbase-devel qt5-qtsvg-devel \ @@ -37,3 +40,4 @@ before-all = ''' python3-devel libxml2-devel \ qwt-devel ''' +build-verbosity=2 diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt index 4ff8d5ae..fdf8128c 100644 --- a/stratus1/CMakeLists.txt +++ b/stratus1/CMakeLists.txt @@ -19,7 +19,7 @@ cmake_policy(SET CMP0002 OLD) setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(HURRICANE REQUIRED) find_package(CORIOLIS REQUIRED) diff --git a/tutorial/CMakeLists.txt b/tutorial/CMakeLists.txt index 42ccf5a8..a4c7edd6 100644 --- a/tutorial/CMakeLists.txt +++ b/tutorial/CMakeLists.txt @@ -19,7 +19,7 @@ setup_qt() find_package(Libexecinfo REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt index c3aec18d..f796749c 100644 --- a/unicorn/CMakeLists.txt +++ b/unicorn/CMakeLists.txt @@ -24,7 +24,7 @@ find_package(Libbfd) endif() find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(COLOQUINTE) diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index 4c1d7f7b..85b62a06 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -27,7 +27,7 @@ endif() find_package(Libexecinfo REQUIRED) find_package(BZip2 REQUIRED) - find_package(Python 3 REQUIRED COMPONENTS Interpreter Development) + find_package(Python 3 REQUIRED COMPONENTS Interpreter Development.Module) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF) find_package(HURRICANE REQUIRED)