pyd
pyd copied to clipboard
dub support doesn't work for extensions
I get ImportError: dynamic module does not define init function
cf D-Programming-Language/dub#571
Yes, that does prevent a pyd extension being a dependency in dub, but that isn't the important usa-case really. What is more important is being able to build the extension itself as the main/root dub package. Dub has no problem with shared libraries in that setup.
pyd has a little template file in infrastructure/d/pydmain_template.d looks like it just inserts the project name in some syntactically goofy places. is there anything in dub that can do the equivalent?
More important is the so_ctor.c file, which starts up druntime when the extension loads, etc. Don't know if we still need this, but assuming we do, can dub compile c files or does dmd have attribute((constructor)) type functionality now?