From 53efd7ccb1b783cdae9bec54303d88d6fd83193f Mon Sep 17 00:00:00 2001 From: Brent Huisman Date: Mon, 5 Sep 2022 15:58:41 +0200 Subject: [PATCH 1/3] move pybind11 --- .flake8 | 1 - .github/workflows/lint.yml | 2 +- .gitmodules | 4 ++-- doc/contrib/coding-style.rst | 2 +- doc/dependencies.csv | 2 +- {python => ext}/pybind11 | 0 python/CMakeLists.txt | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) rename {python => ext}/pybind11 (100%) diff --git a/.flake8 b/.flake8 index 253235aa64..c38577d834 100644 --- a/.flake8 +++ b/.flake8 @@ -14,7 +14,6 @@ max_complexity = 15 extend-exclude = # 3rd party ext, - python/pybind11, # auto-generated doc/scripts/inputs.py doc/scripts/make_images.py diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d10fe4b76d..fa6dbd621d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -26,7 +26,7 @@ jobs: - name: Python Formatting uses: psf/black@stable with: - options: --check --extend-exclude '/(ext|python/pybind11|doc/scripts/.*_theme|doc/scripts/inputs.py)' + options: --check --extend-exclude '/(ext|doc/scripts/.*_theme|doc/scripts/inputs.py)' src: scripts/build-catalogue.in . - name: Python analysis run: | diff --git a/.gitmodules b/.gitmodules index d5734673d5..c0d16302ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,8 +2,8 @@ path = ext/google-benchmark url = https://github.com/google/benchmark branch = main -[submodule "python/pybind11"] - path = python/pybind11 +[submodule "ext/pybind11"] + path = ext/pybind11 url = https://github.com/pybind/pybind11.git branch = master [submodule "ext/fmt"] diff --git a/doc/contrib/coding-style.rst b/doc/contrib/coding-style.rst index db83fce345..4283138baa 100644 --- a/doc/contrib/coding-style.rst +++ b/doc/contrib/coding-style.rst @@ -15,7 +15,7 @@ run the following commands to apply it: # Install the formatter if not present pip install black # Automatically apply style. If unsure what this does read on. - black --extend-exclude '/(ext|python/pybind11|doc/scripts/.*_theme)' . scripts/build-catalogue.in + black --extend-exclude '/(ext|doc/scripts/.*_theme)' . scripts/build-catalogue.in The formatter can also be run with ``--check`` to list offending files and ``--diff`` to preview changes. Most editors can `integrate with black diff --git a/doc/dependencies.csv b/doc/dependencies.csv index f11919b43e..d325bd6e73 100644 --- a/doc/dependencies.csv +++ b/doc/dependencies.csv @@ -18,7 +18,7 @@ bench,Google-benchmark,,submodule ``ext/google-benchmark``, --,random123,,source copy ``ext/random123``, --,fmt,,submodule ``ext/fmt``, --,tinyopt,,source copy ``ext/tinyopt``, -ARB_WITH_PYTHON,pybind11,,submodule ``python/pybind11``, +ARB_WITH_PYTHON,pybind11,,submodule ``ext/pybind11``, ARB_WITH_PYTHON,Python,3.7,Python compatiblity is the range between the latest officially released point version and the minimum here specified.,"* it is not more advanced than the version specified by NEP 29. * it is available as a cray-python version on Piz Daint * it is available on labs.ebrains.eu diff --git a/python/pybind11 b/ext/pybind11 similarity index 100% rename from python/pybind11 rename to ext/pybind11 diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index e2d6bdb54d..90ec29c9dc 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -4,7 +4,7 @@ if(ARB_USE_BUNDLED_PYBIND11) include(FindPythonModule) # required for find_python_module # Set up pybind11 as an external project. - set(pb11_src_dir "${PROJECT_SOURCE_DIR}/python/pybind11") + set(pb11_src_dir "${PROJECT_SOURCE_DIR}/ext/pybind11") check_git_submodule(pybind11 "${pb11_src_dir}") if(NOT pybind11_avail) From cfd7ee8e1a3458cd86bea4b385ce81124742673c Mon Sep 17 00:00:00 2001 From: Brent Huisman Date: Mon, 5 Sep 2022 17:06:02 +0200 Subject: [PATCH 2/3] keep old "name"? --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index c0d16302ed..95be44451a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,7 +2,7 @@ path = ext/google-benchmark url = https://github.com/google/benchmark branch = main -[submodule "ext/pybind11"] +[submodule "python/pybind11"] path = ext/pybind11 url = https://github.com/pybind/pybind11.git branch = master From a15caf93946b5f1c38aef795e6e3b169f087b934 Mon Sep 17 00:00:00 2001 From: Brent Huisman Date: Mon, 5 Sep 2022 17:26:20 +0200 Subject: [PATCH 3/3] move of pybind11 submod complete. --- .gitmodules | 7 +++---- python/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 95be44451a..258f3b5734 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,10 +2,6 @@ path = ext/google-benchmark url = https://github.com/google/benchmark branch = main -[submodule "python/pybind11"] - path = ext/pybind11 - url = https://github.com/pybind/pybind11.git - branch = master [submodule "ext/fmt"] path = ext/fmt url = https://github.com/fmtlib/fmt.git @@ -18,3 +14,6 @@ path = ext/json url = https://github.com/nlohmann/json.git branch = master +[submodule "ext/pybind11"] + path = ext/pybind11 + url = https://github.com/pybind/pybind11.git diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 90ec29c9dc..fd4b68e53b 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -14,7 +14,7 @@ if(ARB_USE_BUNDLED_PYBIND11) # Set up pybind11, which is used to generate Python bindings. # Pybind11 has good cmake support, so just add the pybind11 directory, # instead of using find_package. - add_subdirectory(pybind11) + add_subdirectory(${pb11_src_dir} pybind11) else() find_package(pybind11 REQUIRED) endif()