deathbeds / jupyterlab-deck

Lightweight presentations for JupyterLab
https://jupyterlab-deck.rtfd.io
BSD 3-Clause "New" or "Revised" License
40 stars 9 forks source link

Install from git failure #66

Open nthiery opened 9 months ago

nthiery commented 9 months ago

Description

Trying to currently install jupyterlab-deck from the git repository fails.

Reproduce

Short version:

pip  install git+https://github.com/deathbeds/jupyterlab-deck.git

Long version:

git clone git@github.com:deathbeds/jupyterlab-deck.git
cd jupyterlab_deck                                    
pip install .              
Processing /tmp/jupyterlab-deck
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Traceback (most recent call last):
        File "/opt/mambaforge/envs/intro-science-donnees/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/mambaforge/envs/intro-science-donnees/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/mambaforge/envs/intro-science-donnees/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-3wqla2dh/overlay/lib/python3.11/site-packages/flit_core/buildapi.py", line 23, in get_requires_for_build_wheel
          info = read_flit_config(pyproj_toml)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-3wqla2dh/overlay/lib/python3.11/site-packages/flit_core/config.py", line 79, in read_flit_config
          return prep_toml_config(d, path)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-3wqla2dh/overlay/lib/python3.11/site-packages/flit_core/config.py", line 177, in prep_toml_config
          raise ConfigError(f"{toml_key} must refer to a directory")
      flit_core.config.ConfigError: tool.flit.external-data.directory must refer to a directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

This seems to be caused by the following configuration in pyproject.toml

[tool.flit.external-data]
directory = "src/_d"

whereas there is no src/_d directory.

Is there some instruction to run first that would create that directory?

bollwyvl commented 9 months ago

As mentioned in the readme, please see the contributing guide for a development setup description.

nthiery commented 9 months ago

Hmm sorry @bollwyvl for the noise. That RTFM was well deserved: I got spoiled by these many Python package that can be installed directly from their git repo :-)

Alas, doit fails for me:

> source activate ./.venv
(/opt/jupyterlab-deck/.venv)
> doit 'serve:lab'   
-- env:conda:environment-build.yml
-- env:conda:environment-docs.yml
-- env:conda:environment-test.yml
-- env:conda:environment-lint.yml
-- env:conda:environment.yml
-- setup:conda
.  setup:yarn
yarn install v1.21.1
[1/4] Resolving packages...
warning lerna > @npmcli/run-script > node-gyp > make-fetch-happen > cacache > @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
error Couldn't find any versions for "@deathbeds/jupyterlab-deck" that matches "workspace:^"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
warning workspace-aggregator-f08f579f-502d-4d69-be73-c5880fe15171 > @deathbeds/jupyterlab-deck > @jupyterlab/builder > source-map-loader > data-urls > abab@2.0.6: Use your platform's native atob() and btoa() methods instead
TaskFailed - taskid:setup:yarn
Command failed: '['jlpm']' returned 1

Any clue?