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/python3.6/site-packages/setuptools/command/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3.6/site-packages/setuptools/command/bdist_rpm.py
import distutils.command.bdist_rpm as orig


class bdist_rpm(orig.bdist_rpm):
    """
    Override the default bdist_rpm behavior to do the following:

    1. Run egg_info to ensure the name and version are properly calculated.
    2. Always run 'install' using --single-version-externally-managed to
       disable eggs in RPM distributions.
    3. Replace dash with underscore in the version numbers for better RPM
       compatibility.
    """

    def run(self):
        # ensure distro name is up-to-date
        self.run_command('egg_info')

        orig.bdist_rpm.run(self)

    def _make_spec_file(self):
        version = self.distribution.get_version()
        rpmversion = version.replace('-', '_')
        spec = orig.bdist_rpm._make_spec_file(self)
        line23 = '%define version ' + version
        line24 = '%define version ' + rpmversion
        spec = [
            line.replace(
                "Source0: %{name}-%{version}.tar",
                "Source0: %{name}-%{unmangled_version}.tar"
            ).replace(
                "setup.py install ",
                "setup.py install --single-version-externally-managed "
            ).replace(
                "%setup",
                "%setup -n %{name}-%{unmangled_version}"
            ).replace(line23, line24)
            for line in spec
        ]
        insert_loc = spec.index(line24) + 1
        unmangled_version = "%define unmangled_version " + version
        spec.insert(insert_loc, unmangled_version)
        return spec
Name
Size
Permissions
Options
__pycache__
--
drwxr-xr-x
__init__.py
0.58 KB
-rw-r--r--
alias.py
2.369 KB
-rw-r--r--
bdist_egg.py
17.759 KB
-rw-r--r--
bdist_rpm.py
1.473 KB
-rw-r--r--
bdist_wininst.py
0.622 KB
-rw-r--r--
build_clib.py
4.379 KB
-rw-r--r--
build_ext.py
12.864 KB
-rw-r--r--
build_py.py
9.371 KB
-rw-r--r--
develop.py
7.857 KB
-rw-r--r--
dist_info.py
0.938 KB
-rw-r--r--
easy_install.py
85.16 KB
-rw-r--r--
egg_info.py
24.219 KB
-rw-r--r--
install.py
4.573 KB
-rw-r--r--
install_egg_info.py
2.151 KB
-rw-r--r--
install_lib.py
3.75 KB
-rw-r--r--
install_scripts.py
2.382 KB
-rw-r--r--
launcher manifest.xml
0.613 KB
-rw-r--r--
py36compat.py
4.869 KB
-rw-r--r--
register.py
0.264 KB
-rw-r--r--
rotate.py
2.113 KB
-rw-r--r--
saveopts.py
0.643 KB
-rw-r--r--
sdist.py
6.554 KB
-rw-r--r--
setopt.py
4.966 KB
-rw-r--r--
test.py
8.998 KB
-rw-r--r--
upload.py
1.145 KB
-rw-r--r--
upload_docs.py
7.14 KB
-rw-r--r--