[Distutils] bdist_rpm

Fred L. Drake, Jr. fdrake@acm.org
Tue, 25 Apr 2000 00:12:56 -0400 (EDT)

Greg Ward writes:
 > Any RPM-specific options should be supplied to bdist_rpm, ie. if you
 > want to do anything out of the ordinary, you need to run bdist_rpm,
 > rather than "bdist --format={rpm,srpm}".

  Sounds like a reasonable plan.

 > There should be a "--arch" ("--plat"?) option to "build_rpm" to let
 > people specify the RPM architecture string; it should default to the
 > result of 'util.get_platform()' (eg. "linux2-i586", "sunos5-sun4u").


 > Some rules/heuristics/hacks:
 >   * if not self.distribution.has_ext_modules():
 >         use "noarch" for the architecture specification in the RPM
 >   MAYBE:
 >   * if util.get_platform() =~ /linux-i\d86/:
 >         use "i386" for the architecture specification in the RPM
 > The latter strikes me as vaguely ugly, but it will make life easier for
 > people generating RPMs for i86 Linux boxen.  Perhaps a similar hack

  It seems that for each util.get_platform() there will be a single
value; these can simply be cataloged and a dictionary containing the
mapping stored in the sources (it's not a large dictionary!).


Fred L. Drake, Jr.	  <fdrake at acm.org>
Corporation for National Research Initiatives