首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用特定的诗歌核心提交安装最新的python诗歌。

使用特定的诗歌核心提交安装最新的python诗歌。
EN

Stack Overflow用户
提问于 2022-01-21 17:53:34
回答 1查看 723关注 0票数 0

我需要安装一个具有poetry add --group支持的诗歌版本(目前版本为1.2.0a2),但我需要它在诗歌核心中进行更改,但我似乎无法更改诗歌所使用的诗歌核心,即使我在特定的提交中执行了诗歌核心的pip安装,这可能是因为这是一个PEP517构建后端模块。我需要能够在一个码头容器中重新创建这个“诗歌混合构建”,这样我就可以构建我的项目,所以我试图找到一种很好的方法来完成它。

我试过了,但诗歌核心的修复并不像预期的那样。

代码语言:javascript
复制
    pip install git+https://github.com/python-poetry/poetry-core.git@af08f1ce720da467c9bf3d43eed3d9ebaf4ad7fb
    curl -sSL https://install.python-poetry.org | python3 - --preview

有人知道怎么做吗?

EN

回答 1

Stack Overflow用户

发布于 2022-01-25 15:07:02

如果其他人需要这样做,我有这个解决方案,但这是很麻烦的!我只能祈祷诗歌团队很快就会发布1.2.0版本的诗歌核心补丁!

代码语言:javascript
复制
# 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
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70805613

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档