配置,以便pip安装可以从github工作 [英] Configuring so that pip install can work from github
问题描述
我们希望使用pip和github将私人包安装到我们的生产服务器上。这个问题涉及为了安装成功需要在github仓库中需要什么。
假设以下命令行(认证正确并尝试安装) :
pip install git + ssh://git@github.com/BlahCo/search/tree/prod_release_branch/ProductName
需要驻留在ProductName中的什么?是否通过sdist选项运行setup.py后,通常在tar文件中的内容,还是实际的tar.gz文件或其他内容?
我在这里问,因为我已经尝试了几种变化,无法使它工作。任何帮助表示赞赏。
您需要整个python包, 一个名为 并从github安装: 更多info at https://pip.pypa.io/en/stable / reference / pip_install /#vcs-support We'd like to use pip with github to install private packages to our production servers. This question concerns what needs to be in the github repo in order for the install to be successful. Assuming the following command line (which authenticates just fine and tries to install): What needs to reside in the ProductName? Is it the contents of what would normally be in the tar file after running setup.py with the sdist option, or is the actual tar.gz file, or something else? I'm asking here because I've tried several variations and can't make it work. Any help appreciated. You need the whole python package, with a A package named And install from github like: More info at https://pip.pypa.io/en/stable/reference/pip_install/#vcs-support 这篇关于配置,以便pip安装可以从github工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! setup.py $
foo
的包将是:
foo#可安装的软件包
├──foo
│├──__init__.py
│└──bar .py
└──setup.py
$ pip install git + https://github.com/myuser/foo.git@v123
或
$ pip install git + https://github.com/myuser/foo.git@newbranch
pip install git+ssh://git@github.com/BlahCo/search/tree/prod_release_branch/ProductName
setup.py
file in it.foo
would be:foo # the installable package
├── foo
│ ├── __init__.py
│ └── bar.py
└── setup.py
$ pip install git+https://github.com/myuser/foo.git@v123
or
$ pip install git+https://github.com/myuser/foo.git@newbranch