4

I am trying to have Heroku take an editable dependency (i.e. -e git://github.com/merlinares/django-registration.git#egg=django-registration) with pip requirements.

However, even though it appears to be taking that fork on deploy, it is not actually using it. I have checked the code in site-packages with heroku run cat .heroku/python/lib/python2.7/site-packages/registration/forms.py and it doesn't include the new code, but just uses the default django-registration package which was previously installed.

However, the forked version seems to exist in the directory specified by django-registration.egg-link, a directory named:

/app/.heroku/src/django-registration

On deploy (i.e. git push heroku master) I see:

-----> 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...

I've also manually tried to uninstall and install that particular fork, with this effect:

(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...

Yet my app is not using the version of registration I am trying to feed it. I'm suspecting the eggs which are listed with heroku run ls .heroku/python/lib/python2.7/site-packages:

django_registration-0.8-py2.7.egg-info        registration

django-registration.egg-link

I've also tried to purge the whole virtualenv as per how to pip uninstall with virtualenv on heroku cedar stack? with no luck

What can I do?

Community
  • 1
  • 1
KindOfGuy
  • 3,081
  • 5
  • 31
  • 47
  • any luck with this? i have the same issue with another dependency. – andy Sep 26 '13 at 14:05
  • No luck. I think I scrapped the plan and overrode the form I was trying to edit from within my app, which is preferable. But there is, of course, still a Heroku problem here. One should be able to use a different fork. Have you tried renaming your fork e.g. in this case that would be django-registration-myfork? – KindOfGuy Sep 26 '13 at 17:53
  • actually my issue is with a dependency that I control. Heroku app A depends on django app B, both of which are my code. But django app B is on bitbucket so that I can build it *easily* with heroku. i have been creating tags for app B versions (v0.1.x) and bumping those with each new commit that i want to include in Heroku app A. I update Heroku app A's requirements.txt to include the new tag reference. It's kind of a pain. – andy Sep 26 '13 at 18:53
  • Can you post your pip freeze output for the venv deploying to heroku? – Roman Alexander Sep 30 '13 at 04:23

1 Answers1

0

When using editable dependencies you have to define a tag or commit-hash.

Following your example:

-e git+https://github.com/merlinares/django-registration.git@3.1#egg=django-registration

or

-e git+https://github.com/merlinares/django-registration.git@40fee813ca444236da6d66f516b869fd8ebbe9cd#egg=django-registration
Denis Cornehl
  • 4,104
  • 1
  • 20
  • 24