Skip to content

Commit 9fdf910

Browse files
author
zhenwei-li
committed
the README upgrade
1 parent 118a568 commit 9fdf910

2 files changed

Lines changed: 112 additions & 6 deletions

File tree

README.md

Lines changed: 109 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Python-DeMo
32

43
Python DeMo
@@ -19,7 +18,17 @@ Python DeMo
1918
- [3.1 venvX activate](#31-venvx-activate)
2019
- [3.1.1 activate for mac](#311-activate-for-mac)
2120
- [3.1.2 activate for windows](#312-activate-for-windows)
22-
- [3.2 venvX deactivate](#32-venvx-deactivate)
21+
- [四. 脚本](#四-脚本)
22+
- [4.1 python version](#41-python-version)
23+
- [4.2 pip setuptools wheel version](#42-pip-setuptools-wheel-version)
24+
- [4.2.1 pip freeze list](#421-pip-freeze-list)
25+
- [4.2.2 setuptools](#422-setuptools)
26+
- [4.2.2.1 setup.cfg](#4221-setupcfg)
27+
- [4.2.2.2 setup.py](#4222-setuppy)
28+
- [4.3 virtualenv version](#43-virtualenv-version)
29+
- [4.4 tox tox-travis version](#44-tox-tox-travis-version)
30+
- [4.5 twine version](#45-twine-version)
31+
- [五. 参考](#五-参考)
2332

2433
## 一. 构建`venv`环境
2534

@@ -156,12 +165,106 @@ source ./venv/bin/activate
156165
./venv/Scripts/activate
157166
```
158167

159-
### 3.2 venvX deactivate
168+
## 四. 脚本
169+
170+
### 4.1 python version
171+
172+
```bash
173+
# python
174+
python2 --version
175+
# python help
176+
python2 --help > ./Temp/help/python_help.txt
177+
```
178+
179+
### 4.2 pip setuptools wheel version
180+
181+
```bash
182+
# pip
183+
python2 -m pip --version
184+
185+
# pip setuptools wheel help
186+
python2 -m pip --help > ./Temp/help/python_pip_help.txt
187+
## python2 -m setuptools --help > ./Temp/help/python_setuptools_help.txt
188+
python2 -m setup.py --help-commands > ./Temp/help/python_setuptools_help.txt
189+
python2 -m wheel --help > ./Temp/help/python_wheel_help.txt
190+
```
191+
192+
#### 4.2.1 pip freeze list
193+
194+
```bash
195+
# pip freeze
196+
python2 -m pip freeze > ./Temp/python_pip_freeze.txt
197+
python2 -m pip list > ./Temp/python_pip_list.txt
198+
```
199+
200+
#### 4.2.2 setuptools
201+
202+
##### 4.2.2.1 setup.cfg
203+
204+
```bash
205+
# python2 build
206+
python2 -m pip install build
207+
python2 -m pip install --upgrade build
208+
python2 -m build
209+
python2 -m build > ./out/dist/build.txt
210+
211+
# python3 build
212+
python3 -m pip install build
213+
python3 -m pip install --upgrade build
214+
python3 -m build
215+
python3 -m build > ./out/dist/build.txt
216+
```
217+
218+
##### 4.2.2.2 setup.py
219+
220+
```bash
221+
# setup sdist
222+
python2 setup.py sdist > ./out/dist/setup_sdist.txt
223+
python3 setup.py sdist > ./out/dist/setup_sdist.txt
224+
225+
python2 setup.py bdist_wheel --universal
226+
python3 setup.py bdist_wheel --universal
227+
228+
python2 setup.py bdist_wheel
229+
python3 setup.py bdist_wheel
230+
```
231+
232+
### 4.3 virtualenv version
160233

161-
如果要切换项目或以其他方式离开虚拟环境,只需运行:
234+
```bash
235+
# virtualenv
236+
python2 -m virtualenv --version
237+
# virtualenv help
238+
python2 -m virtualenv --help > ./Temp/help/python_virtualenv_help.txt
239+
```
240+
241+
### 4.4 tox tox-travis version
162242

163243
```bash
164-
deactivate
244+
# tox
245+
python2 -m tox --version
246+
# python2 -m tox-travis --version
247+
# tox tox-travis help
248+
python2 -m tox --help > ./Temp/help/python_tox_help.txt
249+
# python2 -m tox-travis --help > ./Temp/help/python_tox_travis_help.txt
165250
```
166251

167-
如果要重新进入虚拟环境,请按照上述有关激活虚拟环境的相同说明进行操作,无需重新创建虚拟环境;
252+
### 4.5 twine version
253+
254+
```bash
255+
# twine
256+
python2 -m twine --version
257+
# twine help
258+
python2 -m twine --help > ./Temp/help/python_twine_help.txt
259+
260+
# check python check and upload dist format
261+
twine check dist/*
262+
twine upload dist/*
263+
```
264+
265+
## 五. 参考
266+
267+
1. https://packaging.python.org/tutorials/packaging-projects/
268+
2. https://packaging.python.org/guides/distributing-packages-using-setuptools/
269+
3. https://pypi.org/pypi?%3Aaction=list_classifiers
270+
4. https://docs.python.org/2/distutils/setupscript.html#additional-meta-data
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# README
2+
3+
this is dir modules.

0 commit comments

Comments
 (0)