Hello community, here is the log from the commit of package python-PyLaTeX for openSUSE:Factory checked in at 2020-06-10 00:47:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-PyLaTeX (Old) and /work/SRC/openSUSE:Factory/.python-PyLaTeX.new.3606 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyLaTeX" Wed Jun 10 00:47:35 2020 rev:2 rq:812650 version:1.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-PyLaTeX/python-PyLaTeX.changes 2019-11-09 23:41:54.777436853 +0100 +++ /work/SRC/openSUSE:Factory/.python-PyLaTeX.new.3606/python-PyLaTeX.changes 2020-06-10 00:47:39.142825095 +0200 @@ -1,0 +2,7 @@ +Mon Jun 8 13:29:44 UTC 2020 - Marketa Calabkova <[email protected]> + +- Update to 1.3.2 + * On python 3.6+ support multhreaded use of PyLaTeX, by not calling + os.chdir + +------------------------------------------------------------------- Old: ---- PyLaTeX-1.3.1.tar.gz New: ---- PyLaTeX-1.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-PyLaTeX.spec ++++++ --- /var/tmp/diff_new_pack.9kSoDQ/_old 2020-06-10 00:47:40.234827952 +0200 +++ /var/tmp/diff_new_pack.9kSoDQ/_new 2020-06-10 00:47:40.238827962 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-PyLaTeX # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-PyLaTeX -Version: 1.3.1 +Version: 1.3.2 Release: 0 Summary: A Python library for creating LaTeX files and snippets License: MIT ++++++ PyLaTeX-1.3.1.tar.gz -> PyLaTeX-1.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLaTeX-1.3.1/.travis.yml new/PyLaTeX-1.3.2/.travis.yml --- old/PyLaTeX-1.3.1/.travis.yml 2019-09-26 08:50:36.000000000 +0200 +++ new/PyLaTeX-1.3.2/.travis.yml 2020-05-16 01:51:43.000000000 +0200 @@ -8,6 +8,7 @@ - '3.5' - '3.6' - '3.7' + - '3.8' # allow failures - 'nightly' - 'pypy2.7-6.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLaTeX-1.3.1/dev_requirements.txt new/PyLaTeX-1.3.2/dev_requirements.txt --- old/PyLaTeX-1.3.1/dev_requirements.txt 2019-09-26 08:50:36.000000000 +0200 +++ new/PyLaTeX-1.3.2/dev_requirements.txt 2020-05-16 01:51:43.000000000 +0200 @@ -2,3 +2,4 @@ -e git+https://github.com/JelteF/sphinx.git@better-autodoc-skip-member#egg=sphinx -e git+https://github.com/JelteF/sphinx_rtd_theme.git@master#egg=sphinx-rtd-theme -e git+https://github.com/JelteF/flake8-putty.git@master#egg=flake8-putty +pyflakes==2.2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLaTeX-1.3.1/docs/create_doc_files.sh new/PyLaTeX-1.3.2/docs/create_doc_files.sh --- old/PyLaTeX-1.3.1/docs/create_doc_files.sh 2019-09-26 08:50:36.000000000 +0200 +++ new/PyLaTeX-1.3.2/docs/create_doc_files.sh 2020-05-16 01:51:43.000000000 +0200 @@ -58,7 +58,7 @@ $python ../../../$f > /dev/null rst=../../../$rst for pdf in ${name}*.pdf; do - convert $pdf ${pdf}.png + convert "$pdf" -colorspace RGB "${pdf}.png" echo ".. literalinclude:: /_static/examples/${pdf%.pdf}.tex" >> $rst echo " :language: latex" >> $rst echo " :linenos:" >> $rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLaTeX-1.3.1/docs/source/changelog.rst new/PyLaTeX-1.3.2/docs/source/changelog.rst --- old/PyLaTeX-1.3.1/docs/source/changelog.rst 2019-09-26 08:50:36.000000000 +0200 +++ new/PyLaTeX-1.3.2/docs/source/changelog.rst 2020-05-16 01:51:43.000000000 +0200 @@ -14,7 +14,15 @@ pip install git+https://github.com/JelteF/PyLaTeX.git -1.3.1_ - `docs <../v1.3.0/>`__ - 2019-09-26 +1.3.2_ - `docs <../v1.3.2/>`__ - 2020-05-16 +------------------------------------------- + +Fixed +~~~~~ +- On python 3.6+ support multhreaded use of PyLaTeX, by not calling + ``os.chdir`` + +1.3.1_ - `docs <../v1.3.1/>`__ - 2019-09-26 ------------------------------------------- Fixed @@ -429,7 +437,8 @@ - Fix package delegation with duplicate packages -.. _Unreleased: https://github.com/JelteF/PyLaTeX/compare/v1.3.1...HEAD +.. _Unreleased: https://github.com/JelteF/PyLaTeX/compare/v1.3.2...HEAD +.. _1.3.2: https://github.com/JelteF/PyLaTeX/compare/v1.3.1...1.3.2 .. _1.3.1: https://github.com/JelteF/PyLaTeX/compare/v1.3.0...1.3.1 .. _1.3.0: https://github.com/JelteF/PyLaTeX/compare/v1.2.1...1.3.0 .. _1.2.1: https://github.com/JelteF/PyLaTeX/compare/v1.2.0...v1.2.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLaTeX-1.3.1/pylatex/_version.py new/PyLaTeX-1.3.2/pylatex/_version.py --- old/PyLaTeX-1.3.1/pylatex/_version.py 2019-09-26 08:50:36.000000000 +0200 +++ new/PyLaTeX-1.3.2/pylatex/_version.py 2020-05-16 01:51:43.000000000 +0200 @@ -23,9 +23,9 @@ # setup.py/versioneer.py will grep for the variable names, so they must # each be defined on a line of their own. _version.py will just call # get_keywords(). - git_refnames = " (HEAD -> master, tag: v1.3.1, refs/pull/191/head)" - git_full = "ae3e591adc6f31dc196fe827a29f957fbe87d0f1" - git_date = "2019-09-26 08:50:36 +0200" + git_refnames = " (tag: v1.3.2)" + git_full = "ecc1e6e339a5a7be958c328403517cd547873d7e" + git_date = "2020-05-16 01:51:43 +0200" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/PyLaTeX-1.3.1/pylatex/document.py new/PyLaTeX-1.3.2/pylatex/document.py --- old/PyLaTeX-1.3.1/pylatex/document.py 2019-09-26 08:50:36.000000000 +0200 +++ new/PyLaTeX-1.3.2/pylatex/document.py 2020-05-16 01:51:43.000000000 +0200 @@ -7,6 +7,7 @@ """ import os +import sys import subprocess import errno from .base_classes import Environment, Command, Container, LatexObject, \ @@ -197,19 +198,25 @@ if compiler_args is None: compiler_args = [] + # In case of newer python with the use of the cwd parameter + # one can avoid to physically change the directory + # to the destination folder + python_cwd_available = sys.version_info >= (3, 6) + filepath = self._select_filepath(filepath) - filepath = os.path.join('.', filepath) + if not os.path.basename(filepath): + filepath = os.path.join(os.path.abspath(filepath), + 'default_basename') + else: + filepath = os.path.abspath(filepath) cur_dir = os.getcwd() dest_dir = os.path.dirname(filepath) - basename = os.path.basename(filepath) - if basename == '': - basename = 'default_basename' + if not python_cwd_available: + os.chdir(dest_dir) - os.chdir(dest_dir) - - self.generate_tex(basename) + self.generate_tex(filepath) if compiler is not None: compilers = ((compiler, []),) @@ -221,7 +228,11 @@ ('pdflatex', []) ) - main_arguments = ['--interaction=nonstopmode', basename + '.tex'] + main_arguments = ['--interaction=nonstopmode', filepath + '.tex'] + + check_output_kwargs = {} + if python_cwd_available: + check_output_kwargs = {'cwd': dest_dir} os_error = None @@ -230,7 +241,8 @@ try: output = subprocess.check_output(command, - stderr=subprocess.STDOUT) + stderr=subprocess.STDOUT, + **check_output_kwargs) except (OSError, IOError) as e: # Use FileNotFoundError when python 2 is dropped os_error = e @@ -250,16 +262,17 @@ if clean: try: # Try latexmk cleaning first - subprocess.check_output(['latexmk', '-c', basename], - stderr=subprocess.STDOUT) - except (OSError, IOError, subprocess.CalledProcessError) as e: + subprocess.check_output(['latexmk', '-c', filepath], + stderr=subprocess.STDOUT, + **check_output_kwargs) + except (OSError, IOError, subprocess.CalledProcessError): # Otherwise just remove some file extensions. extensions = ['aux', 'log', 'out', 'fls', 'fdb_latexmk'] for ext in extensions: try: - os.remove(basename + '.' + ext) + os.remove(filepath + '.' + ext) except (OSError, IOError) as e: # Use FileNotFoundError when python 2 is dropped if e.errno != errno.ENOENT: @@ -267,7 +280,7 @@ rm_temp_dir() if clean_tex: - os.remove(basename + '.tex') # Remove generated tex file + os.remove(filepath + '.tex') # Remove generated tex file # Compilation has finished, so no further compilers have to be # tried @@ -276,12 +289,13 @@ else: # Notify user that none of the compilers worked. raise(CompilerError( - 'No LaTex compiler was found\n' + - 'Either specify a LaTex compiler ' + + 'No LaTex compiler was found\n' + 'Either specify a LaTex compiler ' 'or make sure you have latexmk or pdfLaTex installed.' )) - os.chdir(cur_dir) + if not python_cwd_available: + os.chdir(cur_dir) def _select_filepath(self, filepath): """Make a choice between ``filepath`` and ``self.default_filepath``.
