Installing "custom" xblock

I’m trying to install a custom xblock from a private repository and am running into issues. I assumed it was something wrong with my repo/xblock so I thought I would try it with an xblock that I know is working. I decided to try installing the polling xblock from Opencraft as if it was a private repo to see what I did wrong.

Here are the steps I took:

  1. From within the ~/.local/share/tutor/env/build/openedx/requirements folder, I ran:
    git clone git@github.com:open-craft/xblock-poll.git

  2. I then ran: echo "-e ./xblock-poll/" >> private.txt

  3. Running tutor images build openedx resulted in the following error:
    Step 23/38 : RUN pip install -r /openedx/requirements/private.txt
    —> Running in 1e67c2ca96c7
    ./xblock-poll/ should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+

The script then stopped.

Can someone point out what I’m doing wrong?

Thanks!

OK, I was able to figure this out on my own. I manually changed the line in private.txt to:

-e /openedx/requirements/xblock-poll/

and everything worked great.

@ToddLichty Thanks for reporting this and investigating the issue! It looks like when we run pip install /openedx/requirements/private.txt from the /openedx/edx-platform folder, the paths listed in private.txt are assumed to be relative to /openedx/edx-platform and not /openedx/requirements/. Thus, this is either a bug in the openedx Dockerfile, or a bug in the documentation. In the next release you will not have to set an absolute path in private.txt: https://github.com/regisb/tutor/commit/f11f47f9f0b70281b3a7069a4384ae3db858ae61