Remove most of the cython-specific config files by running the preprocessor.#618
Closed
Remove most of the cython-specific config files by running the preprocessor.#618
Conversation
Collaborator
Author
|
@petrochenkov wdyt? |
…cessor. I _think_ I'm a bit happier with this than the alternative of having to maintain two .config files. The main changes: * We run the preprocessor on the cbindgen output. This is useful so that we can use ifdefs for cython in header/trailers. * If there's both <file>.toml and <file>.cython.toml, we generate a config file concatenating them. This is useful when cython just wants to avoid generating a file due to crashes or what not.
5f4d0e9 to
c99db3c
Compare
Contributor
|
I'll look tomorrow. I've been using the next trick to avoid multiple configs (for #619 in particular): after_includes = "
#ifdef __FILE__
something c/c++
#else
something cython
#endif
"( |
Contributor
|
Some alternative methods of solving this can be found in #620. I'm not too happy about running preprocessor on generated Cython code because it doesn't match workflow used in practice, and could hide things like C-style comments or something, that would fail otherwise. |
Collaborator
Author
|
Superseded by #620. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think I'm a bit happier with this than the alternative of having to
maintain two config files.
The main changes:
We run the preprocessor on the cbindgen output. This is useful so
that we can use ifdefs for cython in header/trailers.
If there's both
<file>.tomland<file>.cython.toml, we generate aconfig file concatenating them. This is useful when cython just wants
to avoid generating a file due to crashes or what not.