Skip to content

Commit c42c045

Browse files
authored
Merge pull request #62 from Alinvor/kernel
[DONE]合并分支
2 parents caf85a7 + 0d74c7d commit c42c045

File tree

6 files changed

+96
-30
lines changed

6 files changed

+96
-30
lines changed

.rmcache.bash

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
find . -type d -name __pycache__ -exec rm -r {} +
4+
find . -type f -name '*.pyc' -delete

.vscode/settings.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
"./src",
77
"./mock",
88
"./test",
9+
// darwin
910
"./venv2/bin",
10-
"./venv2/Lib/python2.7/site-packages",
11+
"./venv2/lib/python2.7/site-packages",
1112
"./venv/bin",
12-
"./venv/Lib/python3.7/site-packages",
13+
"./venv/lib/python3.7/site-packages",
14+
// win32
15+
"./venv2/Scripts",
16+
"./venv2/Lib/site-packages",
17+
"./venv/Scripts",
18+
"./venv/Lib/site-packages",
1319
],
1420
"python.analysis.logLevel": "Trace",
1521
// "python.analysis.watchSearchPaths": true,
@@ -28,10 +34,16 @@
2834
"./src",
2935
"./mock",
3036
"./tests",
37+
// darwin
3138
"./venv2/bin",
32-
"./venv2/Lib/python2.7/site-packages",
39+
"./venv2/lib/python2.7/site-packages",
3340
"./venv/bin",
34-
"./venv/Lib/python3.7/site-packages",
41+
"./venv/lib/python3.7/site-packages",
42+
// win32
43+
"./venv2/Scripts",
44+
"./venv2/Lib/site-packages",
45+
"./venv/Scripts",
46+
"./venv/Lib/site-packages",
3547
],
3648
// "python.autoUpdateLanguageServer": true,
3749
// "python.defaultInterpreterPath": "${workspaceFolder}/venv2/bin/python",

README.md

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -189,37 +189,46 @@ source ./venv/bin/activate
189189
```bash
190190
# python
191191
python2 --version
192+
python3 --version
192193
# python help
193-
python2 --help > ./Temp/help/python_help.txt
194+
python2 --help > ./Temp/help/python2_help.txt
195+
python3 --help > ./Temp/help/python3_help.txt
194196
```
195197

196198
### 4.2 pip setuptools wheel version
197199

198200
```bash
199201
# pip
200202
python2 -m pip --version
203+
python3 -m pip --version
201204

202205
# pip setuptools wheel help
203-
python2 -m pip --help > ./Temp/help/python_pip_help.txt
204-
## python2 -m setuptools --help > ./Temp/help/python_setuptools_help.txt
205-
python2 -m setup.py --help-commands > ./Temp/help/python_setuptools_help.txt
206-
python2 -m wheel --help > ./Temp/help/python_wheel_help.txt
206+
python2 -m pip --help > ./Temp/help/python2_pip_help.txt
207+
python3 -m pip --help > ./Temp/help/python3_pip_help.txt
208+
## python2 -m setuptools --help > ./Temp/help/python2_setuptools_help.txt
209+
## python3 -m setuptools --help > ./Temp/help/python3_setuptools_help.txt
210+
python2 -m setup.py --help-commands > ./Temp/help/python2_setuptools_help.txt
211+
python3 -m setup.py --help-commands > ./Temp/help/python3_setuptools_help.txt
212+
python2 -m wheel --help > ./Temp/help/python2_wheel_help.txt
213+
python3 -m wheel --help > ./Temp/help/python3_wheel_help.txt
207214
```
208215

209216
#### 4.2.1 pip freeze list
210217

211218
```bash
212219
# pip freeze
213-
python2 -m pip freeze > ./Temp/python_pip_freeze.txt
214-
python2 -m pip list > ./Temp/python_pip_list.txt
220+
python2 -m pip freeze > ./Temp/python2_pip_freeze.txt
221+
python3 -m pip freeze > ./Temp/python3_pip_freeze.txt
222+
python2 -m pip list > ./Temp/python2_pip_list.txt
223+
python3 -m pip list > ./Temp/python3_pip_list.txt
215224
```
216225

217226
#### 4.2.2 pip cache
218227

