我需要安装一个支持poetry add --group
的诗歌版本(当前版本1.2.0a2(,但我需要在诗歌核心中进行此更改,但我似乎无法更改诗歌使用的诗歌核心,即使我在特定提交上执行诗歌核心的pip安装,可能是因为这是一个PEP517构建后端模块。我需要能够重现这个";诗歌混合构建;在docker容器中,这样我就可以构建我的项目,所以我正试图找到一种很好的方法来完成它。
我试过了,但诗歌的核心修复并没有达到预期的效果。
pip install git+https://github.com/python-poetry/poetry-core.git@af08f1ce720da467c9bf3d43eed3d9ebaf4ad7fb
curl -sSL https://install.python-poetry.org | python3 - --preview
有人知道这样做的方法吗?
如果其他人需要这样做,我有这个可行的解决方案,但它很糟糕!我只能祈祷诗歌团队尽快发布我需要的诗歌核心补丁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 ;fi