Reproduction

(If this post doesn’t make sense to you, you haven’t been following the discussion on IRC that this relates to – feel free to ignore and go about your day)

Setup

  • virtualenv repro
  • cd repro
  • source bin/activate
  • wget https://jamezpolley.com/wp-content/uploads/2015/04/repro.tar.gz
  • tar -zxvf repro.tar.gz
  • pip install -f index/ bar==2.0

Installing foo directly

Expected behaviour
Foo and its dependency, bar==2.1, get installed
Observed behaviour
As expected

⌂64% [:~/src/tmp/repro] [repro] master* ± pip install -f index/ foo
Collecting foo
Collecting bar>=2.1 (from foo)
Installing collected packages: bar, foo
Found existing installation: bar 2.0
Uninstalling bar-2.0:
Successfully uninstalled bar-2.0
Running setup.py install for bar
Running setup.py install for foo
Successfully installed bar-2.1 foo-0.3
[:~/src/tmp/repro] [repro] master* ±

Cleanup

  • pip uninstall foo
  • pip install -f index/ bar==2.0

Installing requirements

Expected behaviour
Foo and its dependency, bar==2.1, get installed
Observed behaviour
bar==2.0 is left installed

⌂69% [:~/src/tmp/repro] [repro] master* ± pip freeze
bar==2.0
⌂68% [:~/src/tmp/repro] [repro] master* ± pip install -f index/ -r requirements.txt
Collecting foo (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): bar>=2.0 in ./lib/python2.7/site-packages (from -r requirements.txt (line 2))
Installing collected packages: foo
Running setup.py install for foo
Successfully installed foo-0.3
⌂66% [:~/src/tmp/repro] [repro] master* ±

Leave a Reply