texlive[62765] Master/texmf-dist: pyluatex (17mar22)

commits+karl at tug.org commits+karl at tug.org
Thu Mar 17 21:29:39 CET 2022


Revision: 62765
          http://tug.org/svn/texlive?view=revision&revision=62765
Author:   karl
Date:     2022-03-17 21:29:38 +0100 (Thu, 17 Mar 2022)
Log Message:
-----------
pyluatex (17mar22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.pdf
    trunk/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex
    trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex-interpreter.py
    trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.lua
    trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty

Modified: trunk/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex	2022-03-17 20:28:57 UTC (rev 62764)
+++ trunk/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex	2022-03-17 20:29:38 UTC (rev 62765)
@@ -15,7 +15,7 @@
 \usepackage{url}
 \title{The \emph{pyluatex} package}
 \author{Tobias Enderle\\\url{https://github.com/tndrle/PyLuaTeX}}
-\date{v0.4.3 (2022/03/10)}
+\date{v0.4.4 (2022/03/16)}
 \begin{document}
 \maketitle
 \raggedright

Modified: trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex-interpreter.py
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex-interpreter.py	2022-03-17 20:28:57 UTC (rev 62764)
+++ trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex-interpreter.py	2022-03-17 20:29:38 UTC (rev 62765)
@@ -107,9 +107,7 @@
 
 if __name__ == '__main__':
     try:
-        tex_file = sys.argv[1]
-        tex_file_folder = os.path.normpath(os.path.dirname(tex_file))
-        sys.path.insert(0, tex_file_folder)
+        sys.path.insert(0, os.path.normpath(sys.argv[1]))
     except:
         pass
 

Modified: trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.lua	2022-03-17 20:28:57 UTC (rev 62764)
+++ trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.lua	2022-03-17 20:29:38 UTC (rev 62765)
@@ -45,16 +45,16 @@
 local last_code = nil
 local last_output = nil
 
-local function get_tex_file()
+local function get_tex_file_folder()
     for k, v in ipairs(arg) do
         if not v:find("^%-") then
-            local path = lfs.currentdir() .. dir_sep .. v
-            if lfs.attributes(path, "mode") == "file" then
-                return path
+            local path = file.collapsepath(v, true)
+            if lfs.isfile(path) then
+                return file.pathpart(path)
             else
-                path = path .. ".tex"
-                if lfs.attributes(path, "mode") == "file" then
-                    return path
+                path = file.addsuffix(path, "tex")
+                if lfs.isfile(path) then
+                    return file.pathpart(path)
                 end
             end
         end
@@ -76,9 +76,9 @@
 
     local cmd = ""
     if local_imports then
-        local tex_file = get_tex_file()
-        if tex_file ~= nil then
-            cmd = " \"" .. tex_file .. "\""
+        local tex_file_folder = get_tex_file_folder()
+        if tex_file_folder ~= nil then
+            cmd = " \"" .. tex_file_folder .. "\""
         end
     end
     cmd = executable .. " \"" .. script .. "\"" .. cmd

Modified: trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty	2022-03-17 20:28:57 UTC (rev 62764)
+++ trunk/Master/texmf-dist/tex/lualatex/pyluatex/pyluatex.sty	2022-03-17 20:29:38 UTC (rev 62765)
@@ -9,7 +9,7 @@
 %% version 2005/12/01 or later.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{pyluatex}[2022/03/10 v0.4.3 Execute Python code on the fly]
+\ProvidesPackage{pyluatex}[2022/03/16 v0.4.4 Execute Python code on the fly]
 
 \RequirePackage{expl3}
 \ExplSyntaxOn



More information about the tex-live-commits mailing list.