(path, names)
| 2831 | |
| 2832 | # Ignore function for shutil.copytree() to copy the Python source code. |
| 2833 | def 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? |
searching dependent graphs…