Skip to content

Commit b71598c

Browse files
Revert delayed import, add dependencies
1 parent a2d8a58 commit b71598c

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

problemtools/problem2html.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66
import argparse
77
import logging
88
import subprocess
9+
import plasTeX.TeX
10+
import plasTeX.Logging
911

12+
from .ProblemPlasTeX import ProblemRenderer
13+
from .ProblemPlasTeX import ProblemsetMacros
14+
from . import template
1015

1116
def convert(options: argparse.Namespace) -> None:
12-
import plasTeX.TeX
13-
import plasTeX.Logging
14-
15-
from .ProblemPlasTeX import ProblemRenderer
16-
from .ProblemPlasTeX import ProblemsetMacros
17-
from . import template
18-
1917
problem = os.path.realpath(options.problem)
2018

2119
problembase = os.path.splitext(os.path.basename(problem))[0]

problemtools/problem2pdf.py

-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99

1010

1111
def convert(options: argparse.Namespace) -> bool:
12-
1312
problem = os.path.realpath(options.problem)
1413
problembase = os.path.splitext(os.path.basename(problem))[0]
1514
destfile = string.Template(options.destfile).safe_substitute(problem=problembase)
1615

17-
texfile = problem
1816
# Set up template if necessary
1917
with template.Template(problem, language=options.language) as templ:
2018
texfile = templ.get_file_name()

requirements.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
-e .
2+
3+
plasTeX~=3.0
4+
PyYAML~=6.0

0 commit comments

Comments
 (0)