Skip to content

Commit c03a81c

Browse files
authored
Merge pull request #17 from Mathics3/mathics-scanner-import-dup
Scanner import fixes (dup)
2 parents 4232efd + 9b68862 commit c03a81c

File tree

6 files changed

+21
-768
lines changed

6 files changed

+21
-768
lines changed

.github/workflows/osx.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Mathics (OSX)
1+
name: mathicsscript (OSX)
22

33
on:
44
push:
@@ -8,11 +8,11 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: osx-latest
11+
runs-on: macos-latest
1212
strategy:
1313
matrix:
1414
os: [macOS]
15-
python-version: [3.6, 3.7, 3.8]
15+
python-version: [3.6, 3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Set up Python ${{ matrix.python-version }}
@@ -21,11 +21,15 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Install dependencies
2323
run: |
24+
brew install llvm@9
2425
python -m pip install --upgrade pip
25-
- name: Install Mathics Scanner
26+
LLVM_CONFIG=/usr/local/Cellar/llvm@9/9.0.1_2/bin/llvm-config pip install llvmlite
27+
python -m pip install -e git://github.com/Mathics3/mathics-scanner.git#egg=Mathics_Scanner
28+
python -m pip install -e git://github.com/mathics/Mathics.git#egg=Mathics3
29+
- name: Install mathicsscript
2630
run: |
2731
make
28-
- name: Test Mathics Scanner
32+
- name: Test mathicsscript
2933
run: |
3034
pip install pytest
3135
make check

.github/workflows/ubuntu.yaml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/ubuntu.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1212
strategy:
1313
matrix:
14-
python-version: [3.6, 3.7, 3.8]
14+
python-version: [3.6, 3.7, 3.8, 3.9]
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Set up Python ${{ matrix.python-version }}
@@ -22,6 +22,7 @@ jobs:
2222
run: |
2323
sudo apt-get update -qq && sudo apt-get install -qq liblapack-dev llvm-dev
2424
python -m pip install --upgrade pip
25+
python -m pip install -e git://github.com/Mathics3/mathics-scanner.git#egg=Mathics_Scanner
2526
python -m pip install -e git://github.com/mathics/Mathics#egg=Mathics3
2627
- name: Install mathicsscript
2728
run: |

mathicsscript/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from mathicsscript.format import format_output
1414

15-
from mathics import replace_wl_with_unicode
15+
from mathics_scanner import replace_wl_with_plain_text
1616
from mathics.core.parser import FileLineFeeder
1717
from mathics.core.definitions import Definitions
1818
from mathics.core.expression import Symbol, SymbolTrue, SymbolFalse
@@ -327,7 +327,9 @@ def main(
327327
current_pos = GNU_readline.get_current_history_length()
328328
for pos in range(last_pos, current_pos - 1):
329329
GNU_readline.remove_history_item(pos)
330-
wl_input = replace_wl_with_unicode(source_code.rstrip())
330+
wl_input = source_code.rstrip()
331+
if unicode:
332+
wl_input = replace_wl_with_plain_text(wl_input)
331333
GNU_readline.add_history(wl_input)
332334

333335
if query is None:

0 commit comments

Comments
 (0)