Debian Codegraph @

pypy/module/__pypy__/interp_os.py

raw symbols SCIP
1 import os
2
3 from pypy.interpreter.gateway import unwrap_spec
4 from rpython.translator.platform import platform as compiler
5
6
7 @unwrap_spec(name='text0')
8 def real_getenv(space, name):
9 """Get an OS environment value skipping Python cache"""
10 return space.newtext_or_none(os.environ.get(name))
11
12 # For annotation, pre-build this as a global
13 _multiarch = compiler.get_multiarch()
14
15 def _get_multiarch(space):
16 """Get the platform-specific multiarch label.
17
18 On linux, this returns something like "x86_64-linux-gnu"
19 On macOS this returns "darwin" for CPython compatibility
20 On windows it returns ""
21 """
22 return space.newtext(_multiarch)
23
24