8000 Document recommended method(s) to set environment variables when environments containing a package are activated · Issue #5035 · conda/conda-build · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Document recommended method(s) to set environment variables when environments containing a package are activated #5035
Open
@mfisher87

Description

@mfisher87

I help maintain a Conda Forge feedstock, and a user of the package reported problems using the package with Fish. The root cause was our activation scripts not being compatible with their shell, and the docs include a prescient warning:

It is generally recommended to avoid using activate scripts when another option is possible because people do not always activate environments the expected way and these packages may then misbehave.

I'm trying to understand what alternatives are available to me, and I came across some pre-existing discussion which included mention of a mechanism to set envvars using a JSON key-value mapping.

I found the PR that introduced this functionality, but I haven't found any documentation. Is this mechanism deliberately un-documented because it's unsupported? Or is it anticipated that the recipe format will be updated to support this feature to provide a more mature API (#4833)?

After consideration of the above, I'd be happy to help document what it would look like to create this JSON mapping at build-time using a script. I think it would be especially useful to update the Activate Scripts page which I quoted above to point out preferred mechanism(s).

Thanks for your consideration!

PS: While I'm in there, I see the prose on this doc page includes "The installed scripts are recommended to be prefixed by the package name and a separating -.", but both examples use an _ instead. Which is the true intent of the docs? I'll fix that too :)

Metadata

Metadata

Assignees

Labels

backlogissue has been triaged but has not been earmarked for any upcoming releasegood first issuegreat for new contributors, code change is envisioned to be trivial/relatively straight-forwardsource::communitycatch-all for issues filed by community memberstype::documentationrequest for improved documentation

Type

No type

Projects

Status

🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0