GH-102973: add a dev container (GH-102975) · python/cpython@0b1d9c4 · GitHub
Skip to content

Commit 0b1d9c4

Browse files
brettcannonronaldoussorendusty-phillips
authored
GH-102973: add a dev container (GH-102975)
On content update, builds `python` and the docs. Also adds a Dockerfile that should include everything but autoconf 2.69 that's necessary to build CPython and the entire stdlib on Fedora. Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Dusty Phillips <dusty@phillips.codes>
1 parent d052a38 commit 0b1d9c4

4 files changed

Lines changed: 102 additions & 0 deletions

File tree

‎.devcontainer/Dockerfile‎

Lines changed: 24 additions & 0 deletions

‎.devcontainer/devcontainer.json‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"build": {
3+
"dockerfile": "Dockerfile"
4+
},
5+
"onCreateCommand": [
6+
// Install common tooling.
7+
"dnf",
8+
"install",
9+
"-y",
10+
"which",
11+
"zsh",
12+
"fish"
13+
],
14+
"updateContentCommand": {
15+
// Using the shell for `nproc` usage.
16+
"python": "./configure --config-cache --with-pydebug && make -s -j `nproc`",
17+
"docs": [
18+
"make",
19+
"--directory",
20+
"Doc",
21+
"venv",
22+
"html"
23+
]
24+
},
25+
"customizations": {
26+
"vscode": {
27+
"extensions": [
28+
// Highlighting for Parser/Python.asdl.
29+
"brettcannon.zephyr-asdl",
30+
// Highlighting for configure.ac.
31+
"maelvalais.autoconf",
32+
// C auto-complete.
33+
"ms-vscode.cpptools",
34+
// To view built docs.
35+
"ms-vscode.live-server"
36+
// https://github.com/microsoft/vscode-python/issues/18073
37+
// "ms-python.python"
38+
],
39+
"settings": {
40+
"C_Cpp.default.cStandard": "c11",
41+
"C_Cpp.default.defines": [
42+
"Py_BUILD_CORE"
43+
],
44+
// https://github.com/microsoft/vscode-cpptools/issues/10732
45+
"C_Cpp.errorSquiggles": "disabled",
46+
"editor.insertSpaces": true,
47+
"editor.rulers": [
48+
80
49+
],
50+
"editor.tabSize": 4,
51+
"editor.trimAutoWhitespace": true,
52+
"files.associations": {
53+
"*.h": "c"
54+
},
55+
"files.encoding": "utf8",
56+
"files.eol": "\n",
57+
"files.insertFinalNewline": true,
58+
"files.trimTrailingWhitespace": true,
59+
"python.analysis.diagnosticSeverityOverrides": {
60+
// Complains about shadowing the stdlib w/ the stdlib.
61+
"reportShadowedImports": "none",
62+
// Doesn't like _frozen_importlib.
63+
"reportMissingImports": "none"
64+
},
65+
"python.analysis.extraPaths": [
66+
"Lib"
67+
],
68+
"python.defaultInterpreterPath": "./python",
69+
"[restructuredtext]": {
70+
"editor.tabSize": 3
71+
}
72+
}
73+
}
74+
}
75+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add a dev container (along with accompanying Dockerfile) for development
2+
purposes.

‎Tools/wasm/Setup.local.example‎

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)