pyodide: pyodide-build fails with KeyError: 'SIDE_MODULE_CFLAGS'
Installing pyodide-build from the docker image with python setup.py install --user and running ~/.local/bin/pyodide-build results in the following stack trace:
Traceback (most recent call last):
File "/src/.docker_home/.local/bin/pyodide-build", line 33, in <module>
sys.exit(load_entry_point('pyodide-build==0.18.0.dev0', 'console_scripts', 'pyodide-build')())
File "/src/.docker_home/.local/lib/python3.9/site-packages/pyodide_build-0.18.0.dev0-py3.9.egg/pyodide_build/__main__.py", line 39, in main
main_parser = make_parser()
File "/src/.docker_home/.local/lib/python3.9/site-packages/pyodide_build-0.18.0.dev0-py3.9.egg/pyodide_build/__main__.py", line 33, in make_parser
parser = module.make_parser(subparsers.add_parser(command_name)) # type: ignore
File "/src/.docker_home/.local/lib/python3.9/site-packages/pyodide_build-0.18.0.dev0-py3.9.egg/pyodide_build/buildpkg.py", line 313, in make_parser
default=common.get_make_flag("SIDE_MODULE_CFLAGS"),
File "/src/.docker_home/.local/lib/python3.9/site-packages/pyodide_build-0.18.0.dev0-py3.9.egg/pyodide_build/common.py", line 44, in get_make_flag
return get_make_environment_vars()[name]
KeyError: 'SIDE_MODULE_CFLAGS'
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 21 (18 by maintainers)
To run
pyodide-build mkpkgwhat I have been doing is commenting out lines 20 – 23 in https://github.com/pyodide/pyodide/blob/main/pyodide-build/pyodide_build/__main__.pyYes, this was fixed by #2351
In addition,
If it’s a pure python package, just create a wheel put it somewhere online and install it with micropip – there is not need to create a Pyodide package.
I tried using the makefile hack to build a package and got the stack trace at https://pastebin.com/1QYtzhvY. Using
PYODIDE_PACKAGES="my_package" make -C packagesworked.So running
mkpkgto generate themeta.yamlfile requires running the tool after commenting those lines from__main__.pyand building the.dataand.jsfiles requires running themakecommand you described.Not the easiest workflow in the world but at least I found a way to do it.