代码之家  ›  专栏  ›  技术社区  ›  arshbot

如何使用pipenv安装特定的git分支

  •  3
  • arshbot  · 技术社区  · 6 年前

    如何使用pipenv安装特定的git分支?我知道这个命令会安装bitcoinlib主分支

    pipenv install -e git+https://github.com/1200wd/bitcoinlib.git#egg=bitcoinlib
    

    但是我如何安装一个不是主的分支呢?

    2 回复  |  直到 6 年前
        1
  •  27
  •   arshbot    6 年前

    如果同时使用master或其他分支,则只需使用@符号来指定分支,并将egg名称更改为稍有不同的名称。遵循以下语法

    pipenv install -e git+<your/target/git/repository/url.git>@branch#egg=package_name
    

    所以在我的例子中,我需要使用segwit支持分支

    pipenv install -e git+https://github.com/1200wd/bitcoinlib.git@segwit-support#egg=bitcoinlib_segwitsupport
    

    bitcoinlib_segwit-support = {editable = true, ref = "segwit-support", git = "https://github.com/1200wd/bitcoinlib.git"}
    
        2
  •  0
  •   dhae    6 年前

    我觉得这个 Post