Skip to content

Commit

Permalink
added support for miktex-kpsewhich executable for MiKTeX compatibilit…
Browse files Browse the repository at this point in the history
…y under macOS (gpoore/minted#401)
  • Loading branch information
gpoore committed Oct 29, 2024
1 parent bcf8cea commit abcf535
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

## v0.6.0 (dev)

* Added support for `miktex-kpsewhich` executable for MiKTeX compatibility
under macOS (gpoore/minted#401).

* Reorganized logic in `ResolvedRestrictedPath` to improve performance.
Methods `can_read_anywhere()`, `can_read_dotfiles()`,
`can_write_anywhere()`, and `can_write_dotfiles()` are no longer called
Expand Down
4 changes: 3 additions & 1 deletion latexrestricted/_latex_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __init__(self):
pass


_permitted_subprocess_executables = set(['kpsewhich', 'initexmf'])
_permitted_subprocess_executables = set(['kpsewhich', 'initexmf', 'miktex-kpsewhich'])
_permitted_subprocess_executables.update([f'{executable}.exe' for executable in _permitted_subprocess_executables])

_tex_cwd_anypath: AnyPath = AnyPath.cwd()
Expand Down Expand Up @@ -178,6 +178,8 @@ def _init_tex_paths_miktex(cls):
which_kpsewhich = shutil.which('kpsewhich.exe', path=str(miktex_bin_path))
else:
which_kpsewhich = shutil.which('kpsewhich', path=str(miktex_bin_path))
if not which_kpsewhich:
which_kpsewhich = shutil.which('miktex-kpsewhich', path=str(miktex_bin_path))
if not which_kpsewhich:
raise LatexConfigError(
'Environment variable TEXSYSTEM="miktex", '
Expand Down
2 changes: 1 addition & 1 deletion latexrestricted/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-

from .fmtversion import get_version_plus_info
__version__, __version_info__ = get_version_plus_info(0, 6, 0, 'dev', 1)
__version__, __version_info__ = get_version_plus_info(0, 6, 0, 'dev', 2)

0 comments on commit abcf535

Please sign in to comment.