Skip to content

Commit 8f6742a

Browse files
committed
Administrivia & make ujson optional
* It's not clear that pyston-2.2 support ujson so make it optional * In github workflows use requirements-dev.txt * revise requirement-dev to remove click (in setup.py) and add ujson * setup.py make ujson optional * version.py: bump to dev
1 parent 4e2d885 commit 8f6742a

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

.github/workflows/osx.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
make
2828
- name: Test Mathics Scanner
2929
run: |
30-
pip install pytest
30+
pip install -r requirement-dev.txt
3131
python -m mathics_scanner.generate.build_tables
3232
make check

.github/workflows/ubuntu.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ jobs:
2626
make
2727
- name: Test Mathics Scanner
2828
run: |
29-
pip install pytest
29+
pip install -r requirement-dev.txt
3030
python -m mathics_scanner.generate.build_tables
3131
make check

.github/workflows/windows.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
python setup.py install
2828
- name: Test Mathics
2929
run: |
30-
pip install pytest
3130
pip install -r requirements-dev.txt
3231
python mathics_scanner/generate/build_tables.py
3332
py.test test

mathics_scanner/characters.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@
77
"""
88

99
import re
10-
import ujson
1110
import os
1211
import pkg_resources
1312

13+
try:
14+
import ujson
15+
except ImportError:
16+
import json as ujson
17+
1418
ROOT_DIR = pkg_resources.resource_filename("mathics_scanner", "")
1519

1620
# Load the conversion tables from disk

mathics_scanner/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# This file is suitable for sourcing inside POSIX shell as
55
# well as importing into Python. That's why there is no
66
# space around "=" below.
7-
__version__="1.2.0" # noqa
7+
__version__="1.2.1.dev0" # noqa

requirements-dev.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
PyYAML
2-
click
31
pytest
2+
# ujson is optional
3+
ujson

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def read(*rnames):
6262
# General Requirements
6363
INSTALL_REQUIRES = [
6464
"chardet", # Used in mathics_scanner.feed
65-
"ujson", # Used in mathics_scanner.characters
65+
# "ujson", # Used in mathics_scanner.characters
6666
"click", # Usin in CLI: mathics-generate-json-table
6767
]
6868

0 commit comments

Comments
 (0)