Control: severity -1 important Control: tags -1 + patch Control: retitle -1 python3-gleetex: please avoid usage of distutils
please avoid the usage of distutils, it's not really needed, and the os module can be used for that kind of usage. patch attached.
diff -Nru gladtex-2.3.1/debian/changelog gladtex-2.3.1/debian/changelog --- gladtex-2.3.1/debian/changelog 2018-04-23 13:14:20.000000000 +0200 +++ gladtex-2.3.1/debian/changelog 2018-04-26 07:50:29.000000000 +0200 @@ -1,3 +1,11 @@ +gladtex (2.3.1-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Avoid the usage of distutils at runtime. + * python3-gleetex: Drop the dependency on python3-distutils. + + -- Matthias Klose <d...@debian.org> Thu, 26 Apr 2018 07:50:29 +0200 + gladtex (2.3.1-2) unstable; urgency=medium [OndÅej Nový] diff -Nru gladtex-2.3.1/debian/control gladtex-2.3.1/debian/control --- gladtex-2.3.1/debian/control 2018-04-22 17:25:48.000000000 +0200 +++ gladtex-2.3.1/debian/control 2018-04-26 07:50:29.000000000 +0200 @@ -11,7 +11,7 @@ Package: python3-gleetex Architecture: all Depends: ${misc:Depends}, ${python3:Depends}, texlive-latex-recommended, - texlive-fonts-recommended, preview-latex-style, dvipng, python3-distutils + texlive-fonts-recommended, preview-latex-style, dvipng Description: Module to embed LaTeX equations in HTML files GleeTeX is a python module to create images from formulas. It can parse HTML documents and replace all occurrences of <eq>some formula</eq> through images. diff -Nru gladtex-2.3.1/debian/patches/avoid-distutils.diff gladtex-2.3.1/debian/patches/avoid-distutils.diff --- gladtex-2.3.1/debian/patches/avoid-distutils.diff 1970-01-01 01:00:00.000000000 +0100 +++ gladtex-2.3.1/debian/patches/avoid-distutils.diff 2018-04-26 07:50:29.000000000 +0200 @@ -0,0 +1,40 @@ +Index: b/gleetex/image.py +=================================================================== +--- a/gleetex/image.py ++++ b/gleetex/image.py +@@ -1,7 +1,6 @@ + """ + This module takes care of the actual image creation process. + """ +-import distutils.dir_util + import os + import re + import shutil +@@ -76,7 +75,7 @@ class Tex2img: + # create directory for image if that doesn't exist + base_name = os.path.split(output_fn)[0] + if base_name and not os.path.exists(base_name): +- distutils.dir_util.mkpath(base_name) ++ os.makedirs(base_name) + + + def set_dpi(self, dpi): +Index: b/tests/test_convenience.py +=================================================================== +--- a/tests/test_convenience.py ++++ b/tests/test_convenience.py +@@ -1,5 +1,4 @@ + #pylint: disable=too-many-public-methods,import-error,too-few-public-methods,missing-docstring,unused-variable +-import distutils + import os + import shutil + import tempfile +@@ -33,7 +32,7 @@ class Tex2imgMock(): + self.output_name = output_fn + base_name = os.path.split(output_fn)[0] + if base_name and not os.path.exists(base_name): +- distutils.dir_util.mkpath(base_name) ++ os.makedirs(base_name) + self.set_dpi = self.set_transparency = self.set_foreground_color \ + = self.set_background_color = lambda x: None # do nothing + diff -Nru gladtex-2.3.1/debian/patches/series gladtex-2.3.1/debian/patches/series --- gladtex-2.3.1/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ gladtex-2.3.1/debian/patches/series 2018-04-26 07:44:39.000000000 +0200 @@ -0,0 +1 @@ +avoid-distutils.diff