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

Hatch doesn't respect build dependency versions #758

Open
dlqqq opened this issue Feb 20, 2023 · 0 comments
Open

Hatch doesn't respect build dependency versions #758

dlqqq opened this issue Feb 20, 2023 · 0 comments

Comments

@dlqqq
Copy link

dlqqq commented Feb 20, 2023

It appears that hatch doesn't respect specification of build dependency versions in the build-system.requires field as defined per PEP 518 when running post-install-commands. Instead it seems to inherit the dependency available in current Python environment.

To reproduce:

  1. (optional) start a new conda environment and conda install pip
  2. pip install jupyterlab==4.0.0a34
  3. hatch new hatch-playground
  4. Copy and paste the following gist into pyproject.toml. This specifies jupyterlab~=3.4 as a build dependency and adds it as an environment dependency as well. Then in post-install-commands, it prints the version of jupyterlab.
  5. Verify the following output:
% hatch shell
4.0.0a34

The expected result is some version compatible with the specifier jupyterlab~=3.4, e.g. 3.6.1 instead.

I suspect that the same behavior happens during pre-installation and installation.

I've tried reading the docs and there is mention of "build targets" and "build hooks" dependencies, but it was not immediately obvious that it was relevant to my use-case. If there is a way to do this already in hatch, then this is a documentation issue and not a bug.

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

No branches or pull requests

1 participant