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 :  /lib/python2.7/site-packages/setuptools/command/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/setuptools/command/py36compat.py
import os
from glob import glob
from distutils.util import convert_path
from distutils.command import sdist

from setuptools.extern.six.moves import filter


class sdist_add_defaults:
    """
    Mix-in providing forward-compatibility for functionality as found in
    distutils on Python 3.7.

    Do not edit the code in this class except to update functionality
    as implemented in distutils. Instead, override in the subclass.
    """

    def add_defaults(self):
        """Add all the default files to self.filelist:
          - README or README.txt
          - setup.py
          - test/test*.py
          - all pure Python modules mentioned in setup script
          - all files pointed by package_data (build_py)
          - all files defined in data_files.
          - all files defined as scripts.
          - all C sources listed as part of extensions or C libraries
            in the setup script (doesn't catch C headers!)
        Warns if (README or README.txt) or setup.py are missing; everything
        else is optional.
        """
        self._add_defaults_standards()
        self._add_defaults_optional()
        self._add_defaults_python()
        self._add_defaults_data_files()
        self._add_defaults_ext()
        self._add_defaults_c_libs()
        self._add_defaults_scripts()

    @staticmethod
    def _cs_path_exists(fspath):
        """
        Case-sensitive path existence check

        >>> sdist_add_defaults._cs_path_exists(__file__)
        True
        >>> sdist_add_defaults._cs_path_exists(__file__.upper())
        False
        """
        if not os.path.exists(fspath):
            return False
        # make absolute so we always have a directory
        abspath = os.path.abspath(fspath)
        directory, filename = os.path.split(abspath)
        return filename in os.listdir(directory)

    def _add_defaults_standards(self):
        standards = [self.READMES, self.distribution.script_name]
        for fn in standards:
            if isinstance(fn, tuple):
                alts = fn
                got_it = False
                for fn in alts:
                    if self._cs_path_exists(fn):
                        got_it = True
                        self.filelist.append(fn)
                        break

                if not got_it:
                    self.warn("standard file not found: should have one of " +
                              ', '.join(alts))
            else:
                if self._cs_path_exists(fn):
                    self.filelist.append(fn)
                else:
                    self.warn("standard file '%s' not found" % fn)

    def _add_defaults_optional(self):
        optional = ['test/test*.py', 'setup.cfg']
        for pattern in optional:
            files = filter(os.path.isfile, glob(pattern))
            self.filelist.extend(files)

    def _add_defaults_python(self):
        # build_py is used to get:
        #  - python modules
        #  - files defined in package_data
        build_py = self.get_finalized_command('build_py')

        # getting python files
        if self.distribution.has_pure_modules():
            self.filelist.extend(build_py.get_source_files())

        # getting package_data files
        # (computed in build_py.data_files by build_py.finalize_options)
        for pkg, src_dir, build_dir, filenames in build_py.data_files:
            for filename in filenames:
                self.filelist.append(os.path.join(src_dir, filename))

    def _add_defaults_data_files(self):
        # getting distribution.data_files
        if self.distribution.has_data_files():
            for item in self.distribution.data_files:
                if isinstance(item, str):
                    # plain file
                    item = convert_path(item)
                    if os.path.isfile(item):
                        self.filelist.append(item)
                else:
                    # a (dirname, filenames) tuple
                    dirname, filenames = item
                    for f in filenames:
                        f = convert_path(f)
                        if os.path.isfile(f):
                            self.filelist.append(f)

    def _add_defaults_ext(self):
        if self.distribution.has_ext_modules():
            build_ext = self.get_finalized_command('build_ext')
            self.filelist.extend(build_ext.get_source_files())

    def _add_defaults_c_libs(self):
        if self.distribution.has_c_libraries():
            build_clib = self.get_finalized_command('build_clib')
            self.filelist.extend(build_clib.get_source_files())

    def _add_defaults_scripts(self):
        if self.distribution.has_scripts():
            build_scripts = self.get_finalized_command('build_scripts')
            self.filelist.extend(build_scripts.get_source_files())


if hasattr(sdist.sdist, '_add_defaults_standards'):
    # disable the functionality already available upstream
    class sdist_add_defaults:
        pass
