Source

SCons / src / engine / SCons / Tool / packaging / rpm.py

Diff from to

File src/engine/SCons/Tool/packaging/rpm.py

 import os
 
 import SCons.Builder
+import SCons.Tool.rpmutils
 
 from SCons.Environment import OverrideEnvironment
 from SCons.Tool.packaging import stripinstallbuilder, src_targz
     else:
         # This should be overridable from the construction environment,
         # which it is by using ARCHITECTURE=.
-        # Guessing based on what os.uname() returns at least allows it
-        # to work for both i386 and x86_64 Linux systems.
-        archmap = {
-            'i686'  : 'i386',
-            'i586'  : 'i386',
-            'i486'  : 'i386',
-        }
-
-        buildarchitecture = os.uname()[4]
-        buildarchitecture = archmap.get(buildarchitecture, buildarchitecture)
+        buildarchitecture = SCons.Tool.rpmutils.defaultMachine()
 
         if 'ARCHITECTURE' in kw:
             buildarchitecture = kw['ARCHITECTURE']