actions / actions/setup-python
Extend PKG_CONFIG_PATH rather than overwriting it
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.2k
- 派生
- 739
- 平均合并
- 6 天 18 小时
- 30 天内合并 PR
- 1
描述
Description:
As of now, the setup-python action overwrites the PKG_CONFIG_PATH variable during its execution, which can lead to errors if this variable has already been set to a specific value (which is then no longer available). PKG_CONFIG_PATH works as the normal PATH does (from the man page of pkg-config)
PKG_CONFIG_PATH
A colon-separated list of high-priority directories where pc(5) files are looked up.
It would therefore be a good idea to instead extend PKG_CONFIG_PATH by adding the new directory to the existing value if one is present in the environment. This will make both existing and new pc files available (We would not want to overwrite PATH either, would we?)
Justification:
I realized this issue after debugging session of a CI pipeline which had a global
env:
PKG_CONFIG_PATH: '/special/path'
attached to a given workflow. After installing python using setup-python the python dependencies (which included a native library with a pc file) could not be installed any more, since that variable had been overwritten. This is a rather insidious error which is really hard to find.
Are you willing to submit a PR?
Working on a PR.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
该 issue 将 setup-python 对 PKG_CONFIG_PATH 的处理确定为切入点;检查 action 的环境和路径写入代码,以及任何相关测试。在已有 PKG_CONFIG_PATH 的情况下验证行为,并确认之前的目录和生成的目录都仍然可用。相关工作已经由 PR #1242 表示。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- github-actions, typescript
- 领域
- ci-cd, devops
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 20/100