Skip to content

Commit 4832e21

Browse files
committed
Cleanup mathics.settings file
* Remove Django-based settings entries. * DOC_DATA_DIR is now in the user space not in the package install space. It will be *shared* with Django Update README.rst to reflect new location
1 parent f3c89ec commit 4832e21

File tree

3 files changed

+15
-31
lines changed

3 files changed

+15
-31
lines changed

mathics/doc/tex/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ LATEXMK ?= latexmk
66
BASH ?= /bin/bash
77
#-quiet
88

9+
DOC_DATA_PCL ?= $(HOME)/.local/var/mathics/doc_tex_data.pcl
10+
911
#: Default target: Make everything
1012
all doc texdoc: mathics.pdf
1113

12-
doc-data doc_tex_data.pcl:
14+
doc-data $(DOC_DATA_PCL):
1315
(cd ../.. && $(PYTHON) docpipeline.py --output --keep-going)
1416

1517
#: Build mathics PDF

mathics/doc/tex/README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Here is a flow of the data::
2424

2525
doc/documentation/*.mdoc --+
2626
|
27-
bultins/*.py -------------+--> doc/tex/doc_tex_data.pcl ---> documentation.tex -+
28-
docpipeline.py doc2latex.py |
29-
|
30-
doc/images/*.svg -------------> doc/tex/log*.pdf --------------------------------+------------------------------> mathics.pdf
31-
images.sh | latexmk,xetex,asyptote,gv
32-
|
33-
doc/tex/mathics.tex -------------------------------------------------------------+
27+
bultins/*.py -------------+--> doc_tex_data.pcl ---> documentation.tex -+
28+
docpipeline.py doc2latex.py |
29+
|
30+
doc/images/*.svg -------------> doc/tex/log*.pdf ------------------------+------------------------------> mathics.pdf
31+
images.sh | latexmk,xetex,asyptote,gv
32+
|
33+
doc/tex/mathics.tex -----------------------------------------------------+
3434

3535
A GNU Makefile in this directory has been created to manage the complicated workflow above.
3636

mathics/settings.py

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@
99

1010
DEBUG = True
1111

12-
# set only to True in DEBUG mode
13-
DEBUG_MAIL = True
14-
PROPAGATE_EXCEPTIONS = True
15-
DISPLAY_EXCEPTIONS = True
1612
DEBUG_PRINT = False
1713

18-
LOG_QUERIES = False
19-
2014
# Either None (no timeout) or a positive integer.
21-
# unix only
15+
# Unix only
2216
TIMEOUT = None
2317

2418
# specifies a maximum recursion depth is safe for all Python environments
@@ -29,9 +23,6 @@
2923
# historically 10000 was used on public mathics servers
3024
MAX_STORED_SIZE = 10000
3125

32-
ADMINS = (("Admin", "[email protected]"),)
33-
MANAGERS = ADMINS
34-
3526
ROOT_DIR = pkg_resources.resource_filename("mathics", "")
3627
if sys.platform.startswith("win"):
3728
DATA_DIR = os.environ["APPDATA"].replace(os.sep, "/") + "/Python/Mathics/"
@@ -40,26 +31,17 @@
4031
# if not path.exists(DATA_DIR):
4132
# os.makedirs(DATA_DIR)
4233

34+
# Location of internal document data.
35+
# NOTE: Storing this in JSON if possible would be preferable and faster
36+
DOC_DATA_PATH = os.path.join(DATA_DIR, "doc_data.pcl")
37+
4338
DOC_DIR = os.path.join(ROOT_DIR, "doc/documentation/")
44-
DOC_DATA_PATH = os.path.join(ROOT_DIR, "doc/tex/doc_tex_data.pcl")
4539
DOC_LATEX_FILE = os.path.join(ROOT_DIR, "doc/tex/documentation.tex")
4640

47-
# Local time zone for this installation. Choices can be found here:
48-
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
49-
# although not all choices may be available on all operating systems.
50-
# If running in a Windows environment this must be set to the same as your
51-
# system time zone.
52-
TIME_ZONE = "Europe/Vienna"
5341

5442
# Set this True if you prefer 12 hour time to be the default
5543
TIME_12HOUR = False
5644

57-
# Language code for this installation. All choices can be found here:
58-
# http://www.i18nguy.com/unicode/language-identifiers.html
59-
LANGUAGE_CODE = "en-us"
60-
61-
SITE_ID = 1
62-
6345
# Leave this True unless you have specific reason for not permitting
6446
# users to access local files
6547
ENABLE_FILES_MODULE = True

0 commit comments

Comments
 (0)