You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
(optional) start a new conda environment and conda install pip
pip install jupyterlab==4.0.0a34
hatch new hatch-playground
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.
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.
The text was updated successfully, but these errors were encountered:
It appears that hatch doesn't respect specification of build dependency versions in the
build-system.requires
field as defined per PEP 518 when runningpost-install-commands
. Instead it seems to inherit the dependency available in current Python environment.To reproduce:
conda install pip
pip install jupyterlab==4.0.0a34
hatch new hatch-playground
pyproject.toml
. This specifiesjupyterlab~=3.4
as a build dependency and adds it as an environment dependency as well. Then inpost-install-commands
, it prints the version ofjupyterlab
.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.
The text was updated successfully, but these errors were encountered: