Description: avoid distutils usage
 This patch removes the superflous usage of the distutils usage to create
 directories. It is a backport of upstream git.
Author: Sebastian Humenda <shumenda@gmx.de>
Origin: <upstream|backport|vendor|other>, <URL, required except if Author is present>
Applied-Upstream: c06c99359f4f2bc4300
Last-Update: 2018-04-26
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
diff --git a/gleetex/image.py b/gleetex/image.py
index a6d4bfb..9949377 100644
--- 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):
diff --git a/tests/test_convenience.py b/tests/test_convenience.py
index 4bc8414..baef3bb 100644
--- 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
 
