Commit 51277a34 by Tim Krones

Fix dependency installation for CircleCI builds.

XBlock is listed as a dependency in requirements files for xblock-sdk,
xblock-utils, and problem-builder itself. These files list different (but compatible)
versions of the XBlock repo. Because of that, XBlock gets installed multiple times
when installing dependencies for CircleCI builds.

Starting with setuptools 25.0.0, the behavior for installing packages on top of
existing installs changed; see https://github.com/pypa/setuptools/issues/729
for an example issue that this change in behavior caused.

For problem-builder CI builds, the issue was that after installing all dependencies,
the egg link for XBlock ended up pointing to the installation of problem-builder itself,
creating a situation where the code that ships with XBlock was not accessible from modules
that depend on it. This caused imports for any classes defined in the XBlock repo to fail,
and CircleCI builds errored out.

To fix this, we temporarily pin setuptools to the most recent version
that does not exhibit this behavior (24.3.1).

An upstream fix seems to be underway (via https://github.com/pypa/pip/pull/3904),
but it hasn't been merged/released yet.
parent 82bd45d0
...@@ -3,7 +3,8 @@ machine: ...@@ -3,7 +3,8 @@ machine:
version: 2.7.10 version: 2.7.10
dependencies: dependencies:
override: override:
- "pip install -U pip wheel setuptools" - "pip install -U pip wheel"
- "pip install setuptools==24.3.1"
- "pip install -e git://github.com/edx/xblock-sdk.git@bddf9f4a2c6e4df28a411c8f632cc2250170ae9d#egg=xblock-sdk" - "pip install -e git://github.com/edx/xblock-sdk.git@bddf9f4a2c6e4df28a411c8f632cc2250170ae9d#egg=xblock-sdk"
- "pip install -r requirements.txt" - "pip install -r requirements.txt"
- "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment