Mercurial > p > roundup > code
view roundup/dist/command/bdist_rpm.py @ 5661:b08a308c273b
Better display for Link/Multilink and content
Link/Multilink are now displayed as a dictionary by default. The format
is controlled by the setting of the @verbose option. With @verbose=0 we
get the old behavior displaying only the id. With the default @verbose=1
we get a dictionary with the id and a link inside. With @verbose=2 or
larger we get the label property in the dictionary in addition (e.g. the
name of a status or the name of a file).
The content property is also handled differently now. For @verbose < 2
we get a dictionary with a link property in it. The property points to
the standard download link for the content (or message). For
@verbose >= 2 we get the previous behavior, the content property as a
possibly very large json string.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Fri, 22 Mar 2019 14:03:37 +0100 |
| parents | e233d7a66343 |
| children | 42bf0a707763 |
line wrap: on
line source
# # Copyright (C) 2009 Stefan Seefeld # All rights reserved. # For license terms see the file COPYING.txt. # from distutils.command.bdist_rpm import bdist_rpm as base from distutils.file_util import write_file import os class bdist_rpm(base): def finalize_options(self): base.finalize_options(self) if self.install_script: # install script is overridden. skip default return # install script option must be file name. # create the file in rpm build directory. install_script = os.path.join(self.rpm_base, "install.sh") self.mkpath(self.rpm_base) self.execute(write_file, (install_script, [ ("%s setup.py install --root=$RPM_BUILD_ROOT " "--record=ROUNDUP_FILES") % self.python, # allow any additional extension for man pages # (rpm may compress them to .gz or .bz2) # man page here is any file # with single-character extension # in man directory "sed -e 's,\(/man/.*\..\)$,\\1*,' " "<ROUNDUP_FILES >INSTALLED_FILES", ]), "writing '%s'" % install_script) self.install_script = install_script
