Skip to content

Commit 30eef31

Browse files
authored
Fix Filelock usage to work with older versions. (#9)
1 parent dcb1593 commit 30eef31

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Release Notes
22

3+
## 0.32.4
4+
5+
This release brings compatility with older versions of `filelock` when installing `dev-cmd` with the
6+
`old-pythons` extra.
7+
38
## 0.32.3
49

510
This release switches from a bespoke lock embedding in dev-cmd distributuons to use of the

dev_cmd/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright 2024 John Sirois.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

4-
__version__ = "0.32.3"
4+
__version__ = "0.32.4"

dev_cmd/venv.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def marker_environment(python: Python, quiet: bool = False) -> dict[str, str]:
111111
fingerprint = _fingerprint(resolved_python.encode())
112112
markers_file = _ensure_cache_dir() / "interpreters" / f"markers.{fingerprint}.json"
113113
if not os.path.exists(markers_file):
114+
markers_file.parent.mkdir(parents=True, exist_ok=True)
114115
with (
115116
FileLock(f"{markers_file}.lck"),
116117
TemporaryDirectory(dir=markers_file.parent, prefix="packaging-venv.") as td,
@@ -245,6 +246,7 @@ def ensure(
245246
venv_dir = _ensure_cache_dir() / "venvs" / fingerprint
246247
layout_file = venv_dir / ".dev-cmd-venv-layout.json"
247248
if not os.path.exists(venv_dir):
249+
venv_dir.parent.mkdir(parents=True, exist_ok=True)
248250
with FileLock(f"{venv_dir}.lck"):
249251
if not os.path.exists(venv_dir):
250252
print(

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ requires = [
55

66
# 1st support for license expressions was in setuptools 77.0.0.
77
"setuptools>=77",
8+
9+
"uv",
810
]
911
build-backend = "pex.build_backend.wrap"
1012

0 commit comments

Comments
 (0)