c0acebf
--- lib/Crypto/SelfTest/PublicKey/test_DSA.py
c0acebf
+++ lib/Crypto/SelfTest/PublicKey/test_DSA.py
c0acebf
@@ -223,7 +223,7 @@ def get_tests(config={}):
c0acebf
         from Crypto.PublicKey import _fastmath
c0acebf
         tests += list_test_cases(DSAFastMathTest)
c0acebf
     except ImportError:
c0acebf
-        from distutils.sysconfig import get_config_var
c0acebf
+        from sysconfig import get_config_var
c0acebf
         import inspect
c0acebf
         _fm_path = os.path.normpath(os.path.dirname(os.path.abspath(
c0acebf
             inspect.getfile(inspect.currentframe())))
c0acebf
--- lib/Crypto/SelfTest/PublicKey/test_RSA.py
c0acebf
+++ lib/Crypto/SelfTest/PublicKey/test_RSA.py
c0acebf
@@ -393,7 +393,7 @@ def get_tests(config={}):
c0acebf
         from Crypto.PublicKey import _fastmath
c0acebf
         tests += list_test_cases(RSAFastMathTest)
c0acebf
     except ImportError:
c0acebf
-        from distutils.sysconfig import get_config_var
c0acebf
+        from sysconfig import get_config_var
c0acebf
         import inspect
c0acebf
         _fm_path = os.path.normpath(os.path.dirname(os.path.abspath(
c0acebf
             inspect.getfile(inspect.currentframe())))
c0acebf
--- lib/Crypto/Util/number.py
c0acebf
+++ lib/Crypto/Util/number.py
c0acebf
@@ -41,7 +41,7 @@ except ImportError:
c0acebf
     # see an exception raised if _fastmath exists but cannot be imported,
c0acebf
     # uncomment the below
c0acebf
     #
c0acebf
-    # from distutils.sysconfig import get_config_var
c0acebf
+    # from sysconfig import get_config_var
c0acebf
     # import inspect, os
c0acebf
     # _fm_path = os.path.normpath(os.path.dirname(os.path.abspath(
c0acebf
         # inspect.getfile(inspect.currentframe())))
c0acebf
--- setup.py
c0acebf
+++ setup.py
c0acebf
@@ -1,6 +1,6 @@
c0acebf
 #! /usr/bin/env python
c0acebf
 #
c0acebf
-#  setup.py : Distutils setup script
c0acebf
+#  setup.py : setuptools setup script
c0acebf
 #
c0acebf
 #  Part of the Python Cryptography Toolkit
c0acebf
 #
c0acebf
@@ -36,11 +36,10 @@
c0acebf
 
c0acebf
 __revision__ = "$Id$"
c0acebf
 
c0acebf
-from distutils import core
c0acebf
-from distutils.ccompiler import new_compiler
c0acebf
-from distutils.core import Extension, Command
c0acebf
-from distutils.command.build import build
c0acebf
-from distutils.command.build_ext import build_ext
c0acebf
+from setuptools import setup
c0acebf
+from setuptools.command.build_ext import new_compiler
c0acebf
+from setuptools import Extension, Command
c0acebf
+from setuptools.command.build_ext import build_ext
c0acebf
 import os, sys, re
c0acebf
 import struct
c0acebf
 
c0acebf
@@ -53,8 +52,7 @@ if sys.version[0:1] != '3':
c0acebf
 # .gcov files
c0acebf
 USE_GCOV = 0
c0acebf
 
c0acebf
-
c0acebf
-from distutils.command.build_py import build_py
c0acebf
+from setuptools.command.build_py import build_py
c0acebf
 
c0acebf
 # Work around the print / print() issue with Python 2.x and 3.x. We only need
c0acebf
 # to print at one point of the code, which makes this easy
c0acebf
@@ -385,7 +383,7 @@ kw = {'name':"pycrypto",
c0acebf
     ]
c0acebf
 }
c0acebf
 
c0acebf
-core.setup(**kw)
c0acebf
+setup(**kw)
c0acebf
 
c0acebf
 def touch(path):
c0acebf
     import os, time