Skip to content

Commit 80bc1fb

Browse files
committed
doc: add documentation for using extension modules
1 parent ff31f34 commit 80bc1fb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/building-extension-modules.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ The following is an example, and should not be considered as complete.
9898
...
9999
include = [
100100
{ path = "package/**/*.so", format = "wheel" },
101+
# sources must be present in sdist, can be ignored if you only have *.pyx sources
102+
{ path = "package/**/*.c", format = "sdist" },
101103
]
102104
```
103105

@@ -133,6 +135,10 @@ packages = [
133135
include = [
134136
{ path = "src/package/**/*.so", format = "wheel" },
135137
]
138+
# if not already excluded via .gitignore
139+
exclude = [
140+
"**/*.c"
141+
]
136142

137143
[tool.poetry.build]
138144
script = "scripts/build-extension.py"
@@ -361,6 +367,10 @@ packages = [
361367
include = [
362368
{ path = "src/package/**/*.so", format = "wheel" },
363369
]
370+
# exclude any intermediate source files
371+
exclude = [
372+
"**/*.c"
373+
]
364374

365375
[tool.poetry.build]
366376
script = "scripts/build-extension.py"

0 commit comments

Comments
 (0)