X7ROOT File Manager
Current Path:
/usr/lib/python3.6/site-packages/setuptools/command
usr
/
lib
/
python3.6
/
site-packages
/
setuptools
/
command
/
??
..
??
__init__.py
(594 B)
??
__pycache__
??
alias.py
(2.37 KB)
??
bdist_egg.py
(17.76 KB)
??
bdist_rpm.py
(1.47 KB)
??
bdist_wininst.py
(637 B)
??
build_clib.py
(4.38 KB)
??
build_ext.py
(12.86 KB)
??
build_py.py
(9.37 KB)
??
develop.py
(7.86 KB)
??
dist_info.py
(960 B)
??
easy_install.py
(85.16 KB)
??
egg_info.py
(24.22 KB)
??
install.py
(4.57 KB)
??
install_egg_info.py
(2.15 KB)
??
install_lib.py
(3.75 KB)
??
install_scripts.py
(2.38 KB)
??
launcher manifest.xml
(628 B)
??
py36compat.py
(4.87 KB)
??
register.py
(270 B)
??
rotate.py
(2.11 KB)
??
saveopts.py
(658 B)
??
sdist.py
(6.55 KB)
??
setopt.py
(4.97 KB)
??
test.py
(9 KB)
??
upload.py
(1.14 KB)
??
upload_docs.py
(7.14 KB)
Editing: 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
Upload File
Create Folder