Skip to content

Commit

Permalink
Fix mypyc build errors on master
Browse files Browse the repository at this point in the history
The latest release of `types-setuptools` is causing type-check errors (and, therefore, build errors) on the `master` branch: see, e.g. https://github.com/python/mypy/actions/runs/4275505309/jobs/7442902732. python#14781 addressed some of the new errors, but didn't quite fix the build.
  • Loading branch information
AlexWaygood authored Feb 26, 2023
1 parent ab7b69a commit 8e459ea
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mypyc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ def get_extension() -> type[Extension]:
# We can work with either setuptools or distutils, and pick setuptools
# if it has been imported.
use_setuptools = "setuptools" in sys.modules
extension_class: type[Extension]

if not use_setuptools:
from distutils.core import Extension
from distutils.core import Extension as extension_class
else:
from setuptools import Extension
from setuptools import Extension as extension_class

return Extension
return extension_class


def setup_mypycify_vars() -> None:
Expand Down

0 comments on commit 8e459ea

Please sign in to comment.