|
1 | 1 | # 常用命令 |
2 | 2 |
|
3 | | -- [一. pip](#一-pip) |
4 | | - - [1.1. pip --editable](#11-pip---editable) |
5 | | - - [1.2. pip list or freeze](#12-pip-list-or-freeze) |
6 | | - - [1.3. pip install](#13-pip-install) |
7 | | - - [1.3.1. pip install -r requirements.txt](#131-pip-install--r-requirementstxt) |
8 | | - - [1.3.2. pip install xxx](#132-pip-install-xxx) |
9 | | -- [二. flake8](#二-flake8) |
| 3 | +- [一. 规则](#一-规则) |
| 4 | +- [二. pip](#二-pip) |
| 5 | + - [2.1. pip --editable](#21-pip---editable) |
| 6 | + - [2.2. pip list or freeze](#22-pip-list-or-freeze) |
| 7 | + - [2.3. pip install](#23-pip-install) |
| 8 | + - [2.3.1. pip install -r requirements.txt](#231-pip-install--r-requirementstxt) |
| 9 | + - [2.3.2. pip install xxx](#232-pip-install-xxx) |
| 10 | +- [三. flake8](#三-flake8) |
| 11 | +- [四. tox](#四-tox) |
| 12 | + - [4.1. tox --version](#41-tox---version) |
| 13 | + - [4.2. tox --help](#42-tox---help) |
| 14 | + - [4.3. tox --help-ini](#43-tox---help-ini) |
| 15 | + - [4.4. tox --showconfig](#44-tox---showconfig) |
| 16 | + - [4.4. tox --result-json](#44-tox---result-json) |
10 | 17 |
|
11 | | -## 一. pip |
| 18 | +> 平常工作和生活当中, 需要跨系统, 跨语言, 跨环境, 好多都需要笔录的方式记忆下来(已超出个体记忆能力), 好记性不如烂笔头, 故整理后续参考; |
12 | 19 |
|
13 | | -### 1.1. pip --editable |
| 20 | +## 一. 规则 |
| 21 | + |
| 22 | +1. `./Temp/archives/record/*` 目录下的帮助文档统一格式命名为: `yyyy_MMdd_xyz.txt`; |
| 23 | +2. `./Temp/*/*` 目录下的帮助文档统一格式命名为: `python[2|3]_xyz.txt`, 如若`定版`或`定稿`需求, 帮助文档统一格式命名为: `yyyy_python[2|3]_xyz.txt` 或 `yyyy_MMdd_python[2|3]_xyz.txt`; |
| 24 | + |
| 25 | +此规则适用于如下`目录`: |
| 26 | + |
| 27 | +- `./Temp/help/*` |
| 28 | +- `./Temp/txt/*` |
| 29 | + |
| 30 | +## 二. pip |
| 31 | + |
| 32 | +### 2.1. pip --editable |
14 | 33 |
|
15 | 34 | ```bash |
16 | 35 | pip2 install -e . |
17 | 36 | pip3 install -e . |
18 | 37 | ``` |
19 | 38 |
|
20 | | -### 1.2. pip list or freeze |
| 39 | +### 2.2. pip list or freeze |
21 | 40 |
|
22 | 41 | ```bash |
23 | 42 | # pip list |
24 | | -pip2 list > ./Temp/txt/pip2_list.txt |
25 | | -pip3 list > ./Temp/txt/pip3_list.txt |
26 | | -pip2 list > ./Temp/txt/2021_pip2_list.txt |
27 | | -pip3 list > ./Temp/txt/2021_pip3_list.txt |
| 43 | +pip2 list > ./Temp/txt/python2_pip2_list.txt |
| 44 | +pip3 list > ./Temp/txt/python3_pip3_list.txt |
| 45 | +python2 -m pip2 list > ./Temp/txt/2021_python2_pip2_list.txt |
| 46 | +python3 -m pip3 list > ./Temp/txt/2021_python3_pip3_list.txt |
28 | 47 | # pip freeze |
29 | | -pip2 freeze > ./Temp/txt/pip2_freeze.txt |
30 | | -pip3 freeze > ./Temp/txt/pip3_freeze.txt |
31 | | -pip2 freeze > ./Temp/txt/2021_pip2_freeze.txt |
32 | | -pip3 freeze > ./Temp/txt/2021_pip3_freeze.txt |
| 48 | +pip2 freeze > ./Temp/txt/python2_pip2_freeze.txt |
| 49 | +pip3 freeze > ./Temp/txt/python3_pip3_freeze.txt |
| 50 | +python2 -m pip2 freeze > ./Temp/txt/2021_python2_pip2_freeze.txt |
| 51 | +python3 -m pip3 freeze > ./Temp/txt/2021_python3_pip3_freeze.txt |
33 | 52 | ``` |
34 | 53 |
|
35 | | -### 1.3. pip install |
| 54 | +### 2.3. pip install |
36 | 55 |
|
37 | | -#### 1.3.1. pip install -r requirements.txt |
| 56 | +#### 2.3.1. pip install -r requirements.txt |
38 | 57 |
|
39 | 58 | ```bash |
40 | 59 | # the base component requirements |
41 | 60 | pip2 install -r ./requirements.txt |
42 | 61 | pip3 install -r ./requirements.txt |
43 | 62 |
|
| 63 | +python2 -m pip2 install -r ./requirements.txt |
| 64 | +python3 -m pip3 install -r ./requirements.txt |
| 65 | + |
44 | 66 | # the base chain component requirements |
45 | 67 | pip2 install -r ./Temp/archives/material/requirements.txt |
46 | 68 | pip3 install -r ./Temp/archives/material/requirements.txt |
| 69 | + |
| 70 | +python2 -m pip2 install -r ./Temp/archives/material/requirements.txt |
| 71 | +python3 -m pip3 install -r ./Temp/archives/material/requirements.txt |
47 | 72 | ``` |
48 | 73 |
|
49 | | -#### 1.3.2. pip install xxx |
| 74 | +#### 2.3.2. pip install xxx |
50 | 75 |
|
51 | 76 | ```bash |
52 | 77 | pip2 install xxx |
53 | 78 | pip3 install xxx |
54 | 79 | ``` |
55 | 80 |
|
56 | | -## 二. flake8 |
| 81 | +## 三. flake8 |
57 | 82 |
|
58 | 83 | ```bash |
59 | 84 |
|
60 | | -flake8 ./src/ > ./Temp/flake8_recorder.txt |
| 85 | +flake8 ./src/ > ./Temp/flake8/python2_flake8_recorder.txt |
| 86 | +flake8 ./src/ > ./Temp/flake8/python3_flake8_recorder.txt |
| 87 | + |
61 | 88 | flake8 --exclude [*.pyc] ./src/ |
62 | | -flake8 --exclude [*.pyc] ./src/ > ./Temp/flake8_recorder.txt |
63 | | -flake8 --help > ./Temp/flake8_help.txt |
| 89 | +flake8 --exclude [*.pyc] ./src/ > ./Temp/flake8/python2_flake8_recorder.txt |
| 90 | +flake8 --exclude [*.pyc] ./src/ > ./Temp/flake8/python3_flake8_recorder.txt |
| 91 | + |
| 92 | +flake8 --help > ./Temp/help/python2_flake8_help.txt |
| 93 | +flake8 --help > ./Temp/help/python3_flake8_help.txt |
| 94 | +``` |
| 95 | + |
| 96 | +## 四. tox |
| 97 | + |
| 98 | +```bash |
| 99 | +tox --verbose |
| 100 | + |
| 101 | +python2 -m tox --verbose > ./Temp/help/python2_tox_verbose.txt |
| 102 | +python3 -m tox --verbose > ./Temp/help/python3_tox_verbose.txt |
| 103 | +``` |
| 104 | + |
| 105 | +### 4.1. tox --version |
| 106 | + |
| 107 | +```bash |
| 108 | +tox --version |
| 109 | +``` |
| 110 | + |
| 111 | +### 4.2. tox --help |
| 112 | + |
| 113 | +```bash |
| 114 | +tox --help |
| 115 | + |
| 116 | +python2 -m tox --help > ./Temp/help/python2_tox_help.txt |
| 117 | +python3 -m tox --help > ./Temp/help/python3_tox_help.txt |
| 118 | +``` |
| 119 | + |
| 120 | +### 4.3. tox --help-ini |
| 121 | + |
| 122 | +```bash |
| 123 | +tox --help-ini |
| 124 | + |
| 125 | +python2 -m tox --help-ini > ./Temp/help/python2_tox_help_ini.txt |
| 126 | +python3 -m tox --help-ini > ./Temp/help/python3_tox_help_ini.txt |
| 127 | +``` |
| 128 | + |
| 129 | +### 4.4. tox --showconfig |
| 130 | + |
| 131 | +```bash |
| 132 | +tox --showconfig |
| 133 | + |
| 134 | +python2 -m tox --showconfig > ./Temp/help/python2_tox_show_config.txt |
| 135 | +python3 -m tox --showconfig > ./Temp/help/python3_tox_show_config.txt |
| 136 | +``` |
| 137 | + |
| 138 | +### 4.4. tox --result-json |
| 139 | + |
| 140 | +```bash |
| 141 | +tox --result-json |
64 | 142 |
|
| 143 | +python2 -m tox --result-json > ./Temp/help/python2_tox_result_json.txt |
| 144 | +python3 -m tox --result-json > ./Temp/help/python3_tox_result_json.txt |
65 | 145 | ``` |
0 commit comments