Commits

Rob Managan committed 025dcd2

import SCons.Platform and use its platform_default instead of copying the source

Comments (0)

Files changed (1)

test/LINK/VersionedLib.py

 import sys
 import TestSCons
 
-# copied from SCons/Platform/__init__.py
-def platform_default():
-    """Return the platform string for our execution environment.
-
-    The returned value should map to one of the SCons/Platform/*.py
-    files.  Since we're architecture independent, though, we don't
-    care about the machine architecture.
-    """
-    osname = os.name
-    if osname == 'java':
-        osname = os._osType
-    if osname == 'posix':
-        if sys.platform == 'cygwin':
-            return 'cygwin'
-        elif sys.platform.find('irix') != -1:
-            return 'irix'
-        elif sys.platform.find('sunos') != -1:
-            return 'sunos'
-        elif sys.platform.find('hp-ux') != -1:
-            return 'hpux'
-        elif sys.platform.find('aix') != -1:
-            return 'aix'
-        elif sys.platform.find('darwin') != -1:
-            return 'darwin'
-        else:
-            return 'posix'
-    elif os.name == 'os2':
-        return 'os2'
-    else:
-        return sys.platform
+import SCons.Platform
 
 _exe = TestSCons._exe
 
 }
 """)
 
-platform = platform_default()
+platform = SCons.Platform.platform_default()
+
 
 test.run()
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.