From 7d12f65a7ed543208f7fa1e817547d6dd1e10a81 Mon Sep 17 00:00:00 2001 From: "Adam J. Jackson" Date: Mon, 16 Dec 2024 15:21:16 +0000 Subject: [PATCH] Cleanup environment variables --- build_utils/release_tox.ini | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/build_utils/release_tox.ini b/build_utils/release_tox.ini index 2c1ee0074..0ed260e2b 100644 --- a/build_utils/release_tox.ini +++ b/build_utils/release_tox.ini @@ -11,17 +11,21 @@ test_command = python {toxinidir}/../tests_and_analysis/test/run_tests.py --repo requirements_dir = {toxinidir}/../tests_and_analysis passenv = EUPHONIC_VERSION - CC_LD -setenv = - EXTRAS=[test,matplotlib,phonopy-reader,brille] +# The name "extras" is reserved and has its own format with newlines: +# we need a token to inject into custom commands_pre, so call it extras_str +extras_str = [test,matplotlib,phonopy-reader,brille] # Test PyPI source distribution [testenv:pypisource-{py310,py312}] -passenv = CC, CC_LD, LDFLAGS, CPPFLAGS +passenv = + CC + CC_LD + LDFLAGS + CPPFLAGS commands_pre = python -m pip install \ --force-reinstall \ - 'euphonic{env:EXTRAS}=={env:EUPHONIC_VERSION}' \ + euphonic{[testenv]extras_str}=={env:EUPHONIC_VERSION} \ --no-binary 'euphonic' commands = {[testenv]test_command} @@ -29,7 +33,7 @@ commands = {[testenv]test_command} commands_pre = python -m pip install \ --force-reinstall \ - 'euphonic{env:EXTRAS}=={env:EUPHONIC_VERSION}' \ + euphonic{[testenv]extras_str}=={env:EUPHONIC_VERSION} \ --only-binary 'euphonic' commands = {[testenv]test_command} @@ -42,7 +46,7 @@ commands_pre = python -m pip install --force-reinstall \ -r{toxinidir}/../tests_and_analysis/minimum_euphonic_requirements.txt python -m pip install \ - 'euphonic{env:EXTRAS}=={env:EUPHONIC_VERSION}' \ + euphonic{[testenv]extras_str}=={env:EUPHONIC_VERSION} \ --only-binary 'euphonic' commands = {[testenv]test_command}