Skip to content
Snippets Groups Projects
Commit 9620447a authored by Régis Behmo's avatar Régis Behmo
Browse files

Add the lts plugin to the tutor binary

parent 41c9bfc3
Branches
No related tags found
No related merge requests found
...@@ -72,16 +72,16 @@ ci-install-python-requirements: ## Install requirements ...@@ -72,16 +72,16 @@ ci-install-python-requirements: ## Install requirements
ci-install-plugins: ci-install-python-requirements ## Install alll supported plugins ci-install-plugins: ci-install-python-requirements ## Install alll supported plugins
pip3 install -r requirements/plugins.txt pip3 install -r requirements/plugins.txt
ci-bundle: ## Create bundle and run basic tests ci-bundle: bundle ## Create bundle and run basic tests
$(MAKE) bundle
mkdir -p releases/
./dist/tutor --version ./dist/tutor --version
./dist/tutor config printroot ./dist/tutor config printroot
yes "" | ./dist/tutor config save --interactive yes "" | ./dist/tutor config save --interactive
./dist/tutor config save ./dist/tutor config save
./dist/tutor plugins enable discovery ecommerce minio notes xqueue ./dist/tutor plugins enable discovery ecommerce figures lts minio notes xqueue
./dist/tutor lts --help
./releases/github-release: ## Download github-release binary ./releases/github-release: ## Download github-release binary
mkdir -p releases/
cd releases/ \ cd releases/ \
&& curl -sSL -o ./github-release.tar.bz2 "https://github.com/aktau/github-release/releases/download/v0.7.2/$(shell uname -s | tr "[:upper:]" "[:lower:]")-amd64-github-release.tar.bz2" \ && curl -sSL -o ./github-release.tar.bz2 "https://github.com/aktau/github-release/releases/download/v0.7.2/$(shell uname -s | tr "[:upper:]" "[:lower:]")-amd64-github-release.tar.bz2" \
&& bzip2 -d -f ./github-release.tar.bz2 \ && bzip2 -d -f ./github-release.tar.bz2 \
......
#!/usr/bin/env python3 #!/usr/bin/env python3
import importlib import importlib
from tutor.commands.cli import main
from tutor.plugins import Plugins from tutor.plugins import Plugins
# Manually install plugins (this is for creating the bundle) # Manually install plugins (this is for creating the bundle)
for plugin in ["discovery", "ecommerce", "figures", "minio", "notes", "xqueue"]: for plugin in ["discovery", "ecommerce", "figures", "lts", "minio", "notes", "xqueue"]:
try: try:
module = importlib.import_module("tutor{}.plugin".format(plugin)) module = importlib.import_module("tutor{}.plugin".format(plugin))
except ImportError: except ImportError:
...@@ -13,4 +12,5 @@ for plugin in ["discovery", "ecommerce", "figures", "minio", "notes", "xqueue"]: ...@@ -13,4 +12,5 @@ for plugin in ["discovery", "ecommerce", "figures", "minio", "notes", "xqueue"]:
else: else:
Plugins.EXTRA_INSTALLED[plugin] = module Plugins.EXTRA_INSTALLED[plugin] = module
from tutor.commands.cli import main
main() main()
...@@ -52,4 +52,6 @@ This work is licensed under the terms of the `GNU Affero General Public License ...@@ -52,4 +52,6 @@ This work is licensed under the terms of the `GNU Affero General Public License
The AGPL license covers the Tutor code, including the Dockerfiles, but not the content of the Docker images which can be downloaded from https://hub.docker.com. Software other than Tutor provided with the docker images retain their original license. The AGPL license covers the Tutor code, including the Dockerfiles, but not the content of the Docker images which can be downloaded from https://hub.docker.com. Software other than Tutor provided with the docker images retain their original license.
The Tutor plugin system is licensed under the terms of the `Apache License, Version 2.0 <https://opensource.org/licenses/Apache-2.0>`__.
The :ref:`Tutor Web UI <webui>` depends on the `Gotty <https://github.com/yudai/gotty/>`_ binary, which is provided under the terms of the `MIT license <https://github.com/yudai/gotty/blob/master/LICENSE>`_. The :ref:`Tutor Web UI <webui>` depends on the `Gotty <https://github.com/yudai/gotty/>`_ binary, which is provided under the terms of the `MIT license <https://github.com/yudai/gotty/blob/master/LICENSE>`_.
tutor-discovery tutor-discovery
tutor-ecommerce tutor-ecommerce
tutor-figures tutor-figures
tutor-lts
tutor-minio tutor-minio
tutor-notes tutor-notes
tutor-xqueue tutor-xqueue
\ No newline at end of file
...@@ -19,6 +19,16 @@ for entrypoint in pkg_resources.iter_entry_points("tutor.plugin.v0"): ...@@ -19,6 +19,16 @@ for entrypoint in pkg_resources.iter_entry_points("tutor.plugin.v0"):
path = os.path.join(plugin_root, folder) path = os.path.join(plugin_root, folder)
if os.path.exists(path): if os.path.exists(path):
datas.append((path, os.path.join(plugin_root_module_name, folder))) datas.append((path, os.path.join(plugin_root_module_name, folder)))
# Fix lts import: if we don't declare some modules, pyinstaller does not find them
hidden_imports.append("tutorlts.__about__")
hidden_imports.append("Crypto.Cipher.AES")
hidden_imports.append("Crypto.Cipher.PKCS1_OAEP")
hidden_imports.append("Crypto.Hash")
hidden_imports.append("Crypto.PublicKey.RSA")
hidden_imports.append("Crypto.Random")
hidden_imports.append("Crypto.Signature.PKCS1_v1_5")
hidden_imports.append("uuid")
# The following was initially generated with: # The following was initially generated with:
# pyinstaller --onefile --name=tutor --add-data=./tutor/templates:./tutor/templates ./bin/main.py # pyinstaller --onefile --name=tutor --add-data=./tutor/templates:./tutor/templates ./bin/main.py
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment