pymakehelper package

Submodules

pymakehelper.configs module

All configurations for pymakehelper

class pymakehelper.configs.ConfigPdflatex[source]

Bases: Config

Parameters for pdflatex

input_file = <pytconf.param.Unique object>
output_file = <pytconf.param.Unique object>
qpdf = True
remove_tmp = True
runs = 2
class pymakehelper.configs.ConfigSymlinkInstall[source]

Bases: Config

Parameters for the symlink install tool

debug = True
doit = True
incremental = True
recurse = True
source_folder = <pytconf.param.Unique object>
target_folder = <pytconf.param.Unique object>
class pymakehelper.configs.ConfigVerbose[source]

Bases: Config

Parameters for verbosity

verbose = False

pymakehelper.main module

main file

pymakehelper.main.env() → None[source]
pymakehelper.main.error_on_print() → None[source]
pymakehelper.main.error_on_print_or_error() → None[source]
pymakehelper.main.main()[source]
pymakehelper.main.no_err() → None[source]
pymakehelper.main.only_print_on_error() → None[source]
pymakehelper.main.remove_folders() → None[source]
pymakehelper.main.reverse_exitcode() → None[source]
pymakehelper.main.run_make() → None[source]
pymakehelper.main.run_with_ignore() → None[source]
pymakehelper.main.touch_mkdir() → None[source]
pymakehelper.main.wrapper_css_validator() → None[source]
pymakehelper.main.wrapper_pdflatex() → None[source]

pymakehelper.static module

version which can be consumed from within the module

pymakehelper.subprocess module

This module provides a simple wrapper around the subprocess module

pymakehelper.subprocess.run_error_on_print(args: list[str])[source]
pymakehelper.subprocess.run_error_on_print_or_error(args: list[str])[source]
pymakehelper.subprocess.run_no_err(args: list[str])[source]
pymakehelper.subprocess.run_only_print_on_error(args: list[str])[source]

pymakehelper.utils module

utils.py

pymakehelper.utils.do_install(source, target)[source]

install a single symlink

pymakehelper.utils.do_real_install(source, target)[source]

This does the real installation

pymakehelper.utils.ensure_dir(f, exist_ok=True)[source]
pymakehelper.utils.file_gen(root_folder: str, recurse: bool)[source]

generate all files in a folder

pymakehelper.utils.get_flags(filename: str) → set[str][source]

read the content of a file and get all the flags declared in it

pymakehelper.utils.get_logger()[source]
pymakehelper.utils.touch(f)[source]
pymakehelper.utils.touch_mkdir(f)[source]
pymakehelper.utils.touch_mkdir_many(filenames)[source]

this is a function that removes a file and can optionally die if there is a problem

pymakehelper.wrapper_pdflatex module

This is a script that runs pdflatex for us. Why do we need this script ? - to remove the output before we run pdflatex so that we will be sure that we start clean. if pdflatex finds a file it will * reprocess * it and we dont want that, do we ? - we need to run pdflatex twice to create indexes and more. - pdf latex is way too verbose - we want to remove that output and only show it if there is an error. - in case we fail we want to make sure we remove the output.

Maybe more reasons will follow…

Take note of the argument we pass to pdflatex: - -interaction=nonstopmode - this means that latex will not stop and enter interactive mode to ask the user what to do about an error (what is this behaviour anyway ?!?). - -halt-on-error - this means that latex will stop on error. - -output-directory - this tells pdflatex where the output folder is.

This python script is a rewrite of a similar script in perl.

pymakehelper.wrapper_pdflatex.chmod_check(filename: str, check: bool)[source]

this is a function that chmods a file and can optionally die if there is a problem

pymakehelper.wrapper_pdflatex.my_rename(old_filename: str, new_filename: str, check: bool)[source]

this is a function that renames a file and dies if there is a problem

pymakehelper.wrapper_pdflatex.printout(filename: str)[source]

print to stdout a file content this function is adjusted for the ugly output that pdflatex produces and so it only prints the lines between lines starting with “!” (including the actual lines starting with “!”). Apparently this is how pdflatex shows errors. Ugrrr…

pymakehelper.wrapper_pdflatex.run_wrapper_pdflatex()[source]

main entry point

Module contents

Initialize the module