forked from overhangio/tutor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use entrypoint to automatically pip-install mounted edx-platform
TODO details Closes openedx-unsupported/wg-developer-experience#152
- Loading branch information
1 parent
b903c69
commit 7f4524b
Showing
4 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- | ||
Create a changelog entry for every new user-facing change. Please respect the following instructions: | ||
- Indicate breaking changes by prepending an explosion 💥 character. | ||
- Prefix your changes with either [Bugfix], [Improvement], [Feature], [Security], [Deprecation]. | ||
- You may optionally append "(by @<author>)" at the end of the line, where "<author>" is either one (just one) | ||
of your GitHub username, real name or affiliated organization. These affiliations will be displayed in | ||
the release notes for every release. | ||
--> | ||
|
||
<!-- - 💥[Feature] Foobarize the blorginator. This breaks plugins by renaming the `FOO_DO` filter to `BAR_DO`. (by @regisb) --> | ||
<!-- - [Improvement] This is a non-breaking change. Life is good. (by @billgates) --> | ||
|
||
- [Improvement] It is no longer necessary to pip-install any requirements after bind-mounting a local copy of edx-platform (by @kdmccormick). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
# Entrypoint script for the openedx image. | ||
# When a command is run from the openedx image, e.g.: | ||
# tutor local run lms ./manage.py lms migrate | ||
# It actually goes through this script: | ||
# set-up-and-run ./manage.py lms migrate | ||
|
||
# When a local copy of edx-platform is bind-mounted, its | ||
# egg-info directory may be missing or out of date. (The | ||
# egg-info contains compiled Python entrypoint metadata, which | ||
# is used by XBlock, Django App Plugins, and console scripts.) | ||
# So, we regenerate egg-info by pip-installing this directory. | ||
# To avoid running pip-install from *every* new lms and cms | ||
# container, we only run it if the entrypoint metadata is missing | ||
# or outdated. | ||
ENTRY_POINTS_INFO=Open_edX.egg-info/entry_points.txt | ||
if [ ! -f "$ENTRY_POINTS_INFO" ] || [ "$ENTRY_POINTS_INFO" -ot setup.py ]; then | ||
pip install -e . | ||
fi | ||
|
||
# Run all arguments as a command. | ||
"$@" |