MCPcopy
hub / github.com/Nuitka/Nuitka / _getModuleFilenames

Function _getModuleFilenames

nuitka/MainControl.py:423–443  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

421 collision_filenames = set()
422
423 def _getModuleFilenames(module):
424 nice_filename = getNormalizedPathJoin(
425 source_dir, "module." + module.getFullName()
426 )
427
428 # Note: Could detect if the file system is cases sensitive in source_dir
429 # or not, but that's probably not worth the effort. False positives do
430 # no harm at all. We cannot use normcase, as macOS is not using one that
431 # will tell us the truth.
432 collision_filename = getNormalizedPathJoin(
433 source_dir, "module." + module.getFullName().asString().lower()
434 )
435
436 # When the filename becomes to long to add ".const", we use a hash name
437 # instead.
438 hash_filename = getNormalizedPathJoin(
439 source_dir,
440 "module.hashed_" + module.getFullName().asLegalFilename(name_limit=1),
441 )
442
443 return nice_filename, collision_filename, hash_filename
444
445 colliding_filenames = set()
446

Callers 1

pickSourceFilenamesFunction · 0.85

Calls 4

getNormalizedPathJoinFunction · 0.90
getFullNameMethod · 0.80
asLegalFilenameMethod · 0.80
asStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…