Import setuptools before distutils in setup.py
Setuptools really dislikes when it is imported _after_ distutils, so
switch the import order.
@@ -22,20 +22,19 @@ import os
import os.path
import pathlib
import platform
-import re
import shutil
import subprocess
import textwrap
+import setuptools
+from setuptools.command import develop as setuptools_develop
+
import distutils
from distutils import version
from distutils import extension as distutils_extension
from distutils.command import build as distutils_build
from distutils.command import build_ext as distutils_build_ext
-import setuptools
-from setuptools.command import develop as setuptools_develop
-
try:
import setuptools_rust
except ImportError:
