我正在尝试让Heroku参加一个具有pip要求的editable dependency (即-e git://github.com/merlinares/django-registration.git#egg=django-registration)。
然而,尽管它看起来在部署时采用了这个分支,但它实际上并没有使用它。我已经用heroku run cat .heroku/python/lib/python2.7/site-packages/registration/forms.py检查了站点包中的代码,它没有包含新的代码,而只是使用了之前安装的默认django注册包。
但是,派生版本似乎存在于django-registration.egg-link指定的目录中,该目录名为:
/app/.heroku/src/django-registration
在deploy (即git push heroku master)上,我看到:
-----> Installing dependencies using Pip (1.3.1)
Obtaining django-registration from git+git://github.com/mattlinares/django-registration.git#egg=django-registration (from -r requirements.txt (line 12))
Updating ./.heroku/src/django-registration clone
Running setup.py egg_info for package django-registration
Installing collected packages: django-registration
Running setup.py develop for django-registration
Creating /app/.heroku/python/lib/python2.7/site-packages/django-registration.egg-link (link to .)
django-registration 0.8-alpha-1 is already the active version in easy-install.pth
Installed /app/.heroku/src/django-registration
Successfully installed django-insensitive django-registration
Cleaning up...我还手动尝试卸载并安装了那个特定的fork,效果如下:
(ssc)~/code/django/ssc: heroku run pip install --upgrade git+git://github.com/mattlinares/django-registration.git
Running `pip install --upgrade git+git://github.com/mattlinares/django-registration.git` attached to terminal... up, run.5704
Downloading/unpacking git+git://github.com/mattlinares/django-registration.git
Cloning git://github.com/mattlinares/django-registration.git to /tmp/pip-qpTF2t-build
Running setup.py egg_info for package from git+git://github.com/mattlinares/django-registration.git
Installing collected packages: django-registration
Found existing installation: django-registration 0.8-alpha-1
Uninstalling django-registration:
Successfully uninstalled django-registration
Running setup.py install for django-registration
Successfully installed django-registration
Cleaning up...然而,我的应用程序并没有使用我试图提供给它的registration版本。我怀疑和heroku run ls .heroku/python/lib/python2.7/site-packages一起列出的鸡蛋
django_registration-0.8-py2.7.egg-info registrationdjango-registration.egg-link
我还尝试按照how to pip uninstall with virtualenv on heroku cedar stack?清除整个虚拟环境,但没有成功
我能做什么?
发布于 2020-08-02 15:06:34
当使用可编辑的依赖项时,您必须定义一个标记或提交散列。
按照您的示例进行操作:
-e git+https://github.com/merlinares/django-registration.git@3.1#egg=django-registration或
-e git+https://github.com/merlinares/django-registration.git@40fee813ca444236da6d66f516b869fd8ebbe9cd#egg=django-registrationhttps://stackoverflow.com/questions/17255953
复制相似问题