@@ -14,8 +14,7 @@ PAPER =
1414SOURCES =
1515DISTVERSION = $(shell $(PYTHON ) tools/extensions/patchlevel.py)
1616IS_PYTHON_BUILD = $(shell $(PYTHON ) -c 'import sysconfig; print("true") if sysconfig.is_python_build() else None')
17- REQUIREMENTS = requirements.txt
18- REQUIREMENTS_NO_BUILD = requirements-no-build.txt
17+ REQUIREMENTS = $(if $(IS_PYTHON_BUILD ) ,requirements.txt,requirements-no-build.txt)
1918SPHINXERRORHANDLING = --fail-on-warning
2019
2120# Internal variables.
@@ -168,19 +167,18 @@ clean-venv:
168167
169168.PHONY : venv
170169venv :
171- requirements = -r $(REQUIREMENTS ) $(if $(IS_PYTHON_BUILD ) ,,-r $(REQUIREMENTS_NO_BUILD ) )
172170 @if [ -d $( VENVDIR) ] ; then \
173171 echo " venv already exists." ; \
174172 echo " To recreate it, remove it first with \` make clean-venv'." ; \
175173 else \
176174 echo " Creating venv in $( VENVDIR) " ; \
177175 if $( UV) --version > /dev/null 2>&1 ; then \
178176 $(UV ) venv --python=$(PYTHON ) $(VENVDIR ) ; \
179- VIRTUAL_ENV=$(VENVDIR ) $(UV ) pip install $( requirements ); \
177+ VIRTUAL_ENV=$(VENVDIR ) $(UV ) pip install -r $( REQUIREMENTS ); \
180178 else \
181179 $(PYTHON ) -m venv $(VENVDIR ) ; \
182180 $(VENVDIR ) /bin/python3 -m pip install --upgrade pip; \
183- $(VENVDIR ) /bin/python3 -m pip install $( requirements ); \
181+ $(VENVDIR ) /bin/python3 -m pip install -r $( REQUIREMENTS ); \
184182 fi ; \
185183 echo " The venv has been created in the $( VENVDIR) directory" ; \
186184 fi
0 commit comments