|
| 1 | +{ |
| 2 | + "image": "ghcr.io/python/devcontainer:latest", |
| 3 | + "onCreateCommand": [ |
| 4 | + // Install common tooling. |
| 5 | + "dnf", |
| 6 | + "install", |
| 7 | + "-y", |
| 8 | + // For umask fix below. |
| 9 | + "/usr/bin/setfacl" |
| 10 | + ], |
| 11 | + "updateContentCommand": { |
| 12 | + // Using the shell for `nproc` usage. |
| 13 | + "python": "./configure --config-cache --with-pydebug && make -s -j `nproc`", |
| 14 | + "docs": [ |
| 15 | + "make", |
| 16 | + "--directory", |
| 17 | + "Doc", |
| 18 | + "venv", |
| 19 | + "html" |
| 20 | + ] |
| 21 | + }, |
| 22 | + "postCreateCommand": { |
| 23 | + // https://github.com/orgs/community/discussions/26026 |
| 24 | + "umask fix: workspace": ["sudo", "setfacl", "-bnR", "."], |
| 25 | + "umask fix: /tmp": ["sudo", "setfacl", "-bnR", "/tmp"] |
| 26 | + }, |
| 27 | + "customizations": { |
| 28 | + "vscode": { |
| 29 | + "extensions": [ |
| 30 | + // Highlighting for Parser/Python.asdl. |
| 31 | + "brettcannon.zephyr-asdl", |
| 32 | + // Highlighting for configure.ac. |
| 33 | + "maelvalais.autoconf", |
| 34 | + // C auto-complete. |
| 35 | + "ms-vscode.cpptools", |
| 36 | + // To view HTML build of docs. |
| 37 | + "ms-vscode.live-server", |
| 38 | + // Python auto-complete. |
| 39 | + "ms-python.python" |
| 40 | + ], |
| 41 | + "settings": { |
| 42 | + "C_Cpp.default.compilerPath": "/usr/bin/clang", |
| 43 | + "C_Cpp.default.cStandard": "c11", |
| 44 | + "C_Cpp.default.defines": [ |
| 45 | + "CONFIG_64", |
| 46 | + "Py_BUILD_CORE" |
| 47 | + ], |
| 48 | + "C_Cpp.default.includePath": [ |
| 49 | + "${workspaceFolder}/*", |
| 50 | + "${workspaceFolder}/Include/**" |
| 51 | + ], |
| 52 | + // https://github.com/microsoft/vscode-cpptools/issues/10732 |
| 53 | + "C_Cpp.errorSquiggles": "disabled", |
| 54 | + "editor.insertSpaces": true, |
| 55 | + "editor.rulers": [ |
| 56 | + 80 |
| 57 | + ], |
| 58 | + "editor.tabSize": 4, |
| 59 | + "editor.trimAutoWhitespace": true, |
| 60 | + "files.associations": { |
| 61 | + "*.h": "c" |
| 62 | + }, |
| 63 | + "files.encoding": "utf8", |
| 64 | + "files.eol": "\n", |
| 65 | + "files.insertFinalNewline": true, |
| 66 | + "files.trimTrailingWhitespace": true, |
| 67 | + "python.analysis.diagnosticSeverityOverrides": { |
| 68 | + // Complains about shadowing the stdlib w/ the stdlib. |
| 69 | + "reportShadowedImports": "none", |
| 70 | + // Doesn't like _frozen_importlib. |
| 71 | + "reportMissingImports": "none" |
| 72 | + }, |
| 73 | + "python.analysis.extraPaths": [ |
| 74 | + "Lib" |
| 75 | + ], |
| 76 | + "python.defaultInterpreterPath": "./python", |
| 77 | + "[restructuredtext]": { |
| 78 | + "editor.tabSize": 3 |
| 79 | + } |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | +} |
0 commit comments