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

时间:2016-06-19 01:45:44

标签: python git heroku dependencies pip

我在我的django网站上使用这种依赖。

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

问题在于django 1.9有一个修复,并且存储库被分叉给其他人。

这是存储库

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

这是修复

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

两者都有手册如何安装

pip install django-bleach

但是我会以同样的错误结束。我想安装固定版本。我可以在我的localhost上手动编辑它 - 这不是合适的软件工程,所以我想知道正确的方法。但这不是问题,问题是如何在heroku上安装它,我不想在heroku上用CLI编辑依赖项。

你能帮我解决一下在heroku和我的localhost上从该存储库安装此修复程序的正确方法吗?我需要在requirements.txt中添加它会安装正确的修复程序吗?

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

1 个答案:

答案 0 :(得分:2)

您可以将存储库网址放在requirements.txt中,如下所示:

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

或更具体,并指定分支:

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

Pip documentation

相关问题