-
-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'cmake_build_extension' when building package #5187
ModuleNotFoundError: No module named 'cmake_build_extension' when building package #5187
Comments
Thanks for the report @stephanmg. The build occurs in an isolated virtual environment, so installing Once I fix this problem, the build gets a bit further but still fails at:
You should be able to get to this next error by applying this patch to pyodide-build. --- a/pyodide_build/pypabuild.py
+++ b/pyodide_build/pypabuild.py
@@ -118,7 +118,7 @@ def remove_avoided_requirements(
for reqstr in list(requires):
req = Requirement(reqstr)
for avoid_name in set(avoided_requirements):
- if avoid_name in req.name.lower():
+ if avoid_name == req.name.lower():
requires.remove(reqstr)
return requires |
See pyodide/pyodide#5187. In that issue, the build requires a package called `cmake-build-extension` but because we have `cmake` in the list of requirements to avoid we drop it and it breaks the build. This logic was introduced in pyodide/pyodide#2272 and did not come up in the review. Surprisingly this is the first problem it has caused. Let's see if this change breaks anything in Pyodide CI.
Resolves pyodide/pyodide#5187. In that issue, the build requires a package called `cmake-build-extension` but because we have `cmake` in the list of requirements to avoid we drop it and it breaks the build. This logic was introduced in pyodide/pyodide#2272 and did not come up in the review. Surprisingly this is the first problem it has caused. Let's see if this change breaks anything in Pyodide CI.
See upstream PR: pyodide/pyodide-build#60 Resolves pyodide#5187. In that issue, the build requires a package called `cmake-build-extension` but because we have `cmake` in the list of requirements to avoid we drop it and it breaks the build. This logic was introduced in pyodide#2272 and did not come up in the review. Surprisingly this is the first problem it has caused. Let's see if this change breaks anything in Pyodide CI.
This comes from the SUNDIALS library, which needs to link with KLU from SuiteSparse. We do have a recipe for |
I'm going to take over this issue for the bug I'm currently working on fixing. Though maybe I should have opened a separate issue, since it seems that there will be more work to be done with amici after this is resolved. |
Maybe @stephanmg can open another issue about amici since I stole this one =) |
Yes, will open later a new issue. I can reproduce the error up to the linking error now (after applying the patch) |
I think the label |
I tried to use
pyodide skeleton pypi amici
to create a package of the useful AMICI package.However I fail when using
pyodide build-recipes amici --install
after.AMICI seems to require
cmake-build-extension
. I cloned thepyodide
repository, started the docker container./run_docker
and buildpyodide-build
according to the documentation.Since
cmake-build-extension
seems to be required, I added it to themeta.yaml
file under the subsectionhost
in sectionrequirements
. While I can import the module from within the running Docker container, i.e.python -c 'import cmake_build_extension
works,pyodide build-recipes amici --install
fails, resulting in aModuleNotFoundError
for the former import statement.My branch (forked from
main
branch of pyodide this morning) containing themeta.yaml
is here:https://github.com/stephanmg/pyodide/tree/package-amici/packages/amici
Any help / pointing to resources to help me create this package would be appreciated.
P.S.: Thank you @agriyakhetarpal for your help on Discord already.
🐍 Package Issue / Request
setup.py
is provided and aProject.toml
file.Checklists
micropip.install(...)
and encountered the issue that the package is not pure Python and uses extensively C extensionsThe text was updated successfully, but these errors were encountered: