Skip to content
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

Building wheel package fails with JS dependency error #4745

Open
bertptrs opened this issue Aug 30, 2024 · 1 comment
Open

Building wheel package fails with JS dependency error #4745

bertptrs opened this issue Aug 30, 2024 · 1 comment
Assignees
Labels
bug something broken P1 needs immediate attention

Comments

@bertptrs
Copy link

bertptrs commented Aug 30, 2024

I'm trying to build the wheel from scratch, for packaging for Arch Linux, but am running into a dependency issue. I believe the lockfile needs to be updated. To reproduce:

$ git clone https://github.com/plotly/plotly.py.git
Cloning into 'plotly.py'...
remote: Enumerating objects: 137137, done.
remote: Counting objects: 100% (10730/10730), done.
remote: Compressing objects: 100% (2578/2578), done.
remote: Total 137137 (delta 8449), reused 10172 (delta 8086), pack-reused 126407 (from 1)
Receiving objects: 100% (137137/137137), 165.11 MiB | 3.77 MiB/s, done.
Resolving deltas: 100% (107263/107263), done.
$ cd plotly.py/packages/python/plotly
$ git checkout v5.24.0
$ python -m build --wheel --no-isolation
* Getting build dependencies for wheel...
running egg_info
running jsdeps
10.8.3
10.8.3
Installing build dependencies with npm.  This may take a while...
<SNIP lots of output>
> [email protected] build:labextension
> jupyter labextension build .

Building extension in .
/usr/lib/python3.12/site-packages/jupyterlab/debuglog.py:54: UserWarning: An error occurred.
  warnings.warn("An error occurred.")
/usr/lib/python3.12/site-packages/jupyterlab/debuglog.py:55: UserWarning: ValueError: Extensions require a devDependency on @jupyterlab/builder@^4.2.5, you have a dependency on 3.6.1
  warnings.warn(msg[-1].strip())
/usr/lib/python3.12/site-packages/jupyterlab/debuglog.py:56: UserWarning: See the log file for details: /tmp/jupyterlab-debug-vvcteyvy.log
  warnings.warn(f"See the log file for details: {log_path!s}")
rebuilding js and css failed
missing files: ['/home/bert/Downloads/plotly.py/packages/python/plotly/jupyterlab_plotly/labextension/package.json']
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
    main()
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 134, in get_requires_for_build_wheel
    return hook(config_settings)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=['wheel'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
    self.run_setup()
  File "/usr/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
    exec(code, locals())
  File "<string>", line 540, in <module>
  File "/usr/lib/python3.12/site-packages/setuptools/__init__.py", line 104, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "<string>", line 106, in run
  File "<string>", line 99, in run
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 967, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "<string>", line 200, in run
  File "/usr/lib/python3.12/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['npm', 'run', 'build:prod']' returned non-zero exit status 1.

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel

This problem can be worked around by causing the lockfile to be invalid, so dependencies are evaluated again, but that is not desirable in the context of reproducible builds.

@gvwilson gvwilson added bug something broken P1 needs immediate attention labels Sep 3, 2024
@bertptrs
Copy link
Author

bertptrs commented Oct 1, 2024

Nice to see that this was picked up already. Is there anything I can do to help out here? I have tried regenerating the lockfile but that runs into different issues because certain libraries no longer type check. Nevertheless, I'd be happy to help solving this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P1 needs immediate attention
Projects
None yet
Development

No branches or pull requests

3 participants