File tree 1 file changed +27
-8
lines changed
1 file changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,9 @@ passenv =
45
45
# Pass through AWS credentials
46
46
AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN \
47
47
# Pass through AWS profile name (useful for local testing)
48
- AWS_PROFILE
48
+ AWS_PROFILE \
49
+ # Pass through custom pip config file settings
50
+ PIP_CONFIG_FILE
49
51
sitepackages = False
50
52
deps = -rtest/requirements.txt
51
53
commands =
@@ -332,22 +334,39 @@ deps =
332
334
commands =
333
335
python setup.py sdist bdist_wheel
334
336
335
- [testenv:test- release]
337
+ [testenv:release-base ]
336
338
basepython = python3
337
339
skip_install = true
338
340
deps =
339
341
{[testenv:build]deps}
340
342
twine
343
+ passenv =
344
+ {[testenv]passenv} \
345
+ TWINE_USERNAME \
346
+ TWINE_PASSWORD \
347
+ TWINE_REPOSITORY_URL
341
348
commands =
342
349
{[testenv:build]commands}
343
- twine upload --skip-existing --repository testpypi dist/*
350
+ twine upload --skip-existing {toxinidir}/dist/*
351
+
352
+ [testenv:test-release]
353
+ basepython = python3
354
+ skip_install = true
355
+ deps = {[testenv:release-base]deps}
356
+ passenv =
357
+ {[testenv:release-base]passenv}
358
+ setenv =
359
+ TWINE_REPOSITORY_URL = https://test.pypi.org/legacy/
360
+ commands = {[testenv:release-base]commands}
344
361
345
362
[testenv:release]
346
363
basepython = python3
347
364
skip_install = true
348
- deps =
349
- {[testenv:build]deps}
350
- twine
365
+ deps = {[testenv:release-base]deps}
366
+ passenv =
367
+ {[testenv:release-base]passenv}
368
+ whitelist_externals = unset
351
369
commands =
352
- {[testenv:build]commands}
353
- twine upload --skip-existing --repository pypi dist/*
370
+ # Unsetting the TWINE_REPOSITORY_URL defaults twine to using production PyPI
371
+ unset TWINE_REPOSITORY_URL
372
+ {[testenv:release-base]commands}
You can’t perform that action at this time.
0 commit comments