Skip to content

Commit 4e93827

Browse files
authored
Merge pull request #89 from python-project-templates/tkp/cppname
Fix missing parameterizations in cpp template
2 parents c124449 + 86629a1 commit 4e93827

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

cpp/cpp/cpp-template/extension.cpp

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include "{{project_name_formatted}}/extension.hpp"
2+
3+
int add(int i, int j) { return i + j; }
File renamed without changes.

cpp/pyproject.toml.jinja

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ ignore = [
7878
".clang-format",
7979
"Makefile",
8080
"docs/**/*",
81+
"{{module}}/*.dll",
82+
"{{module}}/*.dylib",
83+
"{{module}}/*.so",
8184
]
8285

8386
[tool.cibuildwheel]
@@ -112,9 +115,9 @@ fail_under = 50
112115

113116
[tool.hatch.build]
114117
artifacts = [
115-
"project/*.dll",
116-
"project/*.dylib",
117-
"project/*.so",
118+
"{{module}}/*.dll",
119+
"{{module}}/*.dylib",
120+
"{{module}}/*.so",
118121
]
119122

120123
[tool.hatch.build.sources]
@@ -123,7 +126,7 @@ src = "/"
123126
[tool.hatch.build.hooks.hatch-cpp]
124127
verbose = true
125128
libraries = [
126-
{name = "{{module}}/extension", sources = ["cpp/cpp-template/extension.cpp"], include-dirs = ["cpp"], binding="pybind11"}
129+
{name = "{{module}}/extension", sources = ["cpp/{{project_name_formatted}}/extension.cpp"], include-dirs = ["cpp"], binding="pybind11"}
127130
]
128131

129132
[tool.hatch.build.targets.sdist]

0 commit comments

Comments
 (0)