Skip to content

Commit 28a130b

Browse files
authored
Add autoload/rules/*.m to package and other tweaks (#1372)
* Add `autoload/rules/*.m` to package * Add `test/data/*` to package * Add mime association "text/x-comma-separated-values" as "CSV"
1 parent 33fd261 commit 28a130b

File tree

3 files changed

+27
-20
lines changed

3 files changed

+27
-20
lines changed

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ include requirements-cython.txt
88
include requirements-dev.txt
99
include requirements-full.txt
1010
recursive-include mathics *.py
11+
recursive-include mathics/autoload *
1112
recursive-include mathics/data *
12-
recursive-include test *.py *.m
13+
recursive-include test *.py *.m *.wl

mathics/builtin/files_io/importexport.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@
6767
# TODO: Add more file formats
6868

6969
mimetype_dict = {
70-
"application/dicom": "DICOM",
7170
"application/dbase": "DBF",
7271
"application/dbf": "DBF",
72+
"application/dicom": "DICOM",
7373
"application/eps": "EPS",
7474
"application/fits": "FITS",
7575
"application/json": "JSON",
7676
"application/mathematica": "NB",
77-
"application/mdb": "MDB",
7877
"application/mbox": "MBOX",
78+
"application/mdb": "MDB",
7979
"application/msaccess": "MDB",
8080
"application/octet-stream": "OBJ",
81-
"application/pdf": "PDF",
8281
"application/pcx": "PCX",
82+
"application/pdf": "PDF",
8383
"application/postscript": "EPS",
8484
"application/rss+xml": "RSS",
8585
"application/rtf": "RTF",
@@ -88,15 +88,13 @@
8888
"application/vnd.google-earth.kml+xml": "KML",
8989
"application/vnd.ms-excel": "XLS",
9090
"application/vnd.ms-pki.stl": "STL",
91+
"application/vnd.msaccess": "MDB",
9192
"application/vnd.oasis.opendocument.spreadsheet": "ODS",
9293
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX", # nopep8
9394
"application/vnd.sun.xml.calc": "SXC",
94-
"application/vnd.msaccess": "MDB",
9595
"application/vnd.wolfram.cdf": "CDF",
9696
"application/vnd.wolfram.cdf.text": "CDF",
9797
"application/vnd.wolfram.mathematica.package": "Package",
98-
"application/xhtml+xml": "XHTML",
99-
"application/xml": "XML",
10098
"application/x-3ds": "3DS",
10199
"application/x-cdf": "NASACDF",
102100
"application/x-eps": "EPS",
@@ -107,17 +105,19 @@
107105
"application/x-netcdf": "NetCDF",
108106
"application/x-shockwave-flash": "SWF",
109107
"application/x-tex": "TeX", # Also TeX
108+
"application/xhtml+xml": "XHTML",
109+
"application/xml": "XML",
110110
"audio/aiff": "AIFF",
111111
"audio/basic": "AU", # Also SND
112112
"audio/midi": "MIDI",
113113
"audio/x-aifc": "AIFF",
114114
"audio/x-aiff": "AIFF",
115115
"audio/x-flac": "FLAC",
116116
"audio/x-wav": "WAV",
117-
"chemical/seq-na-genbank": "GenBank",
118117
"chemical/seq-aa-fasta": "FASTA",
119118
"chemical/seq-na-fasta": "FASTA",
120119
"chemical/seq-na-fastq": "FASTQ",
120+
"chemical/seq-na-genbank": "GenBank",
121121
"chemical/seq-na-sff": "SFF",
122122
"chemical/x-cif": "CIF",
123123
"chemical/x-daylight-smiles": "SMILES",
@@ -158,10 +158,10 @@
158158
"image/x-portable-graymap": "PGM",
159159
"image/x-portable-pixmap": "PPM",
160160
"image/x-xbitmap": "XBM",
161-
"model/x3d+xml": "X3D",
162161
"model/vrml": "VRML",
163162
"model/x-lwo": "LWO",
164163
"model/x-pov": "POV",
164+
"model/x3d+xml": "X3D",
165165
"text/calendar": "ICS",
166166
"text/comma-separated-values": "CSV",
167167
"text/csv": "CSV",
@@ -173,6 +173,7 @@
173173
"text/tab-separated-values": "TSV",
174174
"text/texmacs": "Text",
175175
"text/vnd.graphviz": "DOT",
176+
"text/x-comma-separated-values": "CSV",
176177
"text/x-csrc": "C",
177178
"text/x-tex": "TeX",
178179
"text/x-vcalendar": "VCS",

pyproject.toml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ requires = [
44
"cython>=0.15.1; implementation_name!='pypy'",
55
# For mathics-generate-json-table
66
"Mathics-Scanner >= 1.4.0",
7+
# "packaging" is needed for testing the SymPy Version
8+
# in PartionsP
79
"packaging",
810
]
911
build-backend = "setuptools.build_meta"
@@ -18,7 +20,6 @@ dependencies = [
1820
# Pillow 9.1.0 supports BigTIFF with big-endian byte order.
1921
# ExampleData image hedy.tif is in this format.
2022
# Pillow 9.2 handles sunflowers.jpg
21-
"stopit; platform_system != 'Emscripten'",
2223
"pillow >= 9.2",
2324
"pint",
2425
"python-dateutil",
@@ -27,9 +28,11 @@ dependencies = [
2728
"requests",
2829
"scipy",
2930
"setuptools",
31+
# stopit is needed in TimeRemaining[]
32+
"stopit; platform_system != 'Emscripten'",
3033
"sympy>=1.13,<1.14",
3134
]
32-
license = {text = "GPL"}
35+
license = {text = "GPL3"}
3336
name = "Mathics3"
3437
requires-python = ">=3.8" # Sympy 1.11 is supported only down to 3.8
3538
readme = "README.rst"
@@ -90,20 +93,22 @@ include = ["mathics*"]
9093

9194
[tool.setuptools.package-data]
9295
"mathics" = [
96+
"Packages/*/*.m",
97+
"Packages/*/Kernel/init.m",
98+
"autoload-cli/*.m",
99+
"autoload/*.m",
100+
"autoload/*/*.m",
101+
"autoload/formats/*/Export.m",
102+
"autoload/formats/*/Import.m",
93103
"data/*.csv",
94104
"data/*.json",
95-
"data/*.yml",
96-
"data/*.yaml",
97105
"data/*.pcl",
106+
"data/*.yaml",
107+
"data/*.yml",
98108
"data/ExampleData/*",
99-
"doc/xml/data",
100109
"doc/tex/data",
101-
"autoload/*.m",
102-
"autoload-cli/*.m",
103-
"autoload/formats/*/Import.m",
104-
"autoload/formats/*/Export.m",
105-
"Packages/*/*.m",
106-
"Packages/*/Kernel/init.m",
110+
"doc/xml/data",
111+
"test/data/*",
107112
]
108113
"mathics.doc" = [
109114
"documentation/*.mdoc",

0 commit comments

Comments
 (0)