Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /opt/alt/python27/lib/python2.7/site-packages/setuptools/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python27/lib/python2.7/site-packages/setuptools/extension.py
import re
import functools
import distutils.core
import distutils.errors
import distutils.extension

from setuptools.extern.six.moves import map

from .monkey import get_unpatched


def _have_cython():
    """
    Return True if Cython can be imported.
    """
    cython_impl = 'Cython.Distutils.build_ext'
    try:
        # from (cython_impl) import build_ext
        __import__(cython_impl, fromlist=['build_ext']).build_ext
        return True
    except Exception:
        pass
    return False


# for compatibility
have_pyrex = _have_cython

_Extension = get_unpatched(distutils.core.Extension)


class Extension(_Extension):
    """Extension that uses '.c' files in place of '.pyx' files"""

    def __init__(self, name, sources, *args, **kw):
        # The *args is needed for compatibility as calls may use positional
        # arguments. py_limited_api may be set only via keyword.
        self.py_limited_api = kw.pop("py_limited_api", False)
        _Extension.__init__(self, name, sources, *args, **kw)

    def _convert_pyx_sources_to_lang(self):
        """
        Replace sources with .pyx extensions to sources with the target
        language extension. This mechanism allows language authors to supply
        pre-converted sources but to prefer the .pyx sources.
        """
        if _have_cython():
            # the build has Cython, so allow it to compile the .pyx files
            return
        lang = self.language or ''
        target_ext = '.cpp' if lang.lower() == 'c++' else '.c'
        sub = functools.partial(re.sub, '.pyx$', target_ext)
        self.sources = list(map(sub, self.sources))


class Library(Extension):
    """Just like a regular Extension, but built as a library instead"""
Name
Size
Permissions
Options
command
--
drwxr-xr-x
extern
--
drwxr-xr-x
__init__.py
4.919 KB
-rw-r--r--
__init__.pyc
7.914 KB
-rw-r--r--
archive_util.py
6.458 KB
-rw-r--r--
archive_util.pyc
6.661 KB
-rw-r--r--
config.py
15.935 KB
-rw-r--r--
config.pyc
19.261 KB
-rw-r--r--
dep_util.py
0.913 KB
-rw-r--r--
dep_util.pyc
1.103 KB
-rw-r--r--
depends.py
5.7 KB
-rw-r--r--
depends.pyc
7.292 KB
-rw-r--r--
dist.py
39.359 KB
-rw-r--r--
dist.pyc
43.612 KB
-rw-r--r--
extension.py
1.688 KB
-rw-r--r--
extension.pyc
2.842 KB
-rw-r--r--
glob.py
5.085 KB
-rw-r--r--
glob.pyc
5.586 KB
-rw-r--r--
launch.py
0.769 KB
-rw-r--r--
launch.pyc
1.137 KB
-rw-r--r--
lib2to3_ex.py
1.966 KB
-rw-r--r--
lib2to3_ex.pyc
3.654 KB
-rw-r--r--
monkey.py
5.655 KB
-rw-r--r--
monkey.pyc
7.241 KB
-rw-r--r--
msvc.py
39.926 KB
-rw-r--r--
msvc.pyc
45.896 KB
-rw-r--r--
namespaces.py
3.124 KB
-rw-r--r--
namespaces.pyc
5.876 KB
-rw-r--r--
package_index.py
39.034 KB
-rw-r--r--
package_index.pyc
45.489 KB
-rw-r--r--
py26compat.py
0.663 KB
-rw-r--r--
py26compat.pyc
1.587 KB
-rw-r--r--
py27compat.py
0.523 KB
-rw-r--r--
py27compat.pyc
1.341 KB
-rw-r--r--
py31compat.py
1.606 KB
-rw-r--r--
py31compat.pyc
2.88 KB
-rw-r--r--
py33compat.py
0.975 KB
-rw-r--r--
py33compat.pyc
1.787 KB
-rw-r--r--
py36compat.py
2.823 KB
-rw-r--r--
py36compat.pyc
3.195 KB
-rw-r--r--
sandbox.py
14.208 KB
-rw-r--r--
sandbox.pyc
22.996 KB
-rw-r--r--
script (dev).tmpl
0.196 KB
-rw-r--r--
script.tmpl
0.135 KB
-rw-r--r--
site-patch.py
2.253 KB
-rw-r--r--
site-patch.pyc
1.858 KB
-rw-r--r--
ssl_support.py
8.027 KB
-rw-r--r--
ssl_support.pyc
9.781 KB
-rw-r--r--
unicode_utils.py
0.973 KB
-rw-r--r--
unicode_utils.pyc
1.758 KB
-rw-r--r--
version.py
0.141 KB
-rw-r--r--
version.pyc
0.395 KB
-rw-r--r--
windows_support.py
0.697 KB
-rw-r--r--
windows_support.pyc
1.564 KB
-rw-r--r--