219228
```bash
220229
# pip cache list
221-
python2 -m pip cache list > ./out/dist/pip_cache_list.txt
222-
python3 -m pip cache list > ./out/dist/pip_cache_list.txt
230+
python2 -m pip cache list > ./out/dist/pip2_cache_list.txt
231+
python3 -m pip cache list > ./out/dist/pip3_cache_list.txt
223232
# pip no cache install
224233
python2 -m pip --no-cache-dir install com.dvsnier.*
225234
python3 -m pip --no-cache-dir install com.dvsnier.*
@@ -250,8 +259,8 @@ python3 -m build > ./out/dist/build.txt
250259

251260
```bash
252261
# setup sdist
253-
python2 setup.py sdist > ./out/dist/setup_sdist.txt
254-
python3 setup.py sdist > ./out/dist/setup_sdist.txt
262+
python2 setup.py sdist > ./out/dist/setup2_sdist.txt
263+
python3 setup.py sdist > ./out/dist/setup3_sdist.txt
255264

256265
python2 setup.py bdist_wheel --universal
257266
python3 setup.py bdist_wheel --universal
@@ -265,8 +274,10 @@ python3 setup.py bdist_wheel
265274
```bash
266275
# virtualenv
267276
python2 -m virtualenv --version
277+
python3 -m virtualenv --version
268278
# virtualenv help
269-
python2 -m virtualenv --help > ./Temp/help/python_virtualenv_help.txt
279+
python2 -m virtualenv --help > ./Temp/help/python2_virtualenv_help.txt
280+
python3 -m virtualenv --help > ./Temp/help/python3_virtualenv_help.txt
270281
```
271282

272283
### 4.4 tox tox-travis version
@@ -275,9 +286,13 @@ python2 -m virtualenv --help > ./Temp/help/python_virtualenv_help.txt
275286
# tox
276287
python2 -m tox --version
277288
# python2 -m tox-travis --version
289+
python3 -m tox --version
290+
# python3 -m tox-travis --version
278291
# tox tox-travis help
279-
python2 -m tox --help > ./Temp/help/python_tox_help.txt
280-
# python2 -m tox-travis --help > ./Temp/help/python_tox_travis_help.txt
292+
python2 -m tox --help > ./Temp/help/python2_tox_help.txt
293+
# python2 -m tox-travis --help > ./Temp/help/python2_tox_travis_help.txt
294+
python3 -m tox --help > ./Temp/help/python3_tox_help.txt
295+
# python3 -m tox-travis --help > ./Temp/help/python3_tox_travis_help.txt
281296
```
282297

283298
如若快捷生成脚本,参考如下命令:
@@ -297,8 +312,10 @@ tox
297312
```bash
298313
# twine
299314
python2 -m twine --version
315+
python3 -m twine --version
300316
# twine help
301-
python2 -m twine --help > ./Temp/help/python_twine_help.txt
317+
python2 -m twine --help > ./Temp/help/python2_twine_help.txt
318+
python3 -m twine --help > ./Temp/help/python3_twine_help.txt
302319

