
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").
Why?
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
-- Fred L. Drake, Jr. <fdrake at acm.org> Corporation for National Research Initiatives