2525[email protected] and ask for help.2626"""
2727
28+ import re
2829import sys
2930import os .path as osp
3031import platform
31- import subprocess
32- from setuptools import setup , Command , Extension
32+ from setuptools import setup
3333
3434# Ensure user has the correct Python version
3535if sys .version_info < (3 , 6 ):
@@ -62,11 +62,22 @@ def read(*rnames):
6262# General Requirements
6363INSTALL_REQUIRES = [
6464 "chardet" , # Used in mathics_scanner.feed
65- "ujson" , # Used in mathics_scanner.characters
65+ "PyYAML" , # Used in mathics-generate-json-table
66+ # "ujson", # Optional Used in mathics_scanner.characters
6667 "click" , # Usin in CLI: mathics-generate-json-table
6768]
6869
6970
71+ extra_requires = []
72+ for line in open ("requirements-extra.txt" ).read ().split ("\n " ):
73+ if line and not line .startswith ("#" ):
74+ requires = re .sub (r"([^#]+)(\s*#.*$)?" , r"\1" , line )
75+ extra_requires .append (requires )
76+
77+ EXTRA_REQUIRES = {
78+ "full" : extra_requires
79+ }
80+
7081def subdirs (root , file = "*.*" , depth = 10 ):
7182 for k in range (depth ):
7283 yield root + "*/" * k + file
@@ -80,6 +91,7 @@ def subdirs(root, file="*.*", depth=10):
8091 "mathics_scanner.generate" ,
8192 ],
8293 install_requires = INSTALL_REQUIRES ,
94+ extra_requires = EXTRA_REQUIRES ,
8395 entry_points = {
8496 "console_scripts" : [
8597 "mathics-generate-json-table=mathics_scanner.generate.build_tables:main"
0 commit comments