55
66# In all cases, whenever we install an azure-* package from a requirement (read: not a specific file), the only source will be from the dev feed.
77# once we've downloaded these dependencies, only then do we install other packages from pypi.
8+
9+ # INSTALLER SELECTION:
10+ # You can control which pip implementation is used by setting the TOX_PIP_IMPL environment variable:
11+ # - TOX_PIP_IMPL=pip (default) - Uses standard pip for package installation
12+ # - TOX_PIP_IMPL=uv - Uses uv pip for faster package installation
13+ #
14+ # Example usage:
15+ # tox -e pylint # Use standard pip (default)
16+ # TOX_PIP_IMPL=pip tox -e pylint # Use standard pip explicitly
17+ # TOX_PIP_IMPL=uv tox -e pylint # Use uv for faster installation
18+
819[tox]
920requires =
1021 # Ensure that we're running a version of tox compatible with this config
@@ -13,6 +24,10 @@ requires=
1324 tox>=4.4.10
1425# note that this envlist is the default set of environments that will run if a target environment is not selected.
1526envlist = whl,sdist
27+ # Environment variable controlled installer configuration
28+ # Set TOX_PIP_IMPL=uv pip to use uv pip, or TOX_PIP_IMPL=pip (default) to use standard pip
29+ pip_impl = {env:TOX_PIP_IMPL:pip}
30+ pip_command = {[tox]pip_impl}
1631
1732
1833[tools]
@@ -51,27 +66,28 @@ ignore_args=--ignore=.tox --ignore=build --ignore=.eggs --ignore=samples
5166default_args = -rsfE --junitxml ={tox_root}/test-junit-{envname}.xml --verbose --cov-branch --durations =10 --ignore =azure {[pytest]ignore_args} --log-cli-level ={pytest_log_level}
5267
5368[testenv]
69+ uv_seed = true
5470parallel_show_output =True
5571skip_install = true
5672skipsdist = true
5773usedevelop = false
5874passenv = *
5975download =true
76+ # Allow both pip and uv as external commands since we support both via TOX_PIP_IMPL
77+ allowlist_externals = uv,pip
6078requires =
6179 {[packaging]pkgs}
6280setenv =
6381 SPHINX_APIDOC_OPTIONS =members,undoc-members,inherited-members
64- PIP_EXTRA_INDEX_URL =https://pypi.python.org/simple
6582 PROXY_URL =http://localhost:5000
6683 VIRTUALENV_WHEEL =0.45.1
6784 VIRTUALENV_PIP =24.0
6885 VIRTUALENV_SETUPTOOLS =75.3.2
86+ PIP_EXTRA_INDEX_URL =https://pypi.python.org/simple
6987deps = {[base]deps}
70- install_command = python -m pip install {opts} {packages} --cache-dir {tox_root}/../.tox_pip_cache_{envname}
88+ install_command = python -m {[tox]pip_command} install {opts} {packages} --cache-dir {tox_root}/../.tox_pip_cache_{envname}
7189commands =
72- python -m pip --version
7390 python {repository_root}/eng/tox/create_package_and_install.py -d {envtmpdir} -p {tox_root} -w {envtmpdir}
74- python -m pip freeze
7591 pytest {[pytest]default_args} {posargs} {tox_root}
7692 python {repository_root}/eng/tox/run_coverage.py -t {tox_root} -r {repository_root}
7793
@@ -91,8 +107,8 @@ setenv =
91107deps =
92108 -rdev_requirements.txt
93109commands =
94- python -m pip install pylint =={[testenv:pylint]pylint_version}
95- python -m pip install azure-pylint-guidelines-checker ==0.5.6 --index-url =" https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
110+ python -m {[tox]pip_command} install pylint =={[testenv:pylint]pylint_version}
111+ python -m {[tox]pip_command} install azure-pylint-guidelines-checker ==0.5.6 --index-url =" https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
96112 python {repository_root}/eng/tox/create_package_and_install.py \
97113 -d {envtmpdir}/dist \
98114 -p {tox_root} \
@@ -116,8 +132,8 @@ deps =
116132 -rdev_requirements.txt
117133 PyGitHub>=1.59.0
118134commands =
119- python -m pip install pylint =={[testenv:next-pylint]pylint_version}
120- python -m pip install azure-pylint-guidelines-checker ==0.5.6 --index-url =" https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
135+ python -m {[tox]pip_command} install pylint =={[testenv:next-pylint]pylint_version}
136+ python -m {[tox]pip_command} install azure-pylint-guidelines-checker ==0.5.6 --index-url =" https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
121137 python {repository_root}/eng/tox/create_package_and_install.py \
122138 -d {envtmpdir}/dist \
123139 -p {tox_root} \
@@ -272,10 +288,10 @@ setenv =
272288 {[testenv]setenv}
273289 PROXY_URL =http://localhost:5004
274290commands =
275- - python -m pip uninstall aiohttp --yes
291+ - python -m {[tox]pip_command} uninstall aiohttp --yes
276292 python {repository_root}/eng/tox/create_package_and_install.py -d {envtmpdir} -p {tox_root} -w {envtmpdir}
277293 python {repository_root}/eng/tox/try_import.py aiohttp -p {tox_root}
278- python -m pip freeze
294+ python -m {[tox]pip_command} freeze
279295 pytest {[pytest]default_args} --ignore-glob =' *async*.py' {posargs} --no-cov {tox_root}
280296
281297
@@ -297,7 +313,7 @@ commands =
297313 -p {tox_root} \
298314 -w {envtmpdir} \
299315 --package-type sdist
300- python -m pip freeze
316+ python -m {[tox]pip_command} freeze
301317 pytest {posargs} --no-cov {[pytest]ignore_args} {tox_root}
302318
303319
@@ -380,12 +396,12 @@ setenv =
380396deps =
381397 {[packaging]pkgs}
382398commands =
383- python -m pip install {repository_root}/tools/azure-sdk-tools --no-deps
399+ python -m {[tox]pip_command} install {repository_root}/tools/azure-sdk-tools --no-deps
384400 python {repository_root}/eng/tox/create_package_and_install.py \
385401 -d {envtmpdir} \
386402 -p {tox_root} \
387403 -w {envtmpdir}
388- python -m pip freeze
404+ python -m {[tox]pip_command} freeze
389405 python {repository_root}/eng/tox/import_all.py -t {tox_root}
390406
391407
@@ -399,7 +415,7 @@ setenv =
399415deps =
400416 {[packaging]pkgs}
401417commands =
402- python -m pip install {repository_root}/tools/azure-sdk-tools --no-deps
418+ python -m {[tox]pip_command} install {repository_root}/tools/azure-sdk-tools --no-deps
403419 python {repository_root}/eng/tox/create_package_and_install.py -d {envtmpdir} -p {tox_root} --skip-install True
404420 python {repository_root}/eng/tox/verify_whl.py -d {envtmpdir} -t {tox_root}
405421
@@ -409,12 +425,11 @@ description=Verify directories included in sdist and contents in manifest file.
409425skipsdist = true
410426skip_install = true
411427setenv =
412- {[testenv]setenv}
413- PROXY_URL =http://localhost:5010
428+ {[testenv]setenv} PROXY_URL =http://localhost:5010
414429deps =
415430 {[packaging]pkgs}
416431commands =
417- python -m pip install {repository_root}/tools/azure-sdk-tools --no-deps
432+ python -m {[tox]pip_command} install {repository_root}/tools/azure-sdk-tools --no-deps
418433 python {tox_root}/setup.py --q sdist -d {envtmpdir}
419434 python {repository_root}/eng/tox/verify_sdist.py -d {envtmpdir} -t {tox_root}
420435
@@ -435,7 +450,7 @@ commands =
435450commands =
436451 python {repository_root}/eng/tox/install_depend_packages.py -t {tox_root} -d {env:DEPENDENCY_TYPE:} -w {envtmpdir}
437452 python {repository_root}/eng/tox/create_package_and_install.py -d {envtmpdir} -p {tox_root} -w {envtmpdir} --pre-download-disabled
438- python -m pip freeze
453+ python -m {[tox]pip_command} freeze
439454 python {repository_root}/eng/tox/verify_installed_packages.py --packages-file {envtmpdir}/packages.txt
440455 pytest {[pytest]default_args} {posargs} --no-cov {tox_root}
441456
@@ -484,8 +499,8 @@ deps =
484499 {[base]deps}
485500commands =
486501 # install API stub generator
487- python -m pip install -r {repository_root}/eng/apiview_reqs.txt --index-url =" https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
488- python -m pip freeze
502+ python -m {[tox]pip_command} install -r {repository_root}/eng/apiview_reqs.txt --index-url =" https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
503+ python -m {[tox]pip_command} freeze
489504 python {repository_root}/eng/tox/run_apistubgen.py -t {tox_root} -w {envtmpdir} {posargs}
490505
491506
@@ -501,7 +516,7 @@ setenv =
501516deps =
502517 {[base]deps}
503518commands =
504- python -m pip freeze
519+ python -m {[tox]pip_command} freeze
505520 python {repository_root}/eng/tox/run_bandit.py -t {tox_root}
506521
507522
@@ -518,7 +533,7 @@ deps =
518533 {[base]deps}
519534 subprocess32; python_version < '3.5'
520535commands =
521- python -m pip freeze
536+ python -m {[tox]pip_command} freeze
522537 python {repository_root}/scripts/devops_tasks/test_run_samples.py -t {tox_root}
523538
524539
@@ -584,5 +599,5 @@ setenv =
584599 {[testenv]setenv}
585600 PROXY_URL =http://localhost:5018
586601commands =
587- {envbindir}/python -m pip install {toxinidir}/../../../tools/azure-sdk-tools[build]
602+ {envbindir}/python -m {[tox]pip_command} install {toxinidir}/../../../tools/azure-sdk-tools[build]
588603 python {repository_root}/eng/tox/run_optional.py -t {toxinidir} --temp ={envtmpdir} {posargs}
0 commit comments