我需要安装一个具有poetry add --group支持的诗歌版本(目前版本为1.2.0a2),但我需要它在诗歌核心中进行这更改,但我似乎无法更改诗歌所使用的诗歌核心,即使我在特定的提交中执行了诗歌核心的pip安装,这可能是因为这是一个PEP517构建后端模块。我需要能够在一个码头容器中重新创建这个“诗歌混合构建”,这样我就可以构建我的项目,所以我试图找到一种很好的方法来完成它。
我试过了,但诗歌核心的修复并不像预期的那样。
pip install git+https://github.com/python-poetry/poetry-core.git@af08f1ce720da467c9bf3d43eed3d9ebaf4ad7fb
curl -sSL https://install.python-poetry.org | python3 - --preview有人知道怎么做吗?
发布于 2022-01-25 15:07:02
如果其他人需要这样做,我有这个解决方案,但这是很麻烦的!我只能祈祷诗歌团队很快就会发布1.2.0版本的诗歌核心补丁!
# TODO: Remove this block when poetry 1.2.0 official is released
# Copy the fixed poetry-core code over the top of poetry's version
# The destination folder is something like
# ~/.poetry/venv/lib/python3.8/site-packages/poetry/core/
pip install --no-deps -t /tmp/poetry-core git+https://github.com/python-poetry/poetry-core.git@af08f1ce720da467c9bf3d43eed3d9ebaf4ad7fb
# TODO: move to the proper 1.2.0 official version when it is released.
curl -sSL https://install.python-poetry.org | POETRY_HOME=~/.poetry python3 - --version '1.2.0a2'
cp -aPrf /tmp/poetry-core/poetry/core/ $$(dirname $$(find ~/.poetry -name helpers.py | grep semver))/../.. ~/.poetry/bin/poetry --version
# Add a symlink to poetry. This assumes ~/.local/bin is already in your path.
if [ -d ~/.local/bin/ ] && [ ! -f ~/.local/bin/poetry ]; then ln -s ~/.poetry/bin/poetry ~/.local/bin/poetry ;fihttps://stackoverflow.com/questions/70805613
复制相似问题