From 593e2379c688e92985a3c6eceabf69cb721207a5 Mon Sep 17 00:00:00 2001 From: Jono Yang Date: Thu, 2 Sep 2021 17:09:06 -0700 Subject: [PATCH] Use venv as virtual environment directory name #37 * Replace all references to `tmp` with `venv` Signed-off-by: Jono Yang --- .gitignore | 1 + .travis.yml | 2 +- README.rst | 6 +++--- azure-pipelines.yml | 14 +++++++------- configure | 4 ++-- configure.bat | 4 ++-- pyproject.toml | 3 ++- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 68de2d2273..339dca50d7 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ /Lib /pip-selfcheck.json /tmp +/venv .Python /include /Include diff --git a/.travis.yml b/.travis.yml index 1a90a38568..ea48ceb539 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,4 +19,4 @@ python: install: ./configure --dev # Scripts to run at script stage -script: tmp/bin/pytest +script: venv/bin/pytest diff --git a/README.rst b/README.rst index a52d80506e..08ef083534 100644 --- a/README.rst +++ b/README.rst @@ -74,7 +74,7 @@ To generate requirements.txt: .. code-block:: bash - python etc/scripts/gen_requirements.py -s tmp/lib/python/site-packages/ + python etc/scripts/gen_requirements.py -s venv/lib/python/site-packages/ Replace \ with the version number of the Python being used. @@ -82,8 +82,8 @@ 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/site-packages/ + source venv/bin/activate + python etc/scripts/gen_requirements_dev.py -s venv/lib/python/site-packages/ Collecting and generating ABOUT files for dependencies ------------------------------------------------------ diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 31ef36f096..22c12c436e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,7 +13,7 @@ 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: @@ -21,7 +21,7 @@ jobs: 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: @@ -29,7 +29,7 @@ jobs: 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: @@ -37,7 +37,7 @@ jobs: 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: @@ -45,7 +45,7 @@ jobs: 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: @@ -53,7 +53,7 @@ jobs: 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: @@ -61,4 +61,4 @@ jobs: 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 diff --git a/configure b/configure index bbe87b0aee..7c162c7e06 100755 --- a/configure +++ b/configure @@ -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=" " diff --git a/configure.bat b/configure.bat index 75cab5fcd5..529c37188a 100644 --- a/configure.bat +++ b/configure.bat @@ -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= " diff --git a/pyproject.toml b/pyproject.toml index 852f0fceed..1e10f326c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,10 +33,11 @@ norecursedirs = [ "Scripts", "thirdparty", "tmp", + "venv", "tests/data", ".eggs" ] - + python_files = "*.py" python_classes = "Test"