conda / conda-build

Commands and tools for building conda packages
https://docs.conda.io/projects/conda-build/
Other
379 stars 421 forks source link

allow setting env vars in test section #4940

Open jschueller opened 1 year ago

jschueller commented 1 year ago

Checklist

What is the idea?

similarly to the build section

build:
  script_env:
    - MYVAR
    - ANOTHER_VAR

we could need to set env vars in the test section

Why is this needed?

for example see how it would help this one: https://github.com/conda-forge/scikit-image-feedstock/blob/main/recipe/meta.yaml#L130

test:
  requires:
    - pytest
    - pytest-localserver
    # Include pooch to ensure full test coverage
    - pooch  # [not (ppc64le or aarch64)]
    - pip
  imports:
    - skimage
  commands:
    # 2023/06/28 -- Seems like pypy + scipy's pip check is broken
    - pip check              # [python_impl == 'cpython']
    - setx MPLBACKEND "Agg"  # [win]
    - export MPLBACKEND=Agg  # [unix]

What should happen?

No response

Additional Context

No response

github-actions[bot] commented 1 month ago

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    • What OS and version you reproduced the issue on
    • What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

jschueller commented 1 month ago

no one ?