Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d518f31

Browse files
committed
챕터 0 개발 환경 세팅 작성. 레이아웃 정리.
1 parent 46291b5 commit d518f31

File tree

7 files changed

+57
-93
lines changed

7 files changed

+57
-93
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ipython_config.py
2323
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
2424

2525
# User-specific stuff
26+
*/.idea/*
2627
.idea/**/workspace.xml
2728
.idea/**/tasks.xml
2829
.idea/**/usage.statistics.xml

README.md

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ jupyter-book github page 접속 주소: https://pseudo-lab.github.io/CPython-Gui
88
Pseudo-Lab/CPython-Guide
99
```
1010

11-
2. 저장소를 받습니다.
11+
2. 저장소 및 python 패키지를 받습니다.
1212

1313
```bash
1414
git clone https://github.com/[작업자의 Github아이디]/CPython-Guide.git
15+
cd [CPython-Guide 폴더] # 윈도우즈 command line의 /d 옵션도 같이
16+
pip install -r requirements.txt # jupyter-book 패키지 설치, ghp-import는 꼭 설치안해도됨. (git action용)
1517
```
1618

1719
3. 담당 페이지 작업을 진행합니다.
@@ -28,39 +30,29 @@ jupyter-book github page 접속 주소: https://pseudo-lab.github.io/CPython-Gui
2830
# TODO: pull request 하는 방법 첨부 예정.
2931
```
3032

31-
5. pull request 승인 후 push, merge가 완료되면 자동으로 빌드됩니다.
33+
5. pull request 승인 후 push가 완료되면 자동으로 사이트가 빌드됩니다.
3234

3335

3436

3537
# jupyter-book 작업 구조
36-
```Diff
38+
```yaml
3739
CPython-Guide
38-
├── .github #
39-
├── book #
40-
│ ├── _build
41-
│ ├── docs
42-
│ ├── _config.yml
43-
│ ├── index.js
40+
├── .github # git action workflow가 있습니다.
41+
├── book # 문서 메인 폴더 입니다.
42+
│ ├── docs # 문서가 모여있는 폴더입니다.
43+
│ ├── images # 문서에 들어가는 이미지 폴더입니다.
44+
│ ├── _config.yml # github page config 입니다.
45+
│ ├── _toc.yml # 문서 레이아웃 구성 파일 입니다.
46+
│ ├── intro.md # 문서의 시작 페이지 파일 입니다.
4447
├── README.md
4548
├── requirements.txt
4649
└── .gitignore
4750
```
48-
49-
```
50-
jupyter-book build 2021-Kaggle-Study/book
51-
```
52-
53-
8. sync your local and remote repositories
54-
55-
```
56-
cd 2021-Kaggle-Study
57-
git add .
58-
git commit -m "adding my first book!"
59-
git push
60-
```
61-
62-
9. Publish your Jupyter Book with Github Pages
63-
64-
```
65-
ghp-import -n -p -f book/_build/html -m "initial publishing"
66-
```
51+
문서는 book/docs 폴더에 추가하고 작성합니다.
52+
_toc.yml에 문서를 등록해야 페이지에 보입니다.
53+
54+
# 파일명 규칙
55+
1. docs: 챕터번호_섹션번호_문서제목
56+
(0_0_dev_env_setup.md, 0_1_directory_structure.md, 챕터 최상단은 0번 섹션으로 처리)
57+
2. images: 챕터폴더/사진순서(두자리)_사진내용
58+
(0_dev_env_setup/00_vscode_plugin.png, 0_dev_env_setup/01_tasks_explorer_result.png)

book/_toc.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ root: intro
33
parts:
44
- caption: ◽ CPython 가이드
55
chapters:
6-
- file: docs/0_dev_env_setup
7-
- file: docs/1_directory_structure
6+
- file: docs/0_0_dev_env_setup
7+
sections:
8+
- file: docs/0_1_directory_structure
89

9-
10-
- caption: ◽ 샘플
11-
chapters:
12-
- file: docs/sample/markdown-example
13-
- file: docs/sample/notebook-example
10+
#- caption: ◽ 샘플
11+
# - file: docs/sample/markdown-example
12+
# - file: docs/sample/notebook-example
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ git clone --branch 3.9 https://github.com/python/cpython.git
3939
```
4040
.vscode/task.json 파일을 생성하고 위 내용을 작성합니다.
4141

42-
![VSCode 설치 플러그인](../images/0_dev_env_setup/01_tasks_explorer_result.png)
42+
![태스크 세팅 결과](../images/0_dev_env_setup/01_tasks_explorer_result.png)
4343
task.json 작성을 완료하면 TASK EXPLORER의 vscode 하위에 작성한 build task가 추가된 것을 볼 수 있습니다.
4444

4545
## launch.json 작성
@@ -51,7 +51,7 @@ task.json 작성을 완료하면 TASK EXPLORER의 vscode 하위에 작성한 bui
5151
"name": "msvc cl.exe debug cpython",
5252
"type": "cppvsdbg",
5353
"request": "launch",
54-
"program": "./PCBuild/amd64/python_d.exe",
54+
"program": "PCBuild/amd64/python_d.exe",
5555
"args": [],
5656
"stopAtEntry": false,
5757
"cwd": "${workspaceFolder}",
@@ -62,5 +62,12 @@ task.json 작성을 완료하면 TASK EXPLORER의 vscode 하위에 작성한 bui
6262
]
6363
}
6464
```
65-
.vscode/launch.json 파일을 생성하고 위 내용을 작성합니다.
65+
.vscode/launch.json 파일을 생성하고 위 내용을 작성합니다.
66+
67+
이제 F5를 누르면 CPython 빌드 진행 및 디버깅을 할 수 있습니다.
68+
CPython의 진입점이 되는 Programs/python.c의 9번 라인에 디버그 브레이크를 걸고 실행해봅니다.
69+
![CPyhton 디버깅](../images/0_dev_env_setup/02_cpython_debugging.png)
70+
위와 같이 디버깅 잡힌 것을 볼 수 있습니다.
71+
72+
개발환경 세팅은 여기까지입니다.
6673

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# CPython 디렉터리 구조
2+
CPython 프로젝트의 디렉터리 구조입니다.
3+
```yaml
4+
CPython-Guide
5+
├── Doc # 문서 소스 파일
6+
├── Grammar # 컴퓨터가 읽을 수 있는 언어 정의
7+
├── Include # C 헤더 파일
8+
├── Lib # 파이썬으로 작성된 표준 라이브러리 모듈
9+
├── Mac # macOS를 위한 파일
10+
├── Misc # 기타 파일
11+
├── Modules # C로 작성된 표준 라이브러리 모듈
12+
├── Objects # 코어 타입과 객체 모델
13+
├── Parser # 파이썬 파서 소스 코드
14+
├── PC # 이전 버전 윈도우를 위한 윈도우 빌드 지원 파일
15+
├── PCbuild # 윈도우 빌드 지원 파일
16+
├── Python # CPython 인터프리터 소스 코드
17+
├── Tools # CPython을 빌드하거나 확장하는 데 유용한 독립 실행형 도구
18+
└── m4 # makefile 구성을 자동화하는 사용자화 스크립트
19+
```
20+

book/docs/1_directory_structure.md

Lines changed: 0 additions & 55 deletions
This file was deleted.
59.8 KB
Loading

0 commit comments

Comments
 (0)