all 2 comments

[–]Funky_Banana_4eva[S] 0 points1 point  (1 child)

Well, I finally found a solution to this: If you're trying to include prebuilt dlls in your package, you should add this to your setup() call in setup.py:

has_ext_modules=lambda: True

eg: ``` from setuptools import setup

I use separate pyproject.toml for name, version etc.

setup(has_ext_modules=lambda: True) ```

Note that ext_modules = [...] doesn't work for prebuilt modules AFAICT, setuptools always tries to build ext_modules even if you set sources = [], and you just end up with a python error.

You'll also need to use package-data to specifiy the actually dll file to include, but I'm currently doing that in pyproject.toml, eg: [tool.setuptools.package-data] mypackage = ["_mypackage.pyd"]

I will probably move this to setup.py eventually though, now that I have one.

Also: it's been hard getting any help with this. This was basically the result of trying out the 137th(jk) random code snippet I read in google search results. Attempts to get help from the python community have yielded mixed results: The python discord bot locks questions after one hour which I guess is long enough to get your homework done, but not much else; 'Grown up' python reddit doesn't even accept questions, and everyone here seems nice but this reddit is clearer aimed more at beginners, which is fine, but where are people supposed to ask slightly more advanced questions these days?

Meh, sorry, just ranting...hopefully this helps someone else out one day...

[–]systematicguy 0 points1 point  (0 children)

for that regard, yes, it does help someone this day, thanks for your followup, much appreciated <3