Feature: Add guide to install system dependencies with pixi

未關閉
#1,669 4 則留言 6 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
半天
新手友好度
45/100
Issue 類型
文件
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
python
領域
documentation

研究方向

先從 devguide 中現有的系統層級相依性安裝指南開始,並將其與提議的 pixi.toml 工作流程進行比較。新增一個簡潔的基於 pixi 的選項或連結,涵蓋 issue 中所示的相依性與環境設定,然後確認開發環境設定說明完整且易於理解。

由索引模型根據 Issue 內容生成。

描述

topic-building python type-feature
Describe the enhancement or feature you would like

I've stopped using brew on my macOS and I'm instead using pixi whenever I need system-level dependencies. This works very well in practice even for building CPython and I can do things like pixi run configure and it automatically sets up all of the system dependencies and runs configure. Doing that requires setting some environment variables here and there, but I've done that in a pixi.toml and it's all automated. It looks somewhat like this:

[project]
name = "cpython-dev"
channels = ["conda-forge"]
platforms = ["osx-arm64"]

[dependencies]
gdbm = "*"
libmpdec-devel = "*"
openssl = "3.*"
pkg-config = "*"
tk = "*"
xz = "*"
zstd = "*"
zlib = "*"

[tasks.configure]
cmd = "./configure --with-openssl=$CONDA_PREFIX"

[tasks.configure.env]
PKG_CONFIG_PATH = "$CONDA_PREFIX/lib/pkgconfig"
GDBM_CFLAGS = "-I$CONDA_PREFIX/include"
GDBM_LIBS = "-L$CONDA_PREFIX/lib -lgdbm"
TCLTK_CFLAGS = "$(pkg-config --cflags tcl tk)"
# tcl.pc and tk.pc files contain stub libraries, but those do not extist
# in the conda package
TCLTK_LIBS = "$(pkg-config --libs tcl tk | sed 's/-l[^ ]*stub[^ ]*//g')"
LDFLAGS = "-Wl,-rpath,$CONDA_PREFIX/lib"

It's a bit too much to propose adding this to the CPython repo, at least for now. However, pointing to this as a way to install system-level dependencies in the devguide doesn't sounds like a bad idea to me.

Thoughts? Is there an appetite for this? If so, I can start drafting a PR.

Describe alternatives you have considered

No response

Additional context

No response

主要語言
Python
星號
2.1k
分支
1k
平均合併
2 天 12 小時
30 天內合併 PR
12

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

python/devguide 的其他 Issue

查看 python/devguide 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。