MCPcopy Create free account
hub / github.com/python/cpython / copy_python_src_ignore

Function copy_python_src_ignore

Lib/test/support/__init__.py:2833–2849  ·  view source on GitHub ↗
(path, names)

Source from the content-addressed store, hash-verified

2831
2832# Ignore function for shutil.copytree() to copy the Python source code.
2833def copy_python_src_ignore(path, names):
2834 ignored = _BASE_COPY_SRC_DIR_IGNORED_NAMES
2835 if os.path.basename(path) == 'Doc':
2836 ignored |= {
2837 # SRC_DIR/Doc/build/
2838 'build',
2839 # SRC_DIR/Doc/venv/
2840 'venv',
2841 }
2842
2843 # check if we are at the root of the source code
2844 elif 'Modules' in names:
2845 ignored |= {
2846 # SRC_DIR/build/
2847 'build',
2848 }
2849 return ignored
2850
2851
2852# XXX Move this to the inspect module?

Calls 1

basenameMethod · 0.45

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…