diff --git a/cpp/cpp/cpp-template/extension.cpp b/cpp/cpp/cpp-template/extension.cpp deleted file mode 100644 index d42fa05..0000000 --- a/cpp/cpp/cpp-template/extension.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "cpp-template/extension.hpp" - -int add(int i, int j) { return i + j; } diff --git a/cpp/cpp/{{project_name_formatted}}/extension.cpp.jinja b/cpp/cpp/{{project_name_formatted}}/extension.cpp.jinja new file mode 100644 index 0000000..341dcab --- /dev/null +++ b/cpp/cpp/{{project_name_formatted}}/extension.cpp.jinja @@ -0,0 +1,3 @@ +#include "{{project_name_formatted}}/extension.hpp" + +int add(int i, int j) { return i + j; } diff --git a/cpp/cpp/cpp-template/extension.hpp b/cpp/cpp/{{project_name_formatted}}/extension.hpp similarity index 100% rename from cpp/cpp/cpp-template/extension.hpp rename to cpp/cpp/{{project_name_formatted}}/extension.hpp diff --git a/cpp/pyproject.toml.jinja b/cpp/pyproject.toml.jinja index 2ba515e..fcb05fb 100644 --- a/cpp/pyproject.toml.jinja +++ b/cpp/pyproject.toml.jinja @@ -78,6 +78,9 @@ ignore = [ ".clang-format", "Makefile", "docs/**/*", + "{{module}}/*.dll", + "{{module}}/*.dylib", + "{{module}}/*.so", ] [tool.cibuildwheel] @@ -112,9 +115,9 @@ fail_under = 50 [tool.hatch.build] artifacts = [ - "project/*.dll", - "project/*.dylib", - "project/*.so", + "{{module}}/*.dll", + "{{module}}/*.dylib", + "{{module}}/*.so", ] [tool.hatch.build.sources] @@ -123,7 +126,7 @@ src = "/" [tool.hatch.build.hooks.hatch-cpp] verbose = true libraries = [ -{name = "{{module}}/extension", sources = ["cpp/cpp-template/extension.cpp"], include-dirs = ["cpp"], binding="pybind11"} +{name = "{{module}}/extension", sources = ["cpp/{{project_name_formatted}}/extension.cpp"], include-dirs = ["cpp"], binding="pybind11"} ] [tool.hatch.build.targets.sdist]