Skip to content

Commit

Permalink
Fix RTD doc compilation
Browse files Browse the repository at this point in the history
aio-libs#810 imports errors from
`setuptools` instead of `distutils`

This is available only starting from `setuptools` v59.0.0
(pypa/setuptools#2858) but RTD currently
defaults to v58.2.0
(https://docs.readthedocs.io/en/stable/builds.html#python)
  • Loading branch information
multani committed Dec 31, 2021
1 parent 798d7c1 commit be291e8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,19 @@
from setuptools import Extension, setup
from setuptools.command.bdist_rpm import bdist_rpm as _bdist_rpm
from setuptools.command.build_ext import build_ext
from setuptools.errors import CCompilerError, ExecError, PlatformError
try:
from setuptools.errors import CCompilerError, ExecError, PlatformError
except ImportError:
# RTD workaround until it ships setuptools>=v59.0.0
# See:
# - https://github.com/pypa/setuptools/pull/2858
# - https://docs.readthedocs.io/en/stable/builds.html#python
from distutils.errors import (
CCompilerError,
DistutilsExecError as ExecError,
DistutilsPlatformError as PlatformError,
)



# Those are needed to build _hton for windows
Expand Down

0 comments on commit be291e8

Please sign in to comment.