mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
Updates vendored setuptools to 44.1.1
This commit is contained in:
parent
3a2e09c26e
commit
d8da02cb69
55 changed files with 2910 additions and 1457 deletions
|
@ -1,7 +1,6 @@
|
|||
import os
|
||||
import sys
|
||||
import itertools
|
||||
import imp
|
||||
from distutils.command.build_ext import build_ext as _du_build_ext
|
||||
from distutils.file_util import copy_file
|
||||
from distutils.ccompiler import new_compiler
|
||||
|
@ -12,6 +11,13 @@ from distutils import log
|
|||
from setuptools.extension import Library
|
||||
from setuptools.extern import six
|
||||
|
||||
if six.PY2:
|
||||
import imp
|
||||
|
||||
EXTENSION_SUFFIXES = [s for s, _, tp in imp.get_suffixes() if tp == imp.C_EXTENSION]
|
||||
else:
|
||||
from importlib.machinery import EXTENSION_SUFFIXES
|
||||
|
||||
try:
|
||||
# Attempt to use Cython for building extensions, if available
|
||||
from Cython.Distutils.build_ext import build_ext as _build_ext
|
||||
|
@ -64,7 +70,7 @@ if_dl = lambda s: s if have_rtld else ''
|
|||
|
||||
def get_abi3_suffix():
|
||||
"""Return the file extension for an abi3-compliant Extension()"""
|
||||
for suffix, _, _ in (s for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION):
|
||||
for suffix in EXTENSION_SUFFIXES:
|
||||
if '.abi3' in suffix: # Unix
|
||||
return suffix
|
||||
elif suffix == '.pyd': # Windows
|
||||
|
@ -107,7 +113,7 @@ class build_ext(_build_ext):
|
|||
if fullname in self.ext_map:
|
||||
ext = self.ext_map[fullname]
|
||||
use_abi3 = (
|
||||
six.PY3
|
||||
not six.PY2
|
||||
and getattr(ext, 'py_limited_api')
|
||||
and get_abi3_suffix()
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue