Skip to content

Commit b1cb728

Browse files
authored
fix: remediate hatch issue (temp) (#2099)
* remediate hatch issue (temp) Signed-off-by: degenaro <lou.degenaro@gmail.com> * try again Signed-off-by: degenaro <lou.degenaro@gmail.com> * more hatch patching Signed-off-by: degenaro <lou.degenaro@gmail.com> * fix hatch, next attempt Signed-off-by: degenaro <lou.degenaro@gmail.com> --------- Signed-off-by: degenaro <lou.degenaro@gmail.com>
1 parent 5fdb614 commit b1cb728

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

.github/workflows/python-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
ubuntu-latest-${{ needs.set-versions.outputs.max }}-hatch-
101101
- name: Install hatch
102102
run: |
103-
pip install hatch
103+
pip install hatch "virtualenv>=20.26.6,<21" # Pin until hatch supports virtualenv 21.x
104104
- name: Run binary tests
105105
run: |
106106
make test-bdist
@@ -194,7 +194,7 @@ jobs:
194194
run: echo "core=${{ (matrix.os == 'ubuntu-latest' && matrix.python-version == needs.set-versions.outputs.max ) }}" >> $GITHUB_OUTPUT
195195
- name: Install hatch
196196
run: |
197-
pip install hatch
197+
pip install hatch "virtualenv>=20.26.6,<21" # Pin until hatch supports virtualenv 21.x
198198
- name: Run tests
199199
if: steps.core-version.outputs.core != 'true'
200200
run: |

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ submodules: ## Initialize git submodules (nist-content, oscal)
3939
git submodule update --init
4040

4141
develop: submodules ## Set up development environment
42-
pip install hatch
42+
pip install hatch "virtualenv>=20.26.6,<21" # Pin until hatch supports virtualenv 21.x
4343
pip install -e .[dev]
4444

4545
pre-commit: ## Install pre-commit hooks
@@ -160,4 +160,4 @@ clean: clean-tmp ## Remove build artifacts and caches
160160
find . -type f -name "*.pyo" -delete 2>/dev/null || true
161161

162162
clean-env: ## Remove all hatch environments (forces dependency reinstall)
163-
hatch env prune
163+
hatch env prune

pyproject.toml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,28 @@ packages = ["trestle"]
113113
[tool.hatch.envs.default]
114114
dependencies = [
115115
"coverage[toml]~=7.4",
116+
"virtualenv>=20.26.6,<21", # Pin until hatch supports virtualenv 21.x
117+
]
118+
119+
# Constrains the internal environment hatch uses to run build hooks.
120+
# Without this, hatch resolves the latest virtualenv (21.x+) which breaks
121+
# the hatch-build env due to removed `propose_interpreters` API.
122+
[tool.hatch.envs.hatch-build]
123+
dependencies = [
124+
"virtualenv>=20.26.6,<21", # Pin until hatch supports virtualenv 21.x
116125
]
117126

118127
[tool.hatch.envs.hatch-test]
119128
default-args = ["tests"]
120129
parallel = true
121130
randomize = true
122-
# Coverage pinned for compatibility
123131
dependencies = [
124132
"coverage[toml]~=7.4",
125133
"pytest>=8.1",
126134
"pytest-xdist[psutil]>=3.5",
127-
"pytest-randomly>=3.15",
128-
"mypy"
135+
"pytest-randomly>=3.15",
136+
"mypy",
137+
"virtualenv>=20.26.6,<21", # Pin until hatch supports virtualenv 21.x
129138
]
130139

131140
[[tool.hatch.envs.hatch-test.matrix]]
@@ -328,4 +337,4 @@ ignore_token_for_push = false
328337
insecure = false
329338

330339
[tool.semantic_release.publish]
331-
dist_glob_patterns = ["dist/*"]
340+
dist_glob_patterns = ["dist/*"]

0 commit comments

Comments
 (0)