5
5
6
6
# 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.
7
7
# 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
+
8
19
[tox]
9
20
requires =
10
21
# Ensure that we're running a version of tox compatible with this config
@@ -13,6 +24,10 @@ requires=
13
24
tox>=4.4.10
14
25
# note that this envlist is the default set of environments that will run if a target environment is not selected.
15
26
envlist = 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}
16
31
17
32
18
33
[tools]
@@ -51,27 +66,28 @@ ignore_args=--ignore=.tox --ignore=build --ignore=.eggs --ignore=samples
51
66
default_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}
52
67
53
68
[testenv]
69
+ uv_seed = true
54
70
parallel_show_output =True
55
71
skip_install = true
56
72
skipsdist = true
57
73
usedevelop = false
58
74
passenv = *
59
75
download =true
76
+ # Allow both pip and uv as external commands since we support both via TOX_PIP_IMPL
77
+ allowlist_externals = uv,pip
60
78
requires =
61
79
{[packaging]pkgs}
62
80
setenv =
63
81
SPHINX_APIDOC_OPTIONS =members,undoc-members,inherited-members
64
- PIP_EXTRA_INDEX_URL =https://pypi.python.org/simple
65
82
PROXY_URL =http://localhost:5000
66
83
VIRTUALENV_WHEEL =0.45.1
67
84
VIRTUALENV_PIP =24.0
68
85
VIRTUALENV_SETUPTOOLS =75.3.2
86
+ PIP_EXTRA_INDEX_URL =https://pypi.python.org/simple
69
87
deps = {[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}
71
89
commands =
72
- python -m pip --version
73
90
python {repository_root}/eng/tox/create_package_and_install.py -d {envtmpdir} -p {tox_root} -w {envtmpdir}
74
- python -m pip freeze
75
91
pytest {[pytest]default_args} {posargs} {tox_root}
76
92
python {repository_root}/eng/tox/run_coverage.py -t {tox_root} -r {repository_root}
77
93
@@ -91,8 +107,8 @@ setenv =
91
107
deps =
92
108
-rdev_requirements.txt
93
109
commands =
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/"
96
112
python {repository_root}/eng/tox/create_package_and_install.py \
97
113
-d {envtmpdir}/dist \
98
114
-p {tox_root} \
@@ -116,8 +132,8 @@ deps =
116
132
-rdev_requirements.txt
117
133
PyGitHub>=1.59.0
118
134
commands =
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/"
121
137
python {repository_root}/eng/tox/create_package_and_install.py \
122
138
-d {envtmpdir}/dist \
123
139
-p {tox_root} \
@@ -272,10 +288,10 @@ setenv =
272
288
{[testenv]setenv}
273
289
PROXY_URL =http://localhost:5004
274
290
commands =
275
- - python -m pip uninstall aiohttp --yes
291
+ - python -m {[tox]pip_command} uninstall aiohttp --yes
276
292
python {repository_root}/eng/tox/create_package_and_install.py -d {envtmpdir} -p {tox_root} -w {envtmpdir}
277
293
python {repository_root}/eng/tox/try_import.py aiohttp -p {tox_root}
278
- python -m pip freeze
294
+ python -m {[tox]pip_command} freeze
279
295
pytest {[pytest]default_args} --ignore-glob =' *async*.py' {posargs} --no-cov {tox_root}
280
296
281
297
@@ -297,7 +313,7 @@ commands =
297
313
-p {tox_root} \
298
314
-w {envtmpdir} \
299
315
--package-type sdist
300
- python -m pip freeze
316
+ python -m {[tox]pip_command} freeze
301
317
pytest {posargs} --no-cov {[pytest]ignore_args} {tox_root}
302
318
303
319
@@ -380,12 +396,12 @@ setenv =
380
396
deps =
381
397
{[packaging]pkgs}
382
398
commands =
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
384
400
python {repository_root}/eng/tox/create_package_and_install.py \
385
401
-d {envtmpdir} \
386
402
-p {tox_root} \
387
403
-w {envtmpdir}
388
- python -m pip freeze
404
+ python -m {[tox]pip_command} freeze
389
405
python {repository_root}/eng/tox/import_all.py -t {tox_root}
390
406
391
407
@@ -399,7 +415,7 @@ setenv =
399
415
deps =
400
416
{[packaging]pkgs}
401
417
commands =
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
403
419
python {repository_root}/eng/tox/create_package_and_install.py -d {envtmpdir} -p {tox_root} --skip-install True
404
420
python {repository_root}/eng/tox/verify_whl.py -d {envtmpdir} -t {tox_root}
405
421
@@ -409,12 +425,11 @@ description=Verify directories included in sdist and contents in manifest file.
409
425
skipsdist = true
410
426
skip_install = true
411
427
setenv =
412
- {[testenv]setenv}
413
- PROXY_URL =http://localhost:5010
428
+ {[testenv]setenv} PROXY_URL =http://localhost:5010
414
429
deps =
415
430
{[packaging]pkgs}
416
431
commands =
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
418
433
python {tox_root}/setup.py --q sdist -d {envtmpdir}
419
434
python {repository_root}/eng/tox/verify_sdist.py -d {envtmpdir} -t {tox_root}
420
435
@@ -435,7 +450,7 @@ commands =
435
450
commands =
436
451
python {repository_root}/eng/tox/install_depend_packages.py -t {tox_root} -d {env:DEPENDENCY_TYPE:} -w {envtmpdir}
437
452
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
439
454
python {repository_root}/eng/tox/verify_installed_packages.py --packages-file {envtmpdir}/packages.txt
440
455
pytest {[pytest]default_args} {posargs} --no-cov {tox_root}
441
456
@@ -484,8 +499,8 @@ deps =
484
499
{[base]deps}
485
500
commands =
486
501
# 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
489
504
python {repository_root}/eng/tox/run_apistubgen.py -t {tox_root} -w {envtmpdir} {posargs}
490
505
491
506
@@ -501,7 +516,7 @@ setenv =
501
516
deps =
502
517
{[base]deps}
503
518
commands =
504
- python -m pip freeze
519
+ python -m {[tox]pip_command} freeze
505
520
python {repository_root}/eng/tox/run_bandit.py -t {tox_root}
506
521
507
522
@@ -518,7 +533,7 @@ deps =
518
533
{[base]deps}
519
534
subprocess32; python_version < '3.5'
520
535
commands =
521
- python -m pip freeze
536
+ python -m {[tox]pip_command} freeze
522
537
python {repository_root}/scripts/devops_tasks/test_run_samples.py -t {tox_root}
523
538
524
539
@@ -584,5 +599,5 @@ setenv =
584
599
{[testenv]setenv}
585
600
PROXY_URL =http://localhost:5018
586
601
commands =
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]
588
603
python {repository_root}/eng/tox/run_optional.py -t {toxinidir} --temp ={envtmpdir} {posargs}
0 commit comments