Last active
July 6, 2020 19:30
-
-
Save dmoisset/c33de64f4a93417e8f46726f58c99283 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://github.com/python/cpython/blob/9538bc9185e934bee2bd5ae2cda2b2e92a61906d/Lib/distutils/command/build_ext.py#L357-L385 | |
match ext: | |
case Extension(): | |
continue | |
case tuple((str(ext_name), {"sources": build_src})) if extension_name_re.match(ext_name): | |
log.warn("old-style (ext_name, build_info) tuple found in " | |
"ext_modules for extension '%s' " | |
"-- please convert to Extension instance", ext_name) | |
ext = Extension(ext_name, build_src) | |
case _: | |
raise DistutilsSetupError( | |
"each element of 'ext_modules' option must be an " | |
"Extension instance or (string, dict) tuple") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment