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.
- Loading branch information
1 parent
bbab35e
commit 683f43c
Showing
5 changed files
with
76 additions
and
9 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
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,36 @@ | ||
#!/bin/sh | ||
# TODO: Document this | ||
|
||
set -eu | ||
|
||
script="$(basename "$0")" | ||
|
||
if [ $# != 1 ] ; then | ||
echo "$script: error: expected exactly one argument: a directory." | ||
exit 1 | ||
fi | ||
|
||
dir="$1" | ||
|
||
if [ ! -d "$dir" ] ; then | ||
echo "$script: error: not a directory: $dir" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$(ls -A "$dir")" ] ; then | ||
echo "$script: $dir is empty; nothing to do" | ||
exit 0 | ||
fi | ||
|
||
for dir_item in "$dir"/* ; do | ||
if [ ! -d "$dir_item" ] ; then | ||
# skip regular files | ||
continue | ||
fi | ||
# TODO: Is it right to always do editable (-e) install? | ||
# Should we make it configurable? | ||
set -x | ||
pip install -e "$dir_item" | ||
set +x | ||
done | ||
|
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,17 @@ | ||
requirements-dev | ||
################ | ||
|
||
If you want to install a local Python package into the openedx-dev image, then: | ||
|
||
1. Move it into this directory. | ||
2. Reboot your development platform (``tutor dev reboot``). This will trigger the openedx-dev image to be rebuilt and containers to be recreated. | ||
|
||
Going forward, changes to the local package's code should be automatically manifested. | ||
|
||
To remove the local package, simply: | ||
|
||
1. Move it out of this directory. | ||
2. Reboot your development platform (``tutor dev reboot``). | ||
|
||
Please note: This strategy will only affect the image for the Open edX development (``tutor dev``) environment. To install a package into all environments (``tutor dev``, ``tutor local``, ``tutor k8s``), use the `../requirements`_ directory instead. | ||
|
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,16 @@ | ||
requirements | ||
############ | ||
|
||
If you want to install a local Python package into the openedx image, then: | ||
|
||
1. Move it into this directory. | ||
2. Reboot your platform (``tutor local/k8s/dev reboot``). This will trigger the openedx image to be rebuilt and containers to be recreated. | ||
|
||
Going forward, changes to the local package's code should be automatically manifested. | ||
|
||
To remove the local package, simply: | ||
|
||
1. Move it out of this directory. | ||
2. Reboot your platform (``tutor local/k8s/dev reboot``). | ||
|
||
Tip: If you are only testing out a local package with your development environment (``tutor dev``), then you can save image build time by using `../requirements-dev`_ instead. |
6 changes: 0 additions & 6 deletions
6
tutor/templates/build/openedx/requirements/private-sample.txt
This file was deleted.
Oops, something went wrong.