Description
Hi folks. I tried to follow the instructions in the README and here
https://ipywidgets.readthedocs.io/en/8.0.2/examples/Widget%20Custom.html
and in both cases I get the following.
$ python -m pip install -e .
Obtaining file:///Users/awatters/ipyemail
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Installing backend dependencies ... done
Preparing editable metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing editable metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [60 lines of output]
INFO:hatch_jupyter_builder.utils:Running jupyter-builder
INFO:hatch_jupyter_builder.utils:Building with hatch_jupyter_builder.npm_builder
INFO:hatch_jupyter_builder.utils:With kwargs: {'path': '.', 'build_cmd': 'build:prod'}
INFO:hatch_jupyter_builder.utils:Installing build dependencies with npm. This may take a while...
INFO:hatch_jupyter_builder.utils:> /opt/anaconda3/envs/ipyemail/bin/npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ipyemail@0.1.0
npm ERR! Found: jest@undefined
npm ERR! node_modules/jest
npm ERR! dev jest@"^26.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jest@">=26 <27" from ts-jest@26.5.6
npm ERR! node_modules/ts-jest
npm ERR! dev ts-jest@"^26.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/awatters/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/awatters/.npm/_logs/2023-03-06T17_13_40_323Z-debug-0.log
Traceback (most recent call last):
File "/opt/anaconda3/envs/ipyemail/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 167, in prepare_metadata_for_build_editable
hook = backend.prepare_metadata_for_build_editable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_editable'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/anaconda3/envs/ipyemail/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/opt/anaconda3/envs/ipyemail/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/ipyemail/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 176, in prepare_metadata_for_build_editable
whl_basename = build_hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/6q/d5mwddn12v7_pkq3_6cc5t8c0000gq/T/pip-build-env-zr78fuae/overlay/lib/python3.11/site-packages/hatchling/build.py", line 78, in build_editable
return os.path.basename(next(builder.build(wheel_directory, ['editable'])))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/6q/d5mwddn12v7_pkq3_6cc5t8c0000gq/T/pip-build-env-zr78fuae/overlay/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 150, in build
build_hook.initialize(version, build_data)
File "/private/var/folders/6q/d5mwddn12v7_pkq3_6cc5t8c0000gq/T/pip-build-env-zr78fuae/normal/lib/python3.11/site-packages/hatch_jupyter_builder/plugin.py", line 83, in initialize
raise e
File "/private/var/folders/6q/d5mwddn12v7_pkq3_6cc5t8c0000gq/T/pip-build-env-zr78fuae/normal/lib/python3.11/site-packages/hatch_jupyter_builder/plugin.py", line 78, in initialize
build_func(self.target_name, version, **build_kwargs)
File "/private/var/folders/6q/d5mwddn12v7_pkq3_6cc5t8c0000gq/T/pip-build-env-zr78fuae/normal/lib/python3.11/site-packages/hatch_jupyter_builder/utils.py", line 114, in npm_builder
run(npm_cmd + ["install"], cwd=str(abs_path))
File "/private/var/folders/6q/d5mwddn12v7_pkq3_6cc5t8c0000gq/T/pip-build-env-zr78fuae/normal/lib/python3.11/site-packages/hatch_jupyter_builder/utils.py", line 227, in run
return subprocess.check_call(cmd, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/envs/ipyemail/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/opt/anaconda3/envs/ipyemail/bin/npm', 'install']' 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: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I checked that I have the latest node and npm recommended for mac and I'm running python 3.11.0 if that matters.
Metadata
Metadata
Assignees
Labels
No labels