Skip to content

Commit de755aa

Browse files
committed
Disable cythonization of submodule files
1 parent 4705f90 commit de755aa

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

mathics/builtin/assignment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,11 +1922,11 @@ class LoadModule(Builtin):
19221922
def apply(self, module, evaluation):
19231923
"LoadModule[module_String]"
19241924
try:
1925-
module_loaded = evaluation.definitions.load_pymathics_module(module.value)
1926-
except PyMathicsLoadException as e:
1925+
evaluation.definitions.load_pymathics_module(module.value)
1926+
except PyMathicsLoadException:
19271927
evaluation.message(self.name, "notmathicslib", module)
19281928
return SymbolFailed
1929-
except ImportError as e:
1929+
except ImportError:
19301930
evaluation.message(self.get_name(), "notfound", module)
19311931
return SymbolFailed
19321932
else:

setup.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,27 @@ def read(*rnames):
6464
EXTENSIONS = []
6565
CMDCLASS = {}
6666
else:
67-
EXTENSIONS = {
68-
"core": ["expression", "numbers", "rules", "pattern"],
69-
"builtin": ["arithmetic", "numeric", "patterns", "graphics"],
67+
EXTENSIONS_DICT = {
68+
"core": ("expression", "numbers", "rules", "pattern"),
69+
"builtin": ("patterns",),
7070
}
7171
EXTENSIONS = [
7272
Extension(
7373
"mathics.%s.%s" % (parent, module), ["mathics/%s/%s.py" % (parent, module)]
7474
)
75-
for parent, modules in EXTENSIONS.items()
75+
for parent, modules in EXTENSIONS_DICT.items()
7676
for module in modules
7777
]
78+
# EXTENSIONS_SUBDIR_DICT = {
79+
# "builtin": [("numbers", "arithmetic"), ("numbers", "numeric"), ("drawing", "graphics")],
80+
# }
81+
# EXTENSIONS.append(
82+
# Extension(
83+
# "mathics.%s.%s.%s" % (parent, module[0], module[1]), ["mathics/%s/%s/%s.py" % (parent, module[0], module[1])]
84+
# )
85+
# for parent, modules in EXTENSIONS_SUBDIR_DICT.items()
86+
# for module in modules
87+
# )
7888
CMDCLASS = {"build_ext": build_ext}
7989
INSTALL_REQUIRES += ["cython>=0.15.1"]
8090

0 commit comments

Comments
 (0)