Skip to content

Commit a753525

Browse files
authored
Merge pull request #1007 from mathics/MacOSX-fixes
Mac OSX (and probably Windows) fixes
2 parents 48662ed + 1785b02 commit a753525

7 files changed

Lines changed: 672 additions & 506 deletions

File tree

.gitignore

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
13
*.c
24
*.cpp
35
*.egg
@@ -6,12 +8,15 @@
68
*.py[cod]
79
*.so
810
.coverage
11+
.idea/
912
.mypy_cache
1013
.project
1114
.pydevproject
1215
.settings
1316
.vscode
1417
/.python-version
18+
/Mathics3.egg-info
19+
ChangeLog
1520
Documents/
1621
Homepage/
1722
Mathics.egg-info/
@@ -21,16 +26,15 @@ _Database_/
2126
build/
2227
dist/
2328
mathics/Makefile
24-
ChangeLog
2529
mathics/doc/tex/data
2630
mathics/doc/tex/documentation.tex
2731
mathics/doc/tex/images/
2832
mathics/doc/tex/logo-heptatom.pdf
2933
mathics/doc/tex/logo-text-nodrop.pdf
3034
mathics/doc/tex/mathics-*.asy
35+
mathics/doc/tex/mathics-*.dvi
3136
mathics/doc/tex/mathics-*.eps
3237
mathics/doc/tex/mathics-*.pdf
33-
mathics/doc/tex/mathics-*.dvi
3438
mathics/doc/tex/mathics-*.tex
3539
mathics/doc/tex/mathics.aux
3640
mathics/doc/tex/mathics.dvi
@@ -46,12 +50,9 @@ mathics/doc/tex/mathics.out
4650
mathics/doc/tex/mathics.pdf
4751
mathics/doc/tex/mathics.pre
4852
mathics/doc/tex/mathics.toc
49-
5053
mathics/doc/xml/
5154
mathics/web/db/mathics.sqlite
52-
mathics/web/media/pdf/
5355
mathics/web/media/doc/classes.pdf
5456
mathics/web/media/doc/classes.png
57+
mathics/web/media/pdf/
5558
tmp
56-
57-
.idea/

CHANGES.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
CHANGES
22
=======
33

4+
So we can get onto PyPI, the PyPI install name has changed from Mathics to Mathics3.
5+
6+
47
1.1.0
58
-----
69

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ RM ?= rm
1818
rmChangeLog \
1919
test
2020

21+
SANDBOX ?=
22+
ifeq ($(OS),Windows_NT)
23+
SANDBOX = t
24+
else
25+
UNAME_S := $(shell uname -s)
26+
ifeq ($(UNAME_S),Darwin)
27+
SANDBOX = t
28+
endif
29+
endif
30+
2131
#: Default target - same as "develop"
2232
all: develop
2333

@@ -66,7 +76,7 @@ doc-data mathics/doc/tex/data: mathics/builtin/*.py mathics/doc/documentation/*.
6676

6777
#: Run tests that appear in docstring in the code.
6878
doctest:
69-
$(PYTHON) mathics/test.py $o
79+
SANDBOX=$(SANDBOX) $(PYTHON) mathics/test.py $o
7080

7181
#: Run Django tests
7282
djangotest:

mathics/builtin/files.py

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import math
1919
import sympy
2020
import requests
21-
import tempfile
2221

2322

2423
from itertools import chain
@@ -1395,28 +1394,6 @@ class BinaryWrite(Builtin):
13951394
= {213, 143, 98, 112, 141, 183, 203, 247}
13961395
#> WRb[{384206740, 1676316040}, Table["UnsignedInteger32", {2}]]
13971396
= {148, 135, 230, 22, 136, 141, 234, 99}
1398-
1399-
## UnsignedInteger64
1400-
#> WRb[7079445437368829279, "UnsignedInteger64"]
1401-
= {95, 5, 33, 229, 29, 62, 63, 98}
1402-
#> WRb[5381171935514265990, "UnsignedInteger64"]
1403-
= {134, 9, 161, 91, 93, 195, 173, 74}
1404-
1405-
## UnsignedInteger128
1406-
#> WRb[293382001665435747348222619884289871468, "UnsignedInteger128"]
1407-
= {108, 78, 217, 150, 88, 126, 152, 101, 231, 134, 176, 140, 118, 81, 183, 220}
1408-
#> WRb[253033302833692126095975097811212718901, "UnsignedInteger128"]
1409-
= {53, 83, 116, 79, 81, 100, 60, 126, 202, 52, 241, 48, 5, 113, 92, 190}
1410-
1411-
## Full File
1412-
>> strm = OpenWrite["/dev/full", BinaryFormat -> True]
1413-
= OutputStream[...]
1414-
>> BinaryWrite[strm, {39, 4, 122}]
1415-
: No space left on device.
1416-
= OutputStream[...]
1417-
>> Close[strm]
1418-
: No space left on device.
1419-
= ...
14201397
"""
14211398

14221399
messages = {
@@ -1884,13 +1861,6 @@ class WriteString(Builtin):
18841861
| abc
18851862
18861863
#> WriteString[OpenWrite["/dev/zero"], "abc"] (* Null *)
1887-
1888-
#> str = OpenWrite["/dev/full"];
1889-
#> WriteString[str, "123"]
1890-
: No space left on device.
1891-
#> Close[str]
1892-
: No space left on device.
1893-
= /dev/full
18941864
"""
18951865

18961866
messages = {
@@ -2175,6 +2145,7 @@ class Put(BinaryOperator):
21752145
## * a bit fragile, somewhat
21762146
## * somewhat OS dependent,
21772147
## * can leave crap in the filesystem
2148+
## * put in a pytest
21782149
##
21792150
## For these reasons this should be done a a pure test
21802151
## rather than intermingled with the doc system.
@@ -2191,7 +2162,7 @@ class Put(BinaryOperator):
21912162
| 815915283247897734345611269596115894272000000000
21922163
S> Get[filename]
21932164
= 815915283247897734345611269596115894272000000000
2194-
#> DeleteFile[filename]
2165+
S> DeleteFile[filename]
21952166
21962167
S> filename = $TemporaryDirectory <> "/fiftyfactorial";
21972168
S> Put[10!, 20!, 30!, filename]

0 commit comments

Comments
 (0)