-
I am building an extension module called
These are my relevant sections of my cmakelists: nanobind_add_module(
soem_ext
STABLE_ABI
NB_STATIC
pyecm/soem_ext.cpp
)
nanobind_add_stub(
soem_ext_stub
MODULE soem_ext
OUTPUT "${CMAKE_SOURCE_DIR}/pyecm/soem/soem_ext.pyi"
PYTHON_PATH $<TARGET_FILE_DIR:soem_ext>
DEPENDS soem_ext
MARKER_FILE py.typed
)
# Install directive for scikit-build-core
install(TARGETS soem_ext LIBRARY DESTINATION "pyecm/soem")
install(FILES "${CMAKE_SOURCE_DIR}/pyecm/soem/soem_ext.pyi" DESTINATION "pyecm/soem")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/py.typed" DESTINATION "pyecm/soem") this is my pyproject.toml [project]
name = "pyecm"
version = "0.0.1"
authors = [
{ name="Jeff Anderson", email="kj4tmp@gmail.com" },
]
description = "An EtherCAT MainDevice in Python"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = ["numpy"]
[build-system]
requires = ["scikit-build-core >=0.9.1", "typing_extensions"]
build-backend = "scikit_build_core.build"
[tool.scikit-build]
# Protect the configuration against future changes in scikit-build-core
minimum-version = "0.9"
cmake.build-type = "Debug"
# Setuptools-style build caching in a local directory
build-dir = "build/{wheel_tag}"
# Build stable ABI wheels for CPython 3.12+
wheel.py-api = "cp312"
[project.urls]
Homepage = "https://github.com/kj4tmp/pyecm"
Issues = "https://github.com/kj4tmp/pyecm/issues"
[tool.cibuildwheel]
# Necessary to see build output from the actual compilation
build-verbosity = 1
# Optional: run pytest to ensure that the package was correctly built
# test-command = "pytest {project}/tests"
# test-requires = "pytest"
# Needed for full C++17 support on macOS
[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "10.14"
# pyproject.toml
[tool.pytest.ini_options]
testpaths = [
"tests",
] |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
maybe its related to https://stackoverflow.com/questions/63567298/import-error-dll-load-failed-the-specified-module-could-not-be-found ? |
Beta Was this translation helpful? Give feedback.
-
might be because the windows build host is 64-bit, and it built a 32-bit wheel, which may be rejected by import |
Beta Was this translation helpful? Give feedback.
i had a missing dependency of npcap which was causing a dll import error due to a missing
wpcap.dll
among others. I installed npcap in my build environment and the issue resolved