Skip to content

Commit

Permalink
Use venv as virtual environment directory name #37
Browse files Browse the repository at this point in the history
    * Replace all references to `tmp` with `venv`

Signed-off-by: Jono Yang <[email protected]>
  • Loading branch information
JonoYang committed Sep 3, 2021
1 parent a5ae4f3 commit 593e237
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/Lib
/pip-selfcheck.json
/tmp
/venv
.Python
/include
/Include
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ python:
install: ./configure --dev

# Scripts to run at script stage
script: tmp/bin/pytest
script: venv/bin/pytest
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ To generate requirements.txt:

.. code-block:: bash
python etc/scripts/gen_requirements.py -s tmp/lib/python<version>/site-packages/
python etc/scripts/gen_requirements.py -s venv/lib/python<version>/site-packages/
Replace \<version\> with the version number of the Python being used.

To generate requirements-dev.txt after requirements.txt has been generated:

.. code-block:: bash
./configure --dev
source tmp/bin/activate
python etc/scripts/gen_requirements_dev.py -s tmp/lib/python<version>/site-packages/
source venv/bin/activate
python etc/scripts/gen_requirements_dev.py -s venv/lib/python<version>/site-packages/
Collecting and generating ABOUT files for dependencies
------------------------------------------------------
Expand Down
14 changes: 7 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,52 @@ jobs:
image_name: ubuntu-16.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -vvs
all: venv/bin/pytest -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu18_cpython
image_name: ubuntu-18.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu20_cpython
image_name: ubuntu-20.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos1014_cpython
image_name: macos-10.14
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos1015_cpython
image_name: macos-10.15
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp/bin/pytest -n 2 -vvs
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-win.yml
parameters:
job_name: win2016_cpython
image_name: vs2017-win2016
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp\Scripts\pytest -n 2 -vvs
all: venv\Scripts\pytest -n 2 -vvs

- template: etc/ci/azure-win.yml
parameters:
job_name: win2019_cpython
image_name: windows-2019
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: tmp\Scripts\pytest -n 2 -vvs
all: venv\Scripts\pytest -n 2 -vvs
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ REQUIREMENTS="--editable . --constraint requirements.txt"
DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"

# where we create a virtualenv
VIRTUALENV_DIR=tmp
VIRTUALENV_DIR=venv

# Cleanable files and directories with the --clean option
CLEANABLE="
build
tmp"
venv"

# extra arguments passed to pip
PIP_EXTRA_ARGS=" "
Expand Down
4 changes: 2 additions & 2 deletions configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ set "REQUIREMENTS=--editable . --constraint requirements.txt"
set "DEV_REQUIREMENTS=--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"

@rem # where we create a virtualenv
set "VIRTUALENV_DIR=tmp"
set "VIRTUALENV_DIR=venv"

@rem # Cleanable files and directories to delete with the --clean option
set "CLEANABLE=build tmp"
set "CLEANABLE=build venv"

@rem # extra arguments passed to pip
set "PIP_EXTRA_ARGS= "
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ norecursedirs = [
"Scripts",
"thirdparty",
"tmp",
"venv",
"tests/data",
".eggs"
]

python_files = "*.py"

python_classes = "Test"
Expand Down

0 comments on commit 593e237

Please sign in to comment.