Skip to content

Replace activate scripts with env_vars.d JSON for TESSDATA_PREFIX#75

Draft
wolfv wants to merge 1 commit into
conda-forge:mainfrom
wolfv:use-env-vars-d
Draft

Replace activate scripts with env_vars.d JSON for TESSDATA_PREFIX#75
wolfv wants to merge 1 commit into
conda-forge:mainfrom
wolfv:use-env-vars-d

Conversation

@wolfv

@wolfv wolfv commented Mar 31, 2026

Copy link
Copy Markdown
Member

Summary

  • Replaces .sh, .bat, .ps1, .msh activation/deactivation scripts with a single JSON file in etc/conda/env_vars.d/
  • conda has supported this mechanism since conda#6820 — it is shell-agnostic and simpler
  • conda handles prefix replacement in text files (including JSON) at install time, and on Windows it correctly uses forward slashes so the JSON remains valid

Test plan

  • Verify TESSDATA_PREFIX is set correctly after conda activate
  • Verify TESSDATA_PREFIX is unset after conda deactivate
  • Test on Linux, macOS, and Windows

🤖 Generated with Claude Code

conda supports setting environment variables via a JSON file in
etc/conda/env_vars.d/ since conda #6820. This is simpler and
shell-agnostic, removing the need for separate .sh/.bat/.ps1/.msh
activation scripts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@conda-forge-admin

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe/meta.yaml) and found it was in an excellent condition.

@wolfv wolfv marked this pull request as draft March 31, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants