Automatic detection for ext_modules
#4569
Replies: 2 comments
-
I feel like if we just scan the directories for I wonder if we could have a well defined directory suffix convention. For example:
This could be translated to: Extension(
name="foo",
sources=["foo.ext/bar.c", "foo.ext/baz.c"],
depends=["foo.ext/foo.h"],
) |
Beta Was this translation helpful? Give feedback.
-
I like that! A couple of other options: Have static config in the .c/.h files indicate the relevant module: /* bar.c */
/* python-ext: foo */
... Or, let there be a stub module with a specified extension/naming scheme to represent the module: # foo.cext
sources=['lib1/bar.c', 'lib2/baz.c']
include=['lib1/foo.h'] Overall, I'm liking your option best, but I thought I'd share these for consideration. |
Beta Was this translation helpful? Give feedback.
-
In #2220 (comment), @jaraco suggested:
What I would like to discuss in this thread is how this automatic detection would look like and in which conditions it would be triggered or skipped.
Something that we have to be mindful and potentially avoid are false negatives.
Beta Was this translation helpful? Give feedback.
All reactions