python - 通过requirements.txt正确安装依赖项或如何正确安装已编辑的依赖项

标签 python git heroku dependencies pip

我正在我的 django 网站上使用此依赖项。

https://bitbucket.org/tim_heap/django-bleach

问题出在 django 1.9 上,有一个修复,并且存储库已 fork 给其他人。

这是存储库

https://bitbucket.org/C14L/django-bleach.git

这就是修复

https://bitbucket.org/C14L/django-bleach/commits/4dd2616f490d5d63bc119b24e07fdf8154f25503

两者都有如何安装的手册

pip install django-bleach

但那是一样的,我最终会遇到同样的错误。我想安装固定版本。我可以在本地主机上手动编辑它 - 这不是正确的软件工程,所以我想知道正确的方法。但这不是问题,问题是如何在heroku上安装它,我不想在heroku上使用CLI编辑依赖关系。

你能帮我从该存储库在heroku和我的本地主机上安装此修复程序的正确方法是什么吗?我需要在 requests.txt 中添加什么内容才能安装正确的修复程序?

https://bitbucket.org/C14L/django-bleach/commits/4dd2616f490d5d63bc119b24e07fdf8154f25503

最佳答案

您可以将存储库 URL 放入 requirements.txt 中,如下所示:

git+https://bitbucket.org/C14L/django-bleach.git

或者更具体并指定分支:

git+https://bitbucket.org/C14L/django-bleach.git@django_1_9_fix

Pip documentation .

关于python - 通过requirements.txt正确安装依赖项或如何正确安装已编辑的依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37903223/

相关文章:

git 子树 : possible to change subtree branch/path in a forked repository?

git - 如何知道远程存储库中的所有项目?

go - 在Heroku上部署之前自动化Go Build命令

django - 0.0.0.0 :5000 上的 Heroku Foreman 错误

node.js - Heroku Node.js 错误 heroku[路由器] : at=error code=H10 desc ="App crashed" method=GET path ="/"

python - 填充3D线图Python上线之间的区域

python - Django:manage.py ImportError 因为环境变量未定义

python - 类型错误 : type() takes 1 or 3 arguments

使用 PIL 保存 CMYK tif 图像时 Python.exe 崩溃

git - CodeBuild+GitHub - 如何在 PULL_REQUEST_MERGED 上构建分支?