Use recent setuptools#6
Conversation
|
|
||
| RUN wget http://arshaw.com/scrapemark/downloads/scrapemark-0.9-py2.7.egg; easy_install scrapemark-0.9-py2.7.egg | ||
|
|
||
| RUN pip install distribute |
There was a problem hiding this comment.
Ok so tl;dr - I think we should bump python-stdnum to 1.0 to pick up arthurdejong/python-stdnum@c3d669c to make distribute not be required.
Long version: I watched the build output and noticed this line:
Collecting distribute (from python-stdnum==0.7->-r /etc/requirements.txt (line 40))
So that made me realise distribute was getting pulled in because of python-stdnum. So I looked in requirements.txt to see what was going on, and noticed it says this:
# The following packages are considered to be unsafe in a requirements file:
# distribute # via python-stdnum
[...]
So that made me guess that given it's "unsafe" there's probably a later version of python-stdnum which removes the dependency, which led me to the above commit.
Changed to 1.0 in requirements.in, ran pip-compile --output-file requirements.txt requirements.in - the distribute line did indeed disappear. Rebuilt docker image - it worked.
The only remaining question is whether it's ok to bump to 1.0. Given what the library does ("parse, validate and reformat standard numbers and codes in different formats") and the fact this is very, very peripheral to OpenCorporates, I think it's fine.
I will update the branch 👍
…get` The version we get from `apt-get` is very old. The pip installation will install a newer version if there is none already present. So all we need to do is remove it from the `apt-get` line.
... to remove the `distribute` dependency, which (according to pip) is "unsafe" and was causing us issues when running `pip install` (probably why it's unsafe).
562601e to
a21c66f
Compare
|
👍 |
The
python-setuptoolspackage installed a very old version ofsetuptools. Instead we can use the version that gets installed withpip. This requires re-ordering some of the Dockerfile steps and installingdistributeexplicitly.