File tree 2 files changed +16
-4
lines changed
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 14
14
python : " 3"
15
15
16
16
commands :
17
+ - asdf plugin add uv
18
+ - asdf install uv latest
19
+ - asdf global uv latest
17
20
- make dirhtml BUILDDIR=_readthedocs
18
21
- mv _readthedocs/dirhtml _readthedocs/html
Original file line number Diff line number Diff line change 70
70
ensure-venv :
71
71
@if [ ! -d $( VENVDIR) ] ; then \
72
72
echo " Creating venv in $( VENVDIR) " ; \
73
- $(PYTHON ) -m venv $(VENVDIR ) ; \
74
- $(VENVDIR ) /bin/python3 -m pip install --upgrade pip; \
75
- $(VENVDIR ) /bin/python3 -m pip install -r requirements.txt; \
73
+ if uv --version > /dev/null; then \
74
+ uv venv $(VENVDIR ) ; \
75
+ VIRTUAL_ENV=$(VENVDIR ) uv pip install -r requirements.txt; \
76
+ else \
77
+ $(PYTHON ) -m venv $(VENVDIR ) ; \
78
+ $(VENVDIR ) /bin/python3 -m pip install --upgrade pip; \
79
+ $(VENVDIR ) /bin/python3 -m pip install -r requirements.txt; \
80
+ fi ; \
76
81
echo " The venv has been created in the $( VENVDIR) directory" ; \
77
82
fi
78
83
@@ -175,7 +180,11 @@ check: ensure-venv
175
180
176
181
.PHONY : lint
177
182
lint : venv
178
- $(VENVDIR ) /bin/python3 -m pre_commit --version > /dev/null || $(VENVDIR ) /bin/python3 -m pip install pre-commit
183
+ if uv --version > /dev/null; then \
184
+ $(VENVDIR ) /bin/python3 -m pre_commit --version > /dev/null || VIRTUAL_ENV=$(VENVDIR ) uv pip install pre-commit; \
185
+ else \
186
+ $(VENVDIR ) /bin/python3 -m pre_commit --version > /dev/null || $(VENVDIR ) /bin/python3 -m pip install pre-commit; \
187
+ fi ;
179
188
$(VENVDIR ) /bin/python3 -m pre_commit run --all-files
180
189
181
190
.PHONY : serve
You can’t perform that action at this time.
0 commit comments