Skip to content

feat: add INCLUDE_DIRECTORIES keyword to cython_transpile#91

Merged
henryiii merged 1 commit into
mainfrom
feat/include-directories
Jul 10, 2026
Merged

feat: add INCLUDE_DIRECTORIES keyword to cython_transpile#91
henryiii merged 1 commit into
mainfrom
feat/include-directories

Conversation

@henryiii

@henryiii henryiii commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Adds an INCLUDE_DIRECTORIES multi-value keyword to cython_transpile that maps each entry to -I <dir> on the cython CLI, resolving relative paths against CMAKE_CURRENT_SOURCE_DIR. This is a dedicated place to point Cython at cimport-able .pxd files installed by another package, rather than overloading the single CYTHON_ARGS escape hatch. cimported .pxd files reached this way are still tracked in the depfile, so incremental rebuilds work.

The README gains a "Sharing .pxd files between packages" section covering the provider (install(FILES foo.pxd ...)) and consumer (INCLUDE_DIRECTORIES pointed at the installed package located via Python_EXECUTABLE) sides.

A new include_directories fixture and test exercise a cimport that only resolves via the new keyword.

Addresses item 4 of the first comment on #84.

Adds an INCLUDE_DIRECTORIES multi-value keyword that maps each entry to
`-I <dir>` on the cython CLI, resolving relative paths against the current
source dir. This gives a dedicated way to consume cimport-able .pxd files
installed by another package instead of overloading CYTHON_ARGS.

Also documents the inter-package .pxd install/consume pattern in the README.

Assisted-by: ClaudeCode:claude-opus-4-8
@henryiii
henryiii marked this pull request as ready for review July 9, 2026 21:43
@henryiii
henryiii merged commit 2560351 into main Jul 10, 2026
28 checks passed
@henryiii
henryiii deleted the feat/include-directories branch July 10, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant