Skip to content

Commit b320c22

Browse files
committed
Try to resolve edx-toggles dependency hell
1 parent ed60bbd commit b320c22

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

Dockerfile

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ RUN apt update && \
1616
WORKDIR /openedx/edx-platform
1717

1818
# Install python with pyenv
19-
ARG PYTHON_VERSION=3.6.1
19+
ARG PYTHON_VERSION=3.5.9
2020
ENV PYENV_ROOT /opt/pyenv
2121
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v1.2.18 --depth 1 \
2222
&& $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION
@@ -25,17 +25,26 @@ RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v1.2.18 --dept
2525
COPY ./requirements/ /openedx/edx-platform/requirements
2626
COPY ./common/lib/ /openedx/edx-platform/common/lib/
2727

28-
ENV PATH /opt/pyenv/versions/3.6.1/bin:${PATH}
28+
ENV PATH /opt/pyenv/versions/3.5.9/bin:${PATH}
29+
30+
# Your existing (very old) pip/setuptools; OK for Py3.5.9
2931
RUN pip install --trusted-host pypi.python.org setuptools==39.0.1 pip==9.0.3
3032

31-
# Install patched version of ora2
32-
RUN pip install --trusted-host pypi.python.org https://github.com/overhangio/edx-ora2/archive/overhangio/boto2to3.zip
33+
RUN pip install --trusted-host pypi.python.org "edx-toggles==1.2.2"
34+
35+
RUN printf "edx-toggles==1.2.2\n" > /tmp/pins.txt
36+
37+
# Install patched version of ora2 (apply pin constraints just in case)
38+
RUN pip install --trusted-host pypi.python.org -c /tmp/pins.txt \
39+
https://github.com/overhangio/edx-ora2/archive/overhangio/boto2to3.zip
3340

34-
# Install ironwood-compatible scorm xblock
35-
RUN pip install --trusted-host pypi.python.org "openedx-scorm-xblock<11.0.0,>=10.0.0"
41+
# Install ironwood-compatible scorm xblock (also with the pin constraints)
42+
RUN pip install --trusted-host pypi.python.org -c /tmp/pins.txt \
43+
"openedx-scorm-xblock<11.0.0,>=10.0.0"
3644

37-
# Install development libraries
38-
RUN pip install --trusted-host pypi.python.org -r requirements/edx/ci-dev.txt
45+
# Install development libraries (ensure they don't yank a newer edx-toggles)
46+
RUN pip install --trusted-host pypi.python.org -c /tmp/pins.txt \
47+
-r /openedx/edx-platform/requirements/edx/ci-dev.txt
3948

4049
# Using local version
4150
COPY ./lms/ /openedx/edx-platform/lms

0 commit comments

Comments
 (0)