-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
recursive package dependencies #23
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Gentle ping .. any update or advise how to deal with this issue?? 🤔 |
Thanks for the ping.
I'm not sure I understand the original issue. It has no dependency: https://github.com/jupyterlab/jupyterlab_pygments/blob/main/pyproject.toml#L28 The is a build-time dependency though, on JupyterLab, maybe that's the issue? jupyterlab-pygments requires jupyterlab at build time to build itself as a labextension. But there are apparently discussions to split the build tools out of jupyterlab. |
Indeed jupyterlab_pygments/pyproject.toml Lines 1 to 4 in c3380f5
|
Just tested build without that line and indeed looks it is used + /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
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: {'build_cmd': 'build:prod', 'npm': ['jlpm']}
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib/python3.10/site-packages/hatchling/build.py", line 58, in build_wheel
return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
File "/usr/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 147, in build
build_hook.initialize(version, build_data)
File "/usr/lib/python3.10/site-packages/hatch_jupyter_builder/plugin.py", line 94, in initialize
raise e
File "/usr/lib/python3.10/site-packages/hatch_jupyter_builder/plugin.py", line 89, in initialize
build_func(self.target_name, version, **build_kwargs)
File "/usr/lib/python3.10/site-packages/hatch_jupyter_builder/utils.py", line 106, in npm_builder
npm_cmd = normalize_cmd(npm)
File "/usr/lib/python3.10/site-packages/hatch_jupyter_builder/utils.py", line 210, in normalize_cmd
raise ValueError(msg)
ValueError: Aborting. Could not find cmd (jlpm) in path. If command is not expected to be in user's path, use an absolute path. |
One sec .. this message is about |
Yeah .. and |
As this module is only sphinx theme I think that only solution is to remove it from |
I've double checked this ring of dependencies and it is a bit longer. To build I'm going to check is is possible to build |
And now I cannot build nbconvert ` because 502 gateway error on https://unpkg.com/ 😞 + /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
* Building wheel...
Downloading CSS: https://unpkg.com/@jupyterlab/[email protected]/style/index.css
Failed to download css from https://unpkg.com/@jupyterlab/[email protected]/style/index.css: HTTP Error 520:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib/python3.10/site-packages/hatchling/build.py", line 58, in build_wheel
return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
File "/usr/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 147, in build
build_hook.initialize(version, build_data)
File "/home/tkloczko/rpmbuild/BUILD/nbconvert-7.16.3/hatch_build.py", line 85, in initialize
_get_css_files()
File "/home/tkloczko/rpmbuild/BUILD/nbconvert-7.16.3/hatch_build.py", line 75, in _get_css_files
_get_css_file(template_name, url, filename)
File "/home/tkloczko/rpmbuild/BUILD/nbconvert-7.16.3/hatch_build.py", line 58, in _get_css_file
raise OSError(msg) from None
OSError: Need CSS to proceed.
ERROR Backend subprocess exited when trying to invoke build_wheel BTW is it possible to perform such build 100% offline? 🤔 |
Correction it is http error 520 which is IIRC something with proxy. |
Now, I could propose a change where the source distribution published on PyPi contains the labextension pre-built already. This would allow not depending on jupyterlab for building the source dist.
As long as the build uses yarn/jlpm, we'll need an internet connection to download the npm dependencies. |
No please don't do that. [tkloczko@pers-jacek SPECS]$ grep "Source:.*%{VCS}/" python-*spec -l | wc -l; ls -1 python-*spec |wc -l
1187
1243 Because I'm using the same methodology in case of other packages last scandal with I'm 100% sure that it needs to be some clear way without pypi .. |
Why at all BTW yarn .. are you aware of note from https://github.com/yarnpkg/yarn/blob/master/README.md? 🤔 |
As I said before:
We're using yarn v3 |
You'll need to wait that #40 (comment) is resolved |
Problem
It seems that since #11, there is now a recursive dependency of
jupyterlab_pygments
onjupyterlab
onjupyter_server
onnbconvert
onjupyterlab_pygments
. Even though most of these are run-time dependencies (not build-time), this makes things complicated both for packagers and non-wheel installs on pip. Attempting apip install --no-binary :all: jupyterlab
results in:I'm not saying this is necessarily this package's fault, of course, and probably most people will be fine with wheels, but it seems worth bringing up.
Proposed Solution
If I understand #11 correctly it adds an extension. Is there a way to split off this extension part (and the dependency on
jupyterlab
) into a different package? Alternatively, maybe thenbconvert
dependency could be removed or shifted onto a different package?Additional context
This came up when trying to update to the latest jupyterlab_pygments with spack, which builds everything from source separately and needs to resolve dependencies, so the recursive dependencies prevent them from being installed at all (even though they are only runtime dependencies). The result is that an old version of jupyterlab_pygments (0.1.2) is installed instead, and this seems to be what some other packaging systems are doing, too.
The text was updated successfully, but these errors were encountered: