Skip to content

πŸ› Build Fails on Python 3.11 Docker Image Due to Missing System DependenciesΒ #485

@atiaabdessamad

Description

@atiaabdessamad

Issue type

Bug

How did you install PythonMonkey?

Docker and pip

OS platform and distribution

Linux Debian Slim (Bullseye)

Python version (python --version)

3.11

PythonMonkey version (pip show pythonmonkey)

1.1.1

Bug Description

Attempting to install pythonmonkey in a clean Python 3.11 environment (Docker: python:3-slim-bullseye) results in a failure during the wheel build process.

Standalone code to reproduce the issue

docker run -it python:3.11-slim-bullseye bash
pip install pythonmonkey

Relevant log output or backtrace

Downloading pycparser-2.22-py3-none-any.whl (117 kB)
Building wheels for collected packages: pythonmonkey, pminit
  Building wheel for pythonmonkey (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  Γ— Building wheel for pythonmonkey (pyproject.toml) did not run successfully.
  β”‚ exit code: 1
  ╰─> [66 lines of output]
      Installing dependencies
      Installing apt packages
      Reading package lists...
      Building dependency tree...
      Reading state information...
      E: Unable to locate package cmake
      E: Unable to locate package llvm
      E: Unable to locate package clang
      E: Unable to locate package pkg-config
      E: Unable to locate package m4
      E: Unable to locate package unzip
      E: Unable to locate package wget
      E: Unable to locate package curl
      E: Unable to locate package python3-dev
      Traceback (most recent call last):
        File "/tmp/pip-install-5_q5gvuh/pythonmonkey_d7473c13258b42a2831d395b7e0d603d/build.py", line 77, in <module>
          build()
          ~~~~~^^
        File "/tmp/pip-install-5_q5gvuh/pythonmonkey_d7473c13258b42a2831d395b7e0d603d/build.py", line 70, in build
          ensure_spidermonkey()
          ~~~~~~~~~~~~~~~~~~~^^
        File "/tmp/pip-install-5_q5gvuh/pythonmonkey_d7473c13258b42a2831d395b7e0d603d/build.py", line 44, in ensure_spidermonkey
          execute("bash ./setup.sh", cwd=TOP_DIR)
          ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-5_q5gvuh/pythonmonkey_d7473c13258b42a2831d395b7e0d603d/build.py", line 34, in execute
          raise subprocess.CalledProcessError(return_code, cmd)
      subprocess.CalledProcessError: Command 'bash ./setup.sh' returned non-zero exit status 100.
      Traceback (most recent call last):
        File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
          return _build_backend().build_wheel(
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
              wheel_directory, config_settings, metadata_directory
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          )
          ^
        File "/tmp/pip-build-env-lhct93wt/overlay/lib/python3.13/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
          return WheelBuilder.make_in(
                 ~~~~~~~~~~~~~~~~~~~~^
              poetry,
              ^^^^^^^
          ...<2 lines>...
              config_settings=config_settings,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          )
          ^
        File "/tmp/pip-build-env-lhct93wt/overlay/lib/python3.13/site-packages/poetry/core/masonry/builders/wheel.py", line 95, in make_in
          wb.build(target_dir=directory)
          ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-lhct93wt/overlay/lib/python3.13/site-packages/poetry/core/masonry/builders/wheel.py", line 134, in build
          self._build(zip_file)
          ~~~~~~~~~~~^^^^^^^^^^
        File "/tmp/pip-build-env-lhct93wt/overlay/lib/python3.13/site-packages/poetry/core/masonry/builders/wheel.py", line 183, in _build
          self._run_build_script(self._package.build_script)
          ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-lhct93wt/overlay/lib/python3.13/site-packages/poetry/core/masonry/builders/wheel.py", line 304, in _run_build_script
          subprocess.check_call([self.executable.as_posix(), build_script])
          ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.13/subprocess.py", line 419, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/local/bin/python3.13', 'build.py']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pythonmonkey
  Building wheel for pminit (pyproject.toml) ... done
  Created wheel for pminit: filename=pminit-1.1.1-cp313-cp313-manylinux_2_31_aarch64.whl size=2089285 sha256=c607d14bf436122db731e41dd636dfdbb7b1d7d068b3c0060405f104f0eff6e5
  Stored in directory: /root/.cache/pip/wheels/58/bd/cf/6c4f189b9d64ad200381931eed409c6c13251baa8acedfc504
Successfully built pminit
Failed to build pythonmonkey
ERROR: Failed to build installable wheels for some pyproject.toml based projects (pythonmonkey)

Additional info if applicable

What branch of PythonMonkey were you developing on? (If applicable)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions