diff --git a/mathics_pygments/builtins.py b/mathics_pygments/builtins.py index 09af80b..099b847 100644 --- a/mathics_pygments/builtins.py +++ b/mathics_pygments/builtins.py @@ -4,7 +4,10 @@ # Licensed under the MIT License (https://opensource.org/licenses/MIT) import os.path as osp -import ujson +try: + import ujson +except ImportError: + import json as ujson def get_datadir(): datadir = osp.normcase(osp.join(osp.dirname(osp.abspath(__file__)), "data")) diff --git a/requirements-dev.txt b/requirements-dev.txt index e079f8a..77b540c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1 +1,3 @@ +# ujson is really just optional +ujson pytest diff --git a/setup.py b/setup.py index 3ed2239..afff34c 100644 --- a/setup.py +++ b/setup.py @@ -83,7 +83,7 @@ def read(*rnames): "data/mma-tables.json", ], }, - install_requires=["Pygments >= 2", "Mathics_Scanner>=1.2.0", "ujson"], + install_requires=["Pygments >= 2", "Mathics_Scanner>=1.2.0"], include_package_data=False, platforms=["any"], entry_points={