Name
Size
Permissions
Options
__init__.py
0.58 KB
-rw-r--r--
__init__.pyc
0.861 KB
-rw-r--r--
__init__.pyo
0.861 KB
-rw-r--r--
alias.py
2.369 KB
-rw-r--r--
alias.pyc
3.025 KB
-rw-r--r--
alias.pyo
3.025 KB
-rw-r--r--
bdist_egg.py
17.759 KB
-rw-r--r--
bdist_egg.pyc
17.957 KB
-rw-r--r--
bdist_egg.pyo
17.957 KB
-rw-r--r--
bdist_rpm.py
1.473 KB
-rw-r--r--
bdist_rpm.pyc
1.869 KB
-rw-r--r--
bdist_rpm.pyo
1.869 KB
-rw-r--r--
bdist_wininst.py
0.622 KB
-rw-r--r--
bdist_wininst.pyc
1.163 KB
-rw-r--r--
bdist_wininst.pyo
1.163 KB
-rw-r--r--
build_clib.py
4.379 KB
-rw-r--r--
build_clib.pyc
2.777 KB
-rw-r--r--
build_clib.pyo
2.777 KB
-rw-r--r--
build_ext.py
12.864 KB
-rw-r--r--
build_ext.pyc
12.276 KB
-rw-r--r--
build_ext.pyo
12.233 KB
-rw-r--r--
build_py.py
9.371 KB
-rw-r--r--
build_py.pyc
10.417 KB
-rw-r--r--
build_py.pyo
10.417 KB
-rw-r--r--
develop.py
7.857 KB
-rw-r--r--
develop.pyc
7.715 KB
-rw-r--r--
develop.pyo
7.715 KB
-rw-r--r--
dist_info.py
0.938 KB
-rw-r--r--
dist_info.pyc
1.757 KB
-rw-r--r--
dist_info.pyo
1.757 KB
-rw-r--r--
easy_install.py
84.992 KB
-rw-r--r--
easy_install.pyc
78.498 KB
-rw-r--r--
easy_install.pyo
78.442 KB
-rw-r--r--
egg_info.py
24.219 KB
-rw-r--r--
egg_info.pyc
25.289 KB
-rw-r--r--
egg_info.pyo
25.289 KB
-rw-r--r--
install.py
4.573 KB
-rw-r--r--
install.pyc
4.837 KB
-rw-r--r--
install.pyo
4.837 KB
-rw-r--r--
install_egg_info.py
2.151 KB
-rw-r--r--
install_egg_info.pyc
3.11 KB
-rw-r--r--
install_egg_info.pyo
3.11 KB
-rw-r--r--
install_lib.py
3.75 KB
-rw-r--r--
install_lib.pyc
4.756 KB
-rw-r--r--
install_lib.pyo
4.711 KB
-rw-r--r--
install_scripts.py
2.382 KB
-rw-r--r--
install_scripts.pyc
2.823 KB
-rw-r--r--
install_scripts.pyo
2.823 KB
-rw-r--r--
launcher manifest.xml
0.613 KB
-rw-r--r--
py36compat.py
4.869 KB
-rw-r--r--
py36compat.pyc
5.42 KB
-rw-r--r--
py36compat.pyo
5.42 KB
-rw-r--r--
register.py
0.264 KB
-rw-r--r--
register.pyc
0.693 KB
-rw-r--r--
register.pyo
0.693 KB
-rw-r--r--
rotate.py
2.113 KB
-rw-r--r--
rotate.pyc
2.965 KB
-rw-r--r--
rotate.pyo
2.965 KB
-rw-r--r--
saveopts.py
0.643 KB
-rw-r--r--
saveopts.pyc
1.103 KB
-rw-r--r--
saveopts.pyo
1.103 KB
-rw-r--r--
sdist.py
6.554 KB
-rw-r--r--
sdist.pyc
7.64 KB
-rw-r--r--
sdist.pyo
7.64 KB
-rw-r--r--
setopt.py
4.966 KB
-rw-r--r--
setopt.pyc
5.908 KB
-rw-r--r--
setopt.pyo
5.908 KB
-rw-r--r--
test.py
8.998 KB
-rw-r--r--
test.pyc
10.223 KB
-rw-r--r--
test.pyo
10.223 KB
-rw-r--r--
upload.py
1.145 KB
-rw-r--r--
upload.pyc
1.598 KB
-rw-r--r--
upload.pyo
1.598 KB
-rw-r--r--
upload_docs.py
7.14 KB
-rw-r--r--
upload_docs.pyc
7.658 KB
-rw-r--r--
upload_docs.pyo
7.63 KB
-rw-r--r--