Commits

Felix Krull  committed c6a2939

Use setuptools when available.

  • Participants
  • Parent commits 443d5d8

Comments (0)

Files changed (1)

 import os
 import sys
 import tempfile
-from distutils.core import Command, Distribution, setup
+
+try:
+    from setuptools import Command, Distribution, setup
+except ImportError:
+    print("setuptools unavailable, falling back to distutils.",
+          file=sys.stderr)
+    from distutils.core import Command, Distribution, setup
 from distutils.command.build import build
 
 from rgain import __version__
         "distclass": ManpagesDistribution,
     }
 except ImportError:
-    print >> sys.stderr, ("You do not have docutils, the manpages won't be "
-                          "generated.")
+    print("docutils not found, manpages won't be generated.", file=sys.stderr)
     manpages_args = {}
 
 setup(