Skip to content

Use recent setuptools#6

Merged
bensymonds merged 2 commits into
masterfrom
fix-build
Dec 19, 2017
Merged

Use recent setuptools#6
bensymonds merged 2 commits into
masterfrom
fix-build

Conversation

@thomasmarshall

Copy link
Copy Markdown

The python-setuptools package installed a very old version of setuptools. Instead we can use the version that gets installed with pip. This requires re-ordering some of the Dockerfile steps and installing distribute explicitly.

Comment thread Dockerfile Outdated

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).
@thomasmarshall

Copy link
Copy Markdown
Author

👍

@bensymonds bensymonds merged commit 32c422b into master Dec 19, 2017
@bensymonds bensymonds deleted the fix-build branch December 19, 2017 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants