Skip to content

Conversation

@telamonian
Copy link
Member

I don't have a global yarn cmd available in my dev env (in my case, the global yarn cmd actually points to apache yarn). With the new hatch build this was causing an error on dev install:

  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
  ╰─> [91 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: {'build_cmd': 'install:extension', 'source_dir': 'src', 'build_dir': 'jupyterlab_conda_store/labextension'}
      INFO:hatch_jupyter_builder.utils:Installing build dependencies with npm.  This may take a while...
      INFO:hatch_jupyter_builder.utils:> /usr/local/bin/yarn install
      ERROR: install is not COMMAND nor fully qualified CLASSNAME.
      Usage: yarn [OPTIONS] SUBCOMMAND [SUBCOMMAND OPTIONS]
       or    yarn [OPTIONS] CLASSNAME [CLASSNAME OPTIONS]
...

The toml was already set up so that jlpm is used instead of yarn for regular installs, so I just copied this config over to the dev (ie editable) install. That fixed it

I don't have a global `yarn` cmd available in my dev env (in my case, the global `yarn` cmd actually points to apache yarn). With the new hatch build this was causing an error on dev install:

```
  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
  ╰─> [91 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: {'build_cmd': 'install:extension', 'source_dir': 'src', 'build_dir': 'jupyterlab_conda_store/labextension'}
      INFO:hatch_jupyter_builder.utils:Installing build dependencies with npm.  This may take a while...
      INFO:hatch_jupyter_builder.utils:> /usr/local/bin/yarn install
      ERROR: install is not COMMAND nor fully qualified CLASSNAME.
      Usage: yarn [OPTIONS] SUBCOMMAND [SUBCOMMAND OPTIONS]
       or    yarn [OPTIONS] CLASSNAME [CLASSNAME OPTIONS]
```

The toml was already set up so that `jlpm` is used instead of `yarn` for regular installs, so I just copied this config over to the dev (ie editable) install. That fixed it
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @telamonian

@fcollonval fcollonval merged commit 3b4d269 into 3.0 Sep 9, 2022
@fcollonval fcollonval deleted the jlpm-in-editable-build-kwargs branch September 9, 2022 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants