diff --git a/mathics_django/web/models.py b/mathics_django/web/models.py index c0333a6ac..d328ecd45 100644 --- a/mathics_django/web/models.py +++ b/mathics_django/web/models.py @@ -7,9 +7,9 @@ from django.db.models.signals import pre_delete from mathics.core.definitions import Definitions from mathics.core.evaluation import Evaluation, Output +from mathics.core.expression import(Expression, Symbol, SymbolTrue, String) from mathics.core.load_builtin import import_and_load_builtins from mathics.session import autoload_files - from mathics_django.settings import ROOT_DIR from mathics_django.web.format import format_output @@ -33,10 +33,8 @@ def get_session_evaluation(session): # Previously, one specific format, like "xml" had to fit all. evaluation = Evaluation(definitions, format="unformatted", output=WebOutput()) _evaluations[session.session_key] = evaluation - evaluation.format_output = lambda expr, format: format_output( - evaluation, expr, format - ) - autoload_files(definitions, ROOT_DIR, "autoload") + evaluation.format_output = lambda expr, format: format_output(evaluation, expr, format) + Expression('LoadModule', String("pymathics.asy")).evaluate(evaluation) return evaluation diff --git a/setup.py b/setup.py index dbda009cc..2d3d42732 100644 --- a/setup.py +++ b/setup.py @@ -57,8 +57,8 @@ def read(*rnames): sys, "pypy_version_info" ) -DEPENDENCY_LINKS = [] INSTALL_REQUIRES = [] +DEPENDENCY_LINKS = ["http://github.com/Mathics3/pymathics-asy#egg=pymathics-asy"] if sys.platform == "darwin": INSTALL_REQUIRES += ["scikit-image"] @@ -73,6 +73,7 @@ def read(*rnames): "networkx >= 3.0", "pygments", # For colorized Python tracebacks "requests", + "pymathics-asy", ]