SILENT KILLERPanel

Current Path: > > lib > python3.6 > site-packages > setuptools > command >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/python3.6/site-packages/setuptools/command/

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
__init__.py File 594 bytes July 15 2025 09:13:40.
alias.py File 2426 bytes July 15 2025 09:13:40.
bdist_egg.py File 18185 bytes July 15 2025 09:13:40.
bdist_rpm.py File 1508 bytes July 15 2025 09:13:40.
bdist_wininst.py File 637 bytes July 15 2025 09:13:40.
build_clib.py File 4484 bytes July 15 2025 09:13:40.
build_ext.py File 13173 bytes July 15 2025 09:13:40.
build_py.py File 9596 bytes July 15 2025 09:13:40.
develop.py File 8046 bytes July 15 2025 09:13:40.
dist_info.py File 960 bytes July 15 2025 09:13:40.
easy_install.py File 87204 bytes July 15 2025 09:13:40.
egg_info.py File 24800 bytes July 15 2025 09:13:40.
install.py File 4683 bytes July 15 2025 09:13:40.
install_egg_info.py File 2203 bytes July 15 2025 09:13:40.
install_lib.py File 3840 bytes July 15 2025 09:13:40.
install_scripts.py File 2439 bytes July 15 2025 09:13:40.
launcher manifest.xml File 628 bytes July 15 2025 09:13:40.
py36compat.py File 4986 bytes July 15 2025 09:13:40.
register.py File 270 bytes July 15 2025 09:13:40.
rotate.py File 2164 bytes July 15 2025 09:13:40.
saveopts.py File 658 bytes July 15 2025 09:13:40.
sdist.py File 6711 bytes July 15 2025 09:13:40.
setopt.py File 5085 bytes July 15 2025 09:13:40.
test.py File 9214 bytes July 15 2025 09:13:40.
upload.py File 1172 bytes July 15 2025 09:13:40.
upload_docs.py File 7311 bytes July 15 2025 09:13:40.

Reading File: //lib/python3.6/site-packages/setuptools/command//rotate.py

from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
import os
import shutil

from setuptools.extern import six

from setuptools import Command


class rotate(Command):
    """Delete older distributions"""

    description = "delete older distributions, keeping N newest files"
    user_options = [
        ('match=', 'm', "patterns to match (required)"),
        ('dist-dir=', 'd', "directory where the distributions are"),
        ('keep=', 'k', "number of matching distributions to keep"),
    ]

    boolean_options = []

    def initialize_options(self):
        self.match = None
        self.dist_dir = None
        self.keep = None

    def finalize_options(self):
        if self.match is None:
            raise DistutilsOptionError(
                "Must specify one or more (comma-separated) match patterns "
                "(e.g. '.zip' or '.egg')"
            )
        if self.keep is None:
            raise DistutilsOptionError("Must specify number of files to keep")
        try:
            self.keep = int(self.keep)
        except ValueError:
            raise DistutilsOptionError("--keep must be an integer")
        if isinstance(self.match, six.string_types):
            self.match = [
                convert_path(p.strip()) for p in self.match.split(',')
            ]
        self.set_undefined_options('bdist', ('dist_dir', 'dist_dir'))

    def run(self):
        self.run_command("egg_info")
        from glob import glob

        for pattern in self.match:
            pattern = self.distribution.get_name() + '*' + pattern
            files = glob(os.path.join(self.dist_dir, pattern))
            files = [(os.path.getmtime(f), f) for f in files]
            files.sort()
            files.reverse()

            log.info("%d file(s) matching %s", len(files), pattern)
            files = files[self.keep:]
            for (t, f) in files:
                log.info("Deleting %s", f)
                if not self.dry_run:
                    if os.path.isdir(f):
                        shutil.rmtree(f)
                    else:
                        os.unlink(f)

SILENT KILLER Tool