Replies: 1 comment 7 replies
-
https://hatch.pypa.io/latest/config/environment/overview/#skip-install |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For a new project I'm setting up, I build a container image with four Python versions in it, and six Hatch environments pre-built with the project's dependencies (both the core dependencies and the linters/testing tools). When my CI jobs runs, they can launch a container from this image and immediately run the actual tasks to be done, after installing the project from the source directory, without having to wait for package installation and other stuff. This makes the lint and CI jobs run faster, and also avoids randomly getting new versions of dependencies when they aren't expected.
In order to make this work I had to inject
detached=true
into my CI environments, so that Hatch wouldn't attempt to install the project into them (during the pre-creation process the project source code isn't even visible to Hatch, only thepyproject.toml
file). While this works, it's not elegant :-)Would others be interested in something like
hatch env create foo --deps-only
, which would run the normal environment-creation process forfoo
but not attempt to build and install the project into it?Beta Was this translation helpful? Give feedback.
All reactions