File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ PACKAGE_NAME=ovirt-imageio
33PACKAGE_VERSION =$(shell python3 ovirt_imageio/_internal/version.py)
44OUTDIR =dist
55
6+ VENV_DIR = $(HOME ) /.venv/ovirt-imageio
7+
68RPM_TOPDIR? =$(PWD ) /build/rpm
79TAR_NAME =$(PACKAGE_NAME ) -$(PACKAGE_VERSION ) .tar.gz
810SPEC_NAME =$(PACKAGE_NAME ) .spec
@@ -12,7 +14,7 @@ GENERATED = \
1214
1315METADATA = ovirt_imageio/_internal/version.py Makefile
1416
15- .PHONY : build check dist srpm rpm clean images clean-images storage clean-storage $(SPEC_NAME )
17+ .PHONY : build check dist srpm rpm clean images clean-images storage clean-storage $(SPEC_NAME ) venv
1618
1719build :
1820 python3 setup.py build_ext --build-lib .
@@ -59,6 +61,11 @@ storage:
5961clean-storage :
6062 userstorage delete storage.py
6163
64+ venv :
65+ python3 -m venv $(VENV_DIR ) && \
66+ $(VENV_DIR ) /bin/python3 -m pip install --upgrade pip && \
67+ $(VENV_DIR ) /bin/python3 -m pip install -r containers/requirements.txt
68+
6269$(GENERATED ) : % : % .in $(METADATA )
6370 @sed \
6471 -e ' s|@PACKAGE_NAME@|$(PACKAGE_NAME)|g' \
Original file line number Diff line number Diff line change @@ -45,18 +45,14 @@ Install the runtime requirements:
4545
4646Create a virtual environment for running the tests:
4747
48- python3 -m venv ~/venv/ovirt-imageio
49- source ~/venv/ovirt-imageio/bin/activate
50- pip install --upgrade pip
51- pip install --upgrade -r containers/requirements.txt
52- deactivate
48+ make venv
5349
5450
5551## Running the tests
5652
5753Before running the tests, enter the virtual environment:
5854
59- source ~/venv/ovirt-imageio/bin/activate
55+ source ~/. venv/ovirt-imageio/bin/activate
6056
6157When you are done, you can deactivate the environment using:
6258
You can’t perform that action at this time.
0 commit comments