Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d9c808d

Browse files
itsankitkpyouknowone
authored andcommitted
Fix site and test_site for rustpython
1 parent ba6757a commit d9c808d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/site.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def joinuser(*args):
275275

276276
if os.name == "nt":
277277
base = os.environ.get("APPDATA") or "~"
278-
return joinuser(base, "Python")
278+
return joinuser(base, "RustPython")
279279

280280
if sys.platform == "darwin" and sys._framework:
281281
return joinuser("~", "Library", sys._framework,
@@ -368,7 +368,7 @@ def getsitepackages(prefixes=None):
368368

369369
for libdir in libdirs:
370370
path = os.path.join(prefix, libdir,
371-
"python%d.%d" % sys.version_info[:2],
371+
"rustpython%d.%d" % sys.version_info[:2],
372372
"site-packages")
373373
sitepackages.append(path)
374374
else:

Lib/test/test_site.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,13 @@ def test_getsitepackages(self):
288288
if sys.platlibdir != "lib":
289289
self.assertEqual(len(dirs), 2)
290290
wanted = os.path.join('xoxo', sys.platlibdir,
291-
'python%d.%d' % sys.version_info[:2],
291+
'rustpython%d.%d' % sys.version_info[:2],
292292
'site-packages')
293293
self.assertEqual(dirs[0], wanted)
294294
else:
295295
self.assertEqual(len(dirs), 1)
296296
wanted = os.path.join('xoxo', 'lib',
297-
'python%d.%d' % sys.version_info[:2],
297+
'rustpython%d.%d' % sys.version_info[:2],
298298
'site-packages')
299299
self.assertEqual(dirs[-1], wanted)
300300
else:

0 commit comments

Comments
 (0)