MCPcopy Create free account
hub / github.com/nodejs/node / _NormalizedSource

Function _NormalizedSource

tools/gyp/pylib/gyp/generator/msvs.py:136–151  ·  view source on GitHub ↗

Normalize the path. But not if that gets rid of a variable, as this may expand to something larger than one directory. Arguments: source: The path to be normalize.d Returns: The normalized path.

(source)

Source from the content-addressed store, hash-verified

134
135
136def _NormalizedSource(source):
137 """Normalize the path.
138
139 But not if that gets rid of a variable, as this may expand to something
140 larger than one directory.
141
142 Arguments:
143 source: The path to be normalize.d
144
145 Returns:
146 The normalized path.
147 """
148 normalized = os.path.normpath(source)
149 if source.count("$") == normalized.count("$"):
150 source = normalized
151 return source
152
153
154def _FixPath(path, separator="\\"):

Callers 5

_FixPathFunction · 0.85
_GenerateMSVSProjectFunction · 0.85
_AddNormalizedSourcesFunction · 0.85
_PrepareListOfSourcesFunction · 0.85

Calls 1

countMethod · 0.45

Tested by

no test coverage detected