From abf08d443d64eca95511c10bf81f6a301fcaf302 Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Sat, 15 Jul 2023 11:45:41 +0000 Subject: [PATCH 1/9] Set up parallel github CI based off Numpy's actions --- .github/workflows/wheels.yml | 102 +++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/wheels.yml diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 00000000..84c237c9 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,102 @@ +# Workflow to build and test wheels. +name: Wheel builder + +on: [push, pull_request] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +permissions: + contents: read # to fetch code (actions/checkout) + +jobs: + build_wheels: + name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }} + runs-on: ${{ matrix.buildplat[0] }} + strategy: + # Ensure that a wheel builder finishes even if another fails + fail-fast: false + matrix: + # Github Actions doesn't support pairing matrix values together, let's improvise + # https://github.com/github/feedback/discussions/7835#discussioncomment-1769026 + buildplat: + - [ubuntu-20.04, manylinux_x86_64] + #- [ubuntu-20.04, musllinux_x86_64] + #- [macos-12, macosx_x86_64] + #- [windows-2019, win_amd64] + python: ["cp39", "cp310", "cp311", "cp312"] # "pp39" + exclude: + # Don't build PyPy 32-bit windows + - buildplat: [windows-2019, win32] + python: "pp39" + - buildplat: [ ubuntu-20.04, musllinux_x86_64 ] + python: "pp39" + steps: + - name: Checkout Coriolis + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 + with: + submodules: true + # https://github.com/actions/checkout/issues/338 + fetch-depth: 0 + + - name: pkg-config-for-win + run: | + choco install -y --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite + if: runner.os == 'windows' + + # Used to push the built wheels + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + with: + python-version: "3.x" + + - name: ccache + uses: hendrikmuhs/ccache-action@v1.2 + + - name: Build wheels + uses: pypa/cibuildwheel@66b46d086804a9e9782354100d96a3a445431bca # v2.14.0 + env: + CIBW_PRERELEASE_PYTHONS: True + CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + + - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 + with: + name: ${{ matrix.python }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }} + path: ./wheelhouse/*.whl +# +# build_sdist: +# name: Build sdist +# runs-on: ubuntu-latest +# steps: +# - name: Checkout Coriolis +# uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 +# with: +# submodules: true +# fetch-depth: 0 +# # Used to push the built wheels +# - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 +# with: +# # Build sdist on lowest supported Python +# python-version: "3.9" +# - name: Build sdist +# run: | +# python -m pip install build +# python -m build -s +# - name: Test the sdist +# run: | +# # TODO: Don't run test suite, and instead build wheels from sdist +# # Depends on pypa/cibuildwheel#1020 +# python -m pip install dist/*.gz +# #cd .. # Can't import numpy within numpy src directory +# #python -c "import numpy, sys; print(numpy.__version__); sys.exit(numpy.test() is False)" +# +# - name: Check README rendering for PyPI +# run: | +# python -mpip install twine +# twine check dist/* +# +# - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 +# with: +# name: sdist +# path: ./dist/* +# From d77950de658c9e4041e2fd28b3b7158d48a7fc94 Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Sat, 15 Jul 2023 12:28:43 +0000 Subject: [PATCH 2/9] Use ccache to speed up build --- .github/workflows/wheels.yml | 2 ++ builder.py | 5 ++++- pyproject.toml | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 84c237c9..925e9a9c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -58,6 +58,8 @@ jobs: env: CIBW_PRERELEASE_PYTHONS: True CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} + CIBW_ENVIRONMENT: USE_CCACHE=1 CCACHE_DIR=/.ccache + CIBW_CONTAINER_ENGINE: "docker; create_args: '--volume=${{ github.workspace }}/.ccache:/.ccache'" - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 with: diff --git a/builder.py b/builder.py index 53f4b6b7..80972ff6 100644 --- a/builder.py +++ b/builder.py @@ -71,11 +71,14 @@ class ExtensionBuilder(build_ext): env = os.environ.copy() env["CXXFLAGS"] = '{} -DVERSION_INFO=\\"{}\\"'.format(env.get("CXXFLAGS", ""), self.distribution.get_version()) - + build_dir = os.path.join(self.build_temp, ext.sourcedir_rel) install_dir = os.path.join(extdir, 'Coriolis') os.makedirs(build_dir,exist_ok=True) + if "USE_CCACHE" in env: + cmake_args += ["-DCMAKE_CXX_COMPILER_LAUNCHER=ccache"] + cmake_args += [f"-DCMAKE_MODULE_PATH={os.path.abspath('bootstrap/cmake_modules')};" f"{os.path.join(install_dir, 'share/cmake/Modules')}"] cmake_args += [f"-DCMAKE_INSTALL_PREFIX={install_dir}"] diff --git a/pyproject.toml b/pyproject.toml index caf2fb7c..b248111f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ before-all = ''' boost-python boost-filesystem \ boost-regex boost-wave \ python36-devel libxml2-devel \ - qwt-devel + qwt-devel \ + ccache ''' build-verbosity=2 From ab99ab1099765e6ee8867021d77bc0edd2f3de09 Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Sun, 16 Jul 2023 05:56:44 +0000 Subject: [PATCH 3/9] Add cache key --- .github/workflows/wheels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 925e9a9c..13371e7c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -52,6 +52,8 @@ jobs: - name: ccache uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ matrix.python }}-${{ matrix.buildplat[1] }} - name: Build wheels uses: pypa/cibuildwheel@66b46d086804a9e9782354100d96a3a445431bca # v2.14.0 From 6499f00020cb013fdfd27815f4c89709890567a5 Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Sat, 15 Jul 2023 00:21:38 +0000 Subject: [PATCH 4/9] Update for new poetry builder interface --- poetry.lock | 43 +++++++++++++++++++++---------------------- pyproject.toml | 41 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 24 deletions(-) diff --git a/poetry.lock b/poetry.lock index efa10893..9739050d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,39 +1,38 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. [[package]] name = "cmake" -version = "3.25.0" +version = "3.26.4" description = "CMake is an open-source, cross-platform family of tools designed to build, test and package software" -category = "dev" optional = false python-versions = "*" files = [ - {file = "cmake-3.25.0-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl", hash = "sha256:e90a7a68384b25a05aab0f013cea76b69f00add2592393b0ff71e99c773db017"}, - {file = "cmake-3.25.0-py2.py3-none-manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:442e311c072ebfb42c42af829bc9394be3fe2bee65460ac7208128bfb867fd5b"}, - {file = "cmake-3.25.0-py2.py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a8ec4cb981a761f8e45240a130309d967d4d27893b67b886f0b7a534df923894"}, - {file = "cmake-3.25.0-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b3776a15ecd7d29d85b27c0ce507ce2ddacca53984ba949580ee629c3e08f345"}, - {file = "cmake-3.25.0-py2.py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aeffd7094c99c06f4e1fdeaec5e1ed7be288ad776399b4bc3e9873de51a30f68"}, - {file = "cmake-3.25.0-py2.py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f07c237f5e1a97131ea1e531b6a2b37a8b7afc25bcee3fc4d90756672b51e4d7"}, - {file = "cmake-3.25.0-py2.py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6bfa23225d81218cac09176da15a0a75ae64d9a4948ee06acd789d8f63cefb96"}, - {file = "cmake-3.25.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9b7fd744a90e4d804ff77ac50d3570009911fbfdad29c59fc93d2a82faaeb371"}, - {file = "cmake-3.25.0-py2.py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:096fee057b846a697c78fa83f6ddc82104c3a08b6282de5036537cf1dd642b02"}, - {file = "cmake-3.25.0-py2.py3-none-musllinux_1_1_i686.whl", hash = "sha256:fdc49b15a478f6be70b7e29d5d03b8af1879810b64f5515bc232f08257aaad15"}, - {file = "cmake-3.25.0-py2.py3-none-musllinux_1_1_ppc64le.whl", hash = "sha256:d2b6d4fa47cfd286ba13d7890d403f1de7dddd3cd90555c14ca5e04872754ed1"}, - {file = "cmake-3.25.0-py2.py3-none-musllinux_1_1_s390x.whl", hash = "sha256:36e1ed23332bc04444bcbfa06cfed0f03b3f02126691541cccf1720bc2007850"}, - {file = "cmake-3.25.0-py2.py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:94b4e9dfccd37dc16cefb37f828766fe3a28a463190215aaa87e5600b4812b98"}, - {file = "cmake-3.25.0-py2.py3-none-win32.whl", hash = "sha256:7548a3354d37f3c9f56b5b6fd0347a0f8e916d224b93b4e7aa0640a9e6e96f71"}, - {file = "cmake-3.25.0-py2.py3-none-win_amd64.whl", hash = "sha256:849f3760576810aee84108b3110a7e083c9fdc72fde26401c4ff4c340a2232c7"}, - {file = "cmake-3.25.0.tar.gz", hash = "sha256:d1658afd3362273782f57697f2fc4637fda1f5798ac64e0f3418a8ba5f6e790f"}, + {file = "cmake-3.26.4-py2.py3-none-macosx_10_10_universal2.macosx_10_10_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl", hash = "sha256:230227bf99f36614de84cdc92ffce3a50eb2803020e946f8da945a08fcf766bf"}, + {file = "cmake-3.26.4-py2.py3-none-manylinux2010_i686.manylinux_2_12_i686.whl", hash = "sha256:248a90816abfc10ff6e1109b54b8235c3e62f0ac92da16541753deb3b5ae063d"}, + {file = "cmake-3.26.4-py2.py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:1b92f9f59f48c803106dbdd6750b0f571a0500e25d3a62c42ba84bb7a9240d10"}, + {file = "cmake-3.26.4-py2.py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3175442985558d5415b97f264a6a1bb0af5ecfe10e3f7510257b1ea66bd33848"}, + {file = "cmake-3.26.4-py2.py3-none-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:1d887be5f1a3f17559a78707a6bc0560f4f8cb93cebb9d823d90a63e68bae09b"}, + {file = "cmake-3.26.4-py2.py3-none-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:235d8eac93a28dcce5a1cd7130412885a2aa53d5735cb2230e0f26f589347b65"}, + {file = "cmake-3.26.4-py2.py3-none-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:05cfd76c637eb22058c95e2dc383cadd4e0615e2643e637bb498a6cc24825790"}, + {file = "cmake-3.26.4-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:93015da6f1c0e1e5f2debf752f1803ea52d742d915ad674043d36e471f937507"}, + {file = "cmake-3.26.4-py2.py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:d726671ae7ae4aa6989e73d26b9f8f8e6af45163a26ea243949d72246566fdd8"}, + {file = "cmake-3.26.4-py2.py3-none-musllinux_1_1_i686.whl", hash = "sha256:432837364aa6cab2826a72e8a4cdd3586f5ac9ce495217ccd59aa70f2bba8120"}, + {file = "cmake-3.26.4-py2.py3-none-musllinux_1_1_ppc64le.whl", hash = "sha256:24110035aff586a04a6a6fcf4609270642e4f503c0620c962dff75b653f81414"}, + {file = "cmake-3.26.4-py2.py3-none-musllinux_1_1_s390x.whl", hash = "sha256:3e280e81713408987b7053f5b922c9f94e45668ca6efff1f02846309ca0b5b0f"}, + {file = "cmake-3.26.4-py2.py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:c3b0e72750c0f6c0373242c1299bc4ffdbebdd5004966ae6df0b2e9845aa6990"}, + {file = "cmake-3.26.4-py2.py3-none-win32.whl", hash = "sha256:e058e59154a1e490fb9425b420f87e28144292397607638d73e323509f7efae6"}, + {file = "cmake-3.26.4-py2.py3-none-win_amd64.whl", hash = "sha256:b7a6946c345497c14064e0c9585b30f5aaebbefdfc0b245b6bb5a978eb4fc85f"}, + {file = "cmake-3.26.4-py2.py3-none-win_arm64.whl", hash = "sha256:93a03bad17b9741acaff4a8651f8596496506602fa123e70fe67142f1b21ee2e"}, + {file = "cmake-3.26.4.tar.gz", hash = "sha256:d45b30b9ce7280829888c78650177ab525df2b6785e1a5b3d82b4c147d828c0e"}, ] [package.extras] -test = ["codecov (>=2.0.5)", "coverage (>=4.2)", "flake8 (>=3.0.4)", "path.py (>=11.5.0)", "pytest (>=3.0.3)", "pytest-cov (>=2.4.0)", "pytest-runner (>=2.9)", "pytest-virtualenv (>=1.7.0)", "scikit-build (>=0.10.0)", "setuptools (>=28.0.0)", "virtualenv (>=15.0.3)", "wheel"] +test = ["coverage (>=4.2)", "flake8 (>=3.0.4)", "path.py (>=11.5.0)", "pytest (>=3.0.3)", "pytest-cov (>=2.4.0)", "pytest-runner (>=2.9)", "pytest-virtualenv (>=1.7.0)", "scikit-build (>=0.10.0)", "setuptools (>=28.0.0)", "virtualenv (>=15.0.3)", "wheel"] [[package]] name = "find-libpython" version = "0.3.0" description = "Finds the libpython associated with your environment, wherever it may be hiding" -category = "main" optional = false python-versions = "*" files = [ @@ -45,7 +44,6 @@ files = [ name = "ninja" version = "1.11.1" description = "Ninja is a small build system with a focus on speed" -category = "dev" optional = false python-versions = "*" files = [ @@ -64,6 +62,7 @@ files = [ {file = "ninja-1.11.1-py2.py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:3b28b595ed580752240ade7821b6cb7a5a4c6a604c865dc474bd38f06e2eb7f5"}, {file = "ninja-1.11.1-py2.py3-none-win32.whl", hash = "sha256:3329b4b7c1694730772522a3ba0ba40fd15c012476ed3e1c9f0fd9e76190394e"}, {file = "ninja-1.11.1-py2.py3-none-win_amd64.whl", hash = "sha256:4e547bc759c570773d83d110c41fd5ca9a94c0a9a8388f5a3ea37bdf97d002b0"}, + {file = "ninja-1.11.1-py2.py3-none-win_arm64.whl", hash = "sha256:8cf96f92ccc851c600cb3e1251c34db06f1dd682de79188ad490c33cddc66981"}, {file = "ninja-1.11.1.tar.gz", hash = "sha256:c833a47d39b2d1eee3f9ca886fa1581efd5be6068b82734ac229961ee8748f90"}, ] diff --git a/pyproject.toml b/pyproject.toml index b248111f..7b3ac296 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,9 +4,42 @@ version = "0.0.0" description = "Place and Route for semiconductors" authors = ["Jean-Paul Chaput "] readme = "README.rst" -build = "builder.py" +homepage = "https://github.com/lip6/coriolis" +repository = "https://github.com/lip6/coriolis" packages = [ - { include = "Coriolis"} + { include = "Coriolis"}, +] +include = [ + "COPYRIGHT.rst", + "LICENSE.rst", + "README.rst", + "SUPPORT.rst", + "Seabreeze", + "anabatic", + "bootstrap", + "bora", + "builder.py", + "coloquinte", + "crlcore", + "cumulus", + "equinox", + "etesian", + "flute", + "foehn", + "hurricane", + "ispd", + "karakaze", + "katana", + "lefdef", + "oroshi", + "poetry.lock", + "pyproject.toml", + "solstice", + "stratus1", + "tramontana", + "tutorial", + "unicorn", + "unittests", ] [tool.poetry-dynamic-versioning] @@ -30,6 +63,10 @@ find-libpython = "^0.3.0" cmake = ">=3" ninja = "^1.11.1" +[tool.poetry.build] +script = "builder.py" +generate-setup-file = true + [tool.poetry.scripts] blif2vst = 'Coriolis:blif2vst' tutorial = 'Coriolis:tutorial' From b482abc34da5cc3bd09e6961f5b4734eab65f65c Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Sat, 15 Jul 2023 00:38:41 +0000 Subject: [PATCH 5/9] Add missing dependencies to cibuildwheel environment liblemon and eigen3 --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7b3ac296..dc8448cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,6 +91,9 @@ before-all = ''' boost-regex boost-wave \ python36-devel libxml2-devel \ qwt-devel \ - ccache + ccache \ + eigen3-devel \ + wget + wget http://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz; tar -xzf lemon-1.3.1.tar.gz; cd lemon-1.3.1; mkdir build; cd build; cmake ..; make install; cd ../.. ''' build-verbosity=2 From c0c0e873c26eb9ca68a3c1ba11d6e5653361188b Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Sat, 15 Jul 2023 01:57:25 +0000 Subject: [PATCH 6/9] Only use Development.Module for python dependency, necessary for manylinux build --- builder.py | 1 + cumulus/CMakeLists.txt | 2 +- deprecated/katabatic/CMakeLists.txt | 2 +- deprecated/kite/CMakeLists.txt | 2 +- deprecated/mauka/CMakeLists.txt | 2 +- deprecated/metis/CMakeLists.txt | 2 +- deprecated/nimbus/CMakeLists.txt | 2 +- deprecated/vlsisapd/CMakeLists.txt | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/builder.py b/builder.py index 80972ff6..3b57d04b 100644 --- a/builder.py +++ b/builder.py @@ -87,6 +87,7 @@ class ExtensionBuilder(build_ext): cmake_args += [f"-DSYS_CONF_DIR={install_dir}"] cmake_args += [f"-DCORIOLIS_TOP={install_dir}"] cmake_args += [f"-DCORIOLIS_USER_TOP={install_dir}"] + cmake_args += [f"-DUSE_MANYLINUX=TRUE"] cmake_args += [f"-DPython_EXECUTABLE={sys.executable}"] diff --git a/cumulus/CMakeLists.txt b/cumulus/CMakeLists.txt index 016becef..3bc764bd 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 2fbd6b9e..689aff94 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 94fb97b2..4a86c1f1 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/mauka/CMakeLists.txt b/deprecated/mauka/CMakeLists.txt index c7678924..7ef9ba0d 100644 --- a/deprecated/mauka/CMakeLists.txt +++ b/deprecated/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/deprecated/metis/CMakeLists.txt b/deprecated/metis/CMakeLists.txt index af0f847f..0f579019 100644 --- a/deprecated/metis/CMakeLists.txt +++ b/deprecated/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/deprecated/nimbus/CMakeLists.txt b/deprecated/nimbus/CMakeLists.txt index 32619a78..9c8d8c8d 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 b7cfae82..0b0f18db 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) From edafd1d2009d0f7a63fa9401eee7fd732a1b0a8d Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Sat, 15 Jul 2023 02:56:48 +0000 Subject: [PATCH 7/9] Revert "Fix missing libraries problems (seen on Cygwin)." This reverts commit 881e97bbd3940065c51b5cb9a7a83d8a0d0df8f5. --- bootstrap/cmake_modules/FindBootstrap.cmake | 24 ++++++++++----------- hurricane/src/configuration/CMakeLists.txt | 2 -- hurricane/src/viewer/CMakeLists.txt | 2 +- lefdef/src/def/defzlib/CMakeLists.txt | 2 +- lefdef/src/lef/lefzlib/CMakeLists.txt | 2 +- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index 2bcd02db..caf76dfe 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -86,17 +86,17 @@ set(ADDITIONAL_FLAGS "-D_GLIBCXX_USE_C99") set(CXX_STANDARD "gnu++17") else() - set(ADDITIONAL_FLAGS "-Wl,--no-undefined") + set(ADDTIONAL_FLAGS "") set(CXX_STANDARD "c++17") endif() -#set(CMAKE_C_FLAGS_DEBUG " -Wall -fsanitize=address ${ADDITIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) - set(CMAKE_C_FLAGS_DEBUG " -Wall ${ADDITIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) - set(CMAKE_C_FLAGS_RELEASE " -Wall -O2 ${ADDITIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE) -#set(CMAKE_C_FLAGS_RELEASE " -Wall -fsanitize=address ${ADDITIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE) -#set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDITIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) - set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDITIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) - set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 ${ADDITIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE) -#set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDITIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE) +#set(CMAKE_C_FLAGS_DEBUG " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) + set(CMAKE_C_FLAGS_DEBUG " -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C Compiler Debug options." FORCE) + set(CMAKE_C_FLAGS_RELEASE " -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE) +#set(CMAKE_C_FLAGS_RELEASE " -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C Compiler Release options." FORCE) +#set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) + set(CMAKE_CXX_FLAGS_DEBUG "-std=${CXX_STANDARD} -Wall ${ADDTIONAL_FLAGS} ${DEBUG_FLAGS}" CACHE STRING "C++ Compiler Debug options." FORCE) + set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -O2 ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE) +#set(CMAKE_CXX_FLAGS_RELEASE "-std=${CXX_STANDARD} -Wall -fsanitize=address ${ADDTIONAL_FLAGS} -DNDEBUG" CACHE STRING "C++ Compiler Release options." FORCE) if ( NOT CMAKE_BUILD_TYPE ) @@ -427,7 +427,7 @@ endif() add_library( ${clib} ${pyCpps} ) set_target_properties( ${clib} PROPERTIES VERSION ${version} SOVERSION ${soversion}) -#target_compile_definitions( ${clib} PUBLIC Py_LIMITED_API=1) + #target_compile_definitions( ${clib} PUBLIC Py_LIMITED_API=1) target_link_libraries( ${clib} ${deplibs} ) install( TARGETS ${clib} DESTINATION lib${LIB_SUFFIX} ) target_link_options( ${clib} PRIVATE "LINKER:--unresolved-symbols=ignore-all") @@ -441,7 +441,7 @@ endif() PREFIX "" OUTPUT_NAME ${pymodule} ) -#target_compile_definitions( ${pytarget} PUBLIC Py_LIMITED_API=1) + #target_compile_definitions( ${pytarget} PUBLIC Py_LIMITED_API=1) target_link_libraries( ${pytarget} ${pyDeplibs} ) target_link_options( ${pytarget} PRIVATE "LINKER:--unresolved-symbols=ignore-all") @@ -466,7 +466,7 @@ endif() add_library( ${pymodule} MODULE ${pyCpps} ) set_target_properties( ${pymodule} PROPERTIES PREFIX "" ) target_link_libraries( ${pymodule} ${deplibs} ) -#target_compile_definitions( ${pymodule} PUBLIC Py_LIMITED_API=1) + # target_compile_definitions( ${pymodule} PUBLIC Py_LIMITED_API=1) install( TARGETS ${pymodule} DESTINATION ${Python_CORIOLISARCH} ) if( NOT ("${pyIncludes}" STREQUAL "None") ) diff --git a/hurricane/src/configuration/CMakeLists.txt b/hurricane/src/configuration/CMakeLists.txt index 3b88a9ba..4c941fbc 100644 --- a/hurricane/src/configuration/CMakeLists.txt +++ b/hurricane/src/configuration/CMakeLists.txt @@ -83,11 +83,9 @@ qtX_add_resources( RCC_SRCS Configuration.qrc ) add_library( configuration ${cpps} ${mocCpps} ${RCC_SRCS} ) - target_link_libraries( configuration ${QtX_LIBRARIES} ) set_target_properties( configuration PROPERTIES VERSION 1.0 SOVERSION 1 ) add_library( pytypemanager ${pyTypeCpps} ) - target_link_libraries( pytypemanager hurricane ${Python_LIBRARIES}) set_target_properties( pytypemanager PROPERTIES VERSION 1.0 SOVERSION 1 ) add_python_module3( "${pyCfgCpps}" diff --git a/hurricane/src/viewer/CMakeLists.txt b/hurricane/src/viewer/CMakeLists.txt index 4cbc520c..7ab12e3e 100644 --- a/hurricane/src/viewer/CMakeLists.txt +++ b/hurricane/src/viewer/CMakeLists.txt @@ -150,7 +150,7 @@ ${UTILITIES_LIBRARY} ${LIBXML2_LIBRARIES} ${QtX_LIBRARIES} - ${Python_LIBRARIES} + ) add_library( viewer ${cpps} ${MOC_SRCS} ${RCC_SRCS} ${pyCpps} ) diff --git a/lefdef/src/def/defzlib/CMakeLists.txt b/lefdef/src/def/defzlib/CMakeLists.txt index e1f96319..bf160445 100644 --- a/lefdef/src/def/defzlib/CMakeLists.txt +++ b/lefdef/src/def/defzlib/CMakeLists.txt @@ -11,7 +11,7 @@ ) add_library ( defzlib ${cpps} ) - target_link_libraries ( defzlib def z ) +# target_link_libraries ( defzlib def z ) set_target_properties ( defzlib PROPERTIES VERSION 5.8 SOVERSION 5 ) install ( TARGETS defzlib DESTINATION lib${LIB_SUFFIX} ) diff --git a/lefdef/src/lef/lefzlib/CMakeLists.txt b/lefdef/src/lef/lefzlib/CMakeLists.txt index 9fda26fa..99b8e34d 100644 --- a/lefdef/src/lef/lefzlib/CMakeLists.txt +++ b/lefdef/src/lef/lefzlib/CMakeLists.txt @@ -11,7 +11,7 @@ ) add_library ( lefzlib ${cpps} ) - target_link_libraries ( lefzlib lef z ) +# target_link_libraries ( lefzlib lef z ) set_target_properties ( lefzlib PROPERTIES VERSION 5.8 SOVERSION 5 ) install ( TARGETS lefzlib DESTINATION lib${LIB_SUFFIX} ) From 6c3361632cf57b243b4705164ba91c4b0aa51159 Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Sat, 15 Jul 2023 12:09:58 +0000 Subject: [PATCH 8/9] Parallelise build Currently just fixed at -j4 --- builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder.py b/builder.py index 3b57d04b..7230c01f 100644 --- a/builder.py +++ b/builder.py @@ -61,7 +61,7 @@ class ExtensionBuilder(build_ext): cfg = "Debug" if self.debug else "Release" # cfg = 'Debug' - build_args = ["--config", cfg] + build_args = ["--config", cfg, "-j", "4"] install_args = ["--config", cfg] cmake_args += ["-DCMAKE_BUILD_TYPE=" + cfg] From c1e94c5d98bff41fc08b1ca1081405bd9a988ca8 Mon Sep 17 00:00:00 2001 From: Robert Taylor Date: Sun, 16 Jul 2023 19:45:34 +0000 Subject: [PATCH 9/9] build-verbosity=2 gave warnings with build frontend, remove --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dc8448cc..97f8d6a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,4 +96,3 @@ before-all = ''' wget wget http://lemon.cs.elte.hu/pub/sources/lemon-1.3.1.tar.gz; tar -xzf lemon-1.3.1.tar.gz; cd lemon-1.3.1; mkdir build; cd build; cmake ..; make install; cd ../.. ''' -build-verbosity=2