Remove sys.platform == 'riscos' checks from some Python and test files. #16501
This commit is contained in:
parent
8473e5740f
commit
de0b962998
|
@ -300,9 +300,7 @@ def getsitepackages(prefixes=None):
|
||||||
continue
|
continue
|
||||||
seen.add(prefix)
|
seen.add(prefix)
|
||||||
|
|
||||||
if sys.platform == 'riscos':
|
if os.sep == '/':
|
||||||
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
|
|
||||||
elif os.sep == '/':
|
|
||||||
sitepackages.append(os.path.join(prefix, "lib",
|
sitepackages.append(os.path.join(prefix, "lib",
|
||||||
"python" + sys.version[:3],
|
"python" + sys.version[:3],
|
||||||
"site-packages"))
|
"site-packages"))
|
||||||
|
|
|
@ -191,7 +191,6 @@ def _getuserbase():
|
||||||
def joinuser(*args):
|
def joinuser(*args):
|
||||||
return os.path.expanduser(os.path.join(*args))
|
return os.path.expanduser(os.path.join(*args))
|
||||||
|
|
||||||
# what about 'riscos' ?
|
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
base = os.environ.get("APPDATA") or "~"
|
base = os.environ.get("APPDATA") or "~"
|
||||||
if env_base:
|
if env_base:
|
||||||
|
|
|
@ -5,7 +5,7 @@ import sys
|
||||||
import unittest
|
import unittest
|
||||||
from test import support
|
from test import support
|
||||||
|
|
||||||
@unittest.skipIf((sys.platform[:3]=='win') or (sys.platform=='riscos'),
|
@unittest.skipIf((sys.platform[:3]=='win'),
|
||||||
"can't easily test on this system")
|
"can't easily test on this system")
|
||||||
class SelectTestCase(unittest.TestCase):
|
class SelectTestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,6 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
threading = None
|
threading = None
|
||||||
|
|
||||||
if sys.platform == 'riscos':
|
|
||||||
raise unittest.SkipTest("Can't test signal on %s" % sys.platform)
|
|
||||||
|
|
||||||
|
|
||||||
class HandlerBCalled(Exception):
|
class HandlerBCalled(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -222,11 +222,7 @@ class HelperFunctionsTests(unittest.TestCase):
|
||||||
site.PREFIXES = ['xoxo']
|
site.PREFIXES = ['xoxo']
|
||||||
dirs = site.getsitepackages()
|
dirs = site.getsitepackages()
|
||||||
|
|
||||||
if sys.platform == 'riscos':
|
if (sys.platform == "darwin" and
|
||||||
self.assertEqual(len(dirs), 1)
|
|
||||||
wanted = os.path.join('xoxo', 'Lib', 'site-packages')
|
|
||||||
self.assertEqual(dirs[0], wanted)
|
|
||||||
elif (sys.platform == "darwin" and
|
|
||||||
sysconfig.get_config_var("PYTHONFRAMEWORK")):
|
sysconfig.get_config_var("PYTHONFRAMEWORK")):
|
||||||
# OS X framework builds
|
# OS X framework builds
|
||||||
site.PREFIXES = ['Python.framework']
|
site.PREFIXES = ['Python.framework']
|
||||||
|
|
|
@ -8,7 +8,7 @@ from test.support import run_unittest, import_module
|
||||||
thread = import_module('_thread')
|
thread = import_module('_thread')
|
||||||
import time
|
import time
|
||||||
|
|
||||||
if (sys.platform[:3] == 'win') or (sys.platform=='riscos'):
|
if (sys.platform[:3] == 'win'):
|
||||||
raise unittest.SkipTest("Can't test signal on %s" % sys.platform)
|
raise unittest.SkipTest("Can't test signal on %s" % sys.platform)
|
||||||
|
|
||||||
process_pid = os.getpid()
|
process_pid = os.getpid()
|
||||||
|
|
Loading…
Reference in New Issue