Hey folks, I'm struggling to build a wheel out of a pyd I created with pybind11, I have a pyd and py that provides an interface for it, all works fine when the files are top level with the running script but when I try to package as a module I get varieties of "module not found" errors, I've been over the python packaging docs and all the examples are trivial py files. I'm looking for an example project with py files that have pyd dependencies and are packaged as wheels or some docs that deal with how to package these artifacts effectively. Everything I've read on https://setuptools.pypa.io/ has not been helpful, this seems trivial but I'm hitting a wall
#๐ Creating wheel with .pyd dependency and .py interface
9 messages ยท Page 1 of 1 (latest)
@vague sphinx
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
source tree, I have empty init.py at both module levels
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "ADLXInterface"
version = "6.0.0"
authors = [
{ name="", email="" },
]
description = "Python Bindings for the ADLX Library"
readme = "README.md"
requires-python = ">=3.11"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
"*" = ["*.pyd"]
classifiers = [
"Programming Language :: Python :: 3.11",
"Operating System :: Microsoft :: Windows :: Windows 11",
]
[project.urls]
Homepage = ""
Issues = ""
I strongly recommend using hatch (https://hatch.pypa.io/latest/) over setuptools overall
from a Google search looking for projects using pyd files... it looks like https://github.com/mongodb/mongo-python-driver/blob/master/hatch_build.py saves .pyd files as artifacts?
this seems even more needlessly complex ๐ I just want to package two files and distribute them as a wheel, I never thought this would be so hard, oh well
you shouldn't need to use a bulid hook, just specifying it somewhere in the pyproject.toml should work, but I've never worked with .pyd files before so I have no clue about how they work | how they're integrated
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.