Skip to content

Commit 79fe7f3

Browse files
emcdclaude
andcommitted
Add Click constraints support to Hatch GitHub action.
The GitHub action now automatically detects and uses pip constraints from .auxiliary/configuration/hatch-constraints.pip when installing Hatch. This allows projects to work around upstream dependency conflicts like the Click 8.3.0 breaking changes that broke Hatch (pypa/hatch#2050). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f9bab78 commit 79fe7f3

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Pip constraints file for Hatch installation
2+
#
3+
# Click 8.3.0 introduced breaking changes that broke Hatch
4+
# See: https://github.com/pypa/hatch/issues/2050
5+
#
6+
# Remove this constraint once Hatch releases a fix
7+
8+
click<8.3.0

.github/actions/python-hatch/action.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,10 @@ runs:
2929
shell: bash
3030

3131
- name: Install hatch
32-
run: python -m pip install hatch
32+
run: |
33+
set -eu -o pipefail
34+
if [[ -f '.auxiliary/configuration/hatch-constraints.pip' ]]; then
35+
constraints='--constraint .auxiliary/configuration/hatch-constraints.pip'
36+
else constraints=''; fi
37+
python -m pip install ${constraints} hatch
3338
shell: bash

0 commit comments

Comments
 (0)