303320
# check python check and upload dist format
304321
twine check dist/*
@@ -489,8 +506,8 @@ name = com.dvsnier.xxx
489506
version = 0.0.1.dev1
490507
author = dvsnier
491508
author_email = dovsnier@qq.com
492-
description = this is dvsnier directory.
493-
long_description = file: ./doc/description/directory/README.md
509+
description = this is dvsnier xxx.
510+
long_description = file: ./doc/description/xxx/README.md
494511
long_description_content_type = text/markdown
495512
keywords = xxx, development
496513
url = https://github.com/Alinvor/Python-DeMo
@@ -511,7 +528,6 @@ classifiers =
511528
Programming Language :: Python :: 3.8
512529
Programming Language :: Python :: 3.9
513530
License :: OSI Approved :: MIT License
514-
Operating System :: OS Independent
515531

516532
python_requires =
517533
>=2.7
@@ -577,10 +593,11 @@ def read_text(file_name):
577593
#
578594
# the repaired your home name
579595
#
580-
PROJECT_PREFIX = '/Users/.../Python-DeMo/'
581-
project = PROJECT_PREFIX
596+
# PROJECT_PREFIX = '/Users/.../Python-DeMo/'
597+
# project = PROJECT_PREFIX
598+
project = os.getenv('base_project_prefix')
582599
print(project)
583-
PROJECT_DIRECTORY = 'directory' # project directory
600+
PROJECT_DIRECTORY = 'xxx' # project directory
584601
PROJECT_README_FILE = 'README.md' # project readme file
585602
README_ROOT_DIRECTORY = os.path.join(project, 'doc/description')
586603
README_PROJECT_DIRECTORY = os.path.join(README_ROOT_DIRECTORY, PROJECT_DIRECTORY)
@@ -615,7 +632,7 @@ PROJECT_DESCRIPTION = os.path.join(README_PROJECT_DIRECTORY, PROJECT_README_FILE
615632
# | 22 | | | | | |
616633
DVSNIER_NAME = 'com.dvsnier.xxx' # Required
617634
DVSNIER_VERSION = '0.0.1.dev1' # Required
618-
DVSNIER_DESCRIPTOIN = 'this is dvsnier directory.' # Optional
635+
DVSNIER_DESCRIPTOIN = 'this is dvsnier xxx.' # Optional
619636
# Get the long description from the README file
620637
DVSNIER_LONG_DESCRIPTOIN = read_text(str(PROJECT_DESCRIPTION)) # Optional
621638
DVSNIER_LONG_DESCRIPTION_CONTENT_TYPE = 'text/markdown' # Optional
@@ -633,6 +650,7 @@ DVSNIER_CLASSIFIERS = [ # Optional
633650
# Indicate who your project is intended for
634651
# 'Intended Audience :: Developers',
635652
# 'Topic :: Software Development :: Build Tools',
653+
'Topic :: Software Development :: Libraries',
636654

637655
# Pick your license as you wish
638656
'License :: OSI Approved :: MIT License',
@@ -644,7 +662,7 @@ DVSNIER_CLASSIFIERS = [ # Optional
644662
'Programming Language :: Python :: 3.8',
645663
'Programming Language :: Python :: 3.9',
646664
# 'Programming Language :: Python :: 3 :: Only',
647-
'Operating System :: OS Independent'
665+
# 'Operating System :: OS Independent'
648666
]
649667
DVSNIER_KEYWORDS = 'xxx, development' # Optional
650668
DVSNIER_PACKAGE_DIR = {'': 'src'} # Optional

Temp/bash/cmd.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# 命令
2+
3+
- [一. 删除缓存](#一-删除缓存)
4+
- [1.1. pyc and pycache](#11-pyc-and-pycache)
5+
- [1.2. 扩展目录](#12-扩展目录)
6+
7+
## 一. 删除缓存
8+
9+
### 1.1. pyc and pycache
10+
11+
```bash
12+
# the delete files
13+
find . -name '*.pyc' -delete
14+
# the delete directory
15+
find . -type d -name __pycache__ -exec rm -r {} +
16+
```
17+
18+
### 1.2. 扩展目录
19+
20+
推荐删除扩展目录:
21+
22+
```bash
23+
find . -type d -name build -exec rm -r {} +
24+
find . -type d -name dist -exec rm -r {} +
25+
find . -type d -name .tox -exec rm -r {} +
26+
```

Temp/debug/env/interpreterInfo.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@
66
import sys
77

88
obj = {}
9+
obj["base_project_prefix"] = os.getenv('base_project_prefix')
910
obj["versionInfo"] = tuple(sys.version_info)
11+
obj["sysModules"] = {}
12+
for (k, v) in sys.modules.items():
13+
(obj["sysModules"])[str(k)] = str(v)
1014
obj["sysPrefix"] = sys.prefix
1115
obj["sysVersion"] = sys.version
12-
obj["is64Bit"] = sys.maxsize > 2 ** 32
16+
obj["sysPath"] = sys.path
17+
obj["sysPlatform"] = sys.platform
18+
obj["is64Bit"] = sys.maxsize > 2**32
1319
obj["PWD"] = os.environ.get('PWD')
1420
obj["VIRTUAL_ENV"] = os.environ.get('VIRTUAL_ENV')
1521

16-
values = json.dumps(obj)
22+
values = json.dumps(obj, indent=4)
1723
# print(values)
1824
print('ref: ./Temp/debug/env/interpreterInfo.json')
1925
with open('./Temp/debug/env/interpreterInfo.json', 'w') as file:

Temp/debug/env/printEnvVariables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import json
66

7-
values = json.dumps(dict(os.environ))
7+
values = json.dumps(dict(os.environ), indent=4)
88
# print(values)
99
print('ref: ./Temp/debug/env/printEnvVariables.json')
1010
with open('./Temp/debug/env/printEnvVariables.json', 'w') as file:

0 commit comments

Comments
 (0)