pysfi 0.1.7__tar.gz → 0.1.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pysfi-0.1.7 → pysfi-0.1.11}/.gitignore +1 -1
- {pysfi-0.1.7 → pysfi-0.1.11}/PKG-INFO +11 -9
- {pysfi-0.1.7 → pysfi-0.1.11}/README.md +99 -99
- pysfi-0.1.11/examples/pack_demo/README.md +77 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/pyproject.toml +169 -137
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/__init__.py +1 -1
- pysfi-0.1.11/sfi/alarmclock/README.md +64 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/alarmclock/alarmclock.py +40 -40
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/bumpversion/README.md +218 -218
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/bumpversion/__init__.py +1 -1
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/bumpversion/tests/test_bumpversion.py +698 -698
- pysfi-0.1.11/sfi/cleanbuild/cleanbuild.py +155 -0
- pysfi-0.1.11/sfi/condasetup/condasetup.py +116 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/docscan/README.md +813 -813
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/docscan/__init__.py +1 -1
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/docscan/docscan.py +407 -103
- pysfi-0.1.11/sfi/docscan/docscan_gui.py +1282 -0
- pysfi-0.1.11/sfi/docscan/lang/eng.py +152 -0
- pysfi-0.1.11/sfi/docscan/lang/zhcn.py +170 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/docscan/tests/__init__.py +1 -1
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/docscan/tests/test_benchmark.py +416 -362
- pysfi-0.1.11/sfi/docscan/tests/test_docscan.py +1245 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/docscan/tests/test_enhanced.py +279 -267
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/filedate/README.md +45 -45
- pysfi-0.1.11/sfi/filedate/filedate.py +185 -0
- pysfi-0.1.11/sfi/filedate/tests/test_filedate.py +830 -0
- pysfi-0.1.11/sfi/gittool/__init__.py +2 -0
- pysfi-0.1.11/sfi/gittool/gittool.py +401 -0
- pysfi-0.1.11/sfi/llmclient/llmclient.py +592 -0
- pysfi-0.1.11/sfi/llmclient/tests/__init__.py +1 -0
- pysfi-0.1.11/sfi/llmclient/tests/test_benchmark.py +399 -0
- pysfi-0.1.11/sfi/llmclient/tests/test_llmclient.py +636 -0
- pysfi-0.1.11/sfi/llmquantize/llmquantize.py +480 -0
- pysfi-0.1.11/sfi/llmquantize/tests/__init__.py +1 -0
- pysfi-0.1.11/sfi/llmquantize/tests/test_llmquantize.py +518 -0
- pysfi-0.1.11/sfi/llmserver/llmserver.py +335 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/makepython/makepython.py +31 -30
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/pdfsplit/pdfsplit.py +173 -173
- pysfi-0.1.11/sfi/pdfsplit/tests/__init__.py +0 -0
- pysfi-0.1.11/sfi/pyarchive/README.md +0 -0
- pysfi-0.1.11/sfi/pyarchive/pyarchive.py +418 -0
- pysfi-0.1.11/sfi/pyembedinstall/__init__.py +0 -0
- pysfi-0.1.11/sfi/pyembedinstall/pyembedinstall.py +629 -0
- pysfi-0.1.11/sfi/pyembedinstall/tests/test_pyembedinstall.py +1626 -0
- pysfi-0.1.11/sfi/pylibpack/README.md +102 -0
- pysfi-0.1.11/sfi/pylibpack/__init__.py +0 -0
- pysfi-0.1.11/sfi/pylibpack/pylibpack.py +1457 -0
- pysfi-0.1.11/sfi/pylibpack/tests/__init__.py +0 -0
- pysfi-0.1.11/sfi/pylibpack/tests/test_benchmark.py +653 -0
- pysfi-0.1.11/sfi/pylibpack/tests/test_pylibpack.py +774 -0
- pysfi-0.1.11/sfi/pyloadergen/__init__.py +0 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/pyloadergen/pyloadergen.py +512 -227
- pysfi-0.1.11/sfi/pyloadergen/tests/__init__.py +0 -0
- pysfi-0.1.11/sfi/pyloadergen/tests/test_benchmark.py +235 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/pyloadergen/tests/test_pyloadergen.py +70 -39
- pysfi-0.1.11/sfi/pypack/README.md +292 -0
- pysfi-0.1.11/sfi/pypack/__init__.py +0 -0
- pysfi-0.1.11/sfi/pypack/pypack.py +1142 -0
- pysfi-0.1.11/sfi/pypack/tests/__init__.py +0 -0
- pysfi-0.1.11/sfi/pypack/tests/test_pack.py +124 -0
- pysfi-0.1.11/sfi/pyprojectparse/README.md +104 -0
- pysfi-0.1.11/sfi/pyprojectparse/__init__.py +0 -0
- pysfi-0.1.11/sfi/pyprojectparse/pyprojectparse.py +500 -0
- pysfi-0.1.11/sfi/pyprojectparse/tests/test_benchmark.py +817 -0
- pysfi-0.1.11/sfi/pyprojectparse/tests/test_projectparse.py +604 -0
- pysfi-0.1.11/sfi/pysourcepack/README.md +201 -0
- pysfi-0.1.11/sfi/pysourcepack/pysourcepack.py +308 -0
- pysfi-0.1.11/sfi/quizbase/README.md +397 -0
- pysfi-0.1.11/sfi/quizbase/__init__.py +0 -0
- pysfi-0.1.11/sfi/quizbase/quizbase.py +828 -0
- pysfi-0.1.11/sfi/quizbase/quizbase_gui.py +987 -0
- pysfi-0.1.11/sfi/quizbase/tests/__init__.py +1 -0
- pysfi-0.1.11/sfi/quizbase/tests/test_quizbase.py +590 -0
- pysfi-0.1.11/sfi/quizbase/tests/test_quizbase_gui.py +371 -0
- pysfi-0.1.11/sfi/regexvalidate/README.md +60 -0
- pysfi-0.1.11/sfi/regexvalidate/__init__.py +0 -0
- pysfi-0.1.11/sfi/regexvalidate/regexvalidate.py +468 -0
- pysfi-0.1.11/sfi/taskkill/__init__.py +0 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/taskkill/taskkill.py +0 -2
- pysfi-0.1.11/sfi/which/__init__.py +0 -0
- pysfi-0.1.11/sfi/workflowengine/README.md +0 -0
- pysfi-0.1.11/sfi/workflowengine/__init__.py +0 -0
- pysfi-0.1.11/sfi/workflowengine/tests/__init__.py +1 -0
- pysfi-0.1.11/sfi/workflowengine/tests/test_benchmark.py +725 -0
- pysfi-0.1.11/sfi/workflowengine/tests/test_workflowengine.py +740 -0
- pysfi-0.1.11/sfi/workflowengine/workflowengine.py +444 -0
- pysfi-0.1.7/sfi/docscan/docscan_gui.py +0 -596
- pysfi-0.1.7/sfi/docscan/tests/test_docscan.py +0 -457
- pysfi-0.1.7/sfi/embedinstall/embedinstall.py +0 -418
- pysfi-0.1.7/sfi/filedate/filedate.py +0 -112
- pysfi-0.1.7/sfi/projectparse/projectparse.py +0 -152
- pysfi-0.1.7/sfi/pypacker/fspacker.py +0 -91
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/alarmclock/__init__.py +0 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/bumpversion/bumpversion.py +0 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/bumpversion/tests/__init__.py +0 -0
- /pysfi-0.1.7/sfi/embedinstall/__init__.py → /pysfi-0.1.11/sfi/cleanbuild/README.md +0 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/cli.py +0 -0
- /pysfi-0.1.7/sfi/filedate/__init__.py → /pysfi-0.1.11/sfi/condasetup/README.md +0 -0
- {pysfi-0.1.7/sfi/makepython → pysfi-0.1.11/sfi/docscan/lang}/__init__.py +0 -0
- {pysfi-0.1.7/sfi/pdfsplit → pysfi-0.1.11/sfi/filedate}/__init__.py +0 -0
- /pysfi-0.1.7/sfi/pdfsplit/tests/__init__.py → /pysfi-0.1.11/sfi/gittool/README.md +0 -0
- /pysfi-0.1.7/sfi/projectparse/__init__.py → /pysfi-0.1.11/sfi/llmclient/README.md +0 -0
- /pysfi-0.1.7/sfi/pyloadergen/__init__.py → /pysfi-0.1.11/sfi/llmquantize/README.md +0 -0
- {pysfi-0.1.7/sfi/pyloadergen/tests → pysfi-0.1.11/sfi/llmquantize}/__init__.py +0 -0
- /pysfi-0.1.7/sfi/pypacker/__init__.py → /pysfi-0.1.11/sfi/llmserver/README.md +0 -0
- {pysfi-0.1.7/sfi/taskkill → pysfi-0.1.11/sfi/makepython}/__init__.py +0 -0
- {pysfi-0.1.7/sfi/which → pysfi-0.1.11/sfi/pdfsplit}/__init__.py +0 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/pdfsplit/tests/test_pdfsplit.py +0 -0
- {pysfi-0.1.7 → pysfi-0.1.11}/sfi/which/which.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pysfi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.11
|
|
4
4
|
Summary: Single File commands for Interactive python.
|
|
5
5
|
Requires-Python: >=3.8
|
|
6
6
|
Requires-Dist: tomli>=2.4.0; python_version < '3.11'
|
|
@@ -12,6 +12,7 @@ Requires-Dist: openpyxl>=3.1.0; extra == 'all'
|
|
|
12
12
|
Requires-Dist: pillow>=10.0.0; extra == 'all'
|
|
13
13
|
Requires-Dist: pymupdf>=1.24.11; extra == 'all'
|
|
14
14
|
Requires-Dist: pypdf>=3.0.0; extra == 'all'
|
|
15
|
+
Requires-Dist: pyside2-stubs>=5.15.2.1.2; extra == 'all'
|
|
15
16
|
Requires-Dist: pyside2>=5.15.2.1; extra == 'all'
|
|
16
17
|
Requires-Dist: pytesseract>=0.3.10; extra == 'all'
|
|
17
18
|
Requires-Dist: python-docx>=1.1.0; extra == 'all'
|
|
@@ -22,6 +23,7 @@ Requires-Dist: markdown>=3.5; extra == 'extra'
|
|
|
22
23
|
Requires-Dist: odfpy>=1.4.1; extra == 'extra'
|
|
23
24
|
Requires-Dist: pypdf>=3.0.0; extra == 'extra'
|
|
24
25
|
Provides-Extra: gui
|
|
26
|
+
Requires-Dist: pyside2-stubs>=5.15.2.1.2; extra == 'gui'
|
|
25
27
|
Requires-Dist: pyside2>=5.15.2.1; extra == 'gui'
|
|
26
28
|
Provides-Extra: ocr
|
|
27
29
|
Requires-Dist: pillow>=10.0.0; extra == 'ocr'
|
|
@@ -45,12 +47,12 @@ pysfi is a Python project that provides single-file command-line utilities, desi
|
|
|
45
47
|
|
|
46
48
|
- **alarmclk**: Alarm clock functionality
|
|
47
49
|
- **[bumpversion](sfi/bumpversion/README.md)**: Automated version number management tool
|
|
48
|
-
- **
|
|
50
|
+
- **pyembedinstall**: Embed installation utilities
|
|
49
51
|
- **[filedate](sfi/filedate/README.md)**: A file date management tool that normalizes date prefixes in filenames
|
|
50
52
|
- **mkp**: Make Python project utilities
|
|
51
|
-
- **
|
|
53
|
+
- **pyprojectparse**: Project parsing and analysis tools
|
|
52
54
|
- **pyloadergen**: Python loader code generation
|
|
53
|
-
- **
|
|
55
|
+
- **pypack**: Python packaging utilities
|
|
54
56
|
|
|
55
57
|
## Installation
|
|
56
58
|
|
|
@@ -99,8 +101,8 @@ pysfi/
|
|
|
99
101
|
│ ├── alarmclock.py
|
|
100
102
|
│ ├── pyproject.toml
|
|
101
103
|
│ └── __init__.py
|
|
102
|
-
├──
|
|
103
|
-
│ ├──
|
|
104
|
+
├── pyembedinstall/ # pyembedinstall command module
|
|
105
|
+
│ ├── pyembedinstall.py
|
|
104
106
|
│ ├── pyproject.toml
|
|
105
107
|
│ └── __init__.py
|
|
106
108
|
├── filedate/ # filedate command module
|
|
@@ -112,15 +114,15 @@ pysfi/
|
|
|
112
114
|
│ ├── makepython.py
|
|
113
115
|
│ ├── pyproject.toml
|
|
114
116
|
│ └── __init__.py
|
|
115
|
-
├──
|
|
116
|
-
│ ├──
|
|
117
|
+
├── pyprojectparse/ # pyprojectparse command module
|
|
118
|
+
│ ├── pyprojectparse.py
|
|
117
119
|
│ ├── pyproject.toml
|
|
118
120
|
│ └── __init__.py
|
|
119
121
|
├── pyloadergen/ # pyloadergen command module
|
|
120
122
|
│ ├── pyloadergen.py
|
|
121
123
|
│ ├── pyproject.toml
|
|
122
124
|
│ └── __init__.py
|
|
123
|
-
└──
|
|
125
|
+
└── pypack/ # pypack command module
|
|
124
126
|
├── fspacker.py
|
|
125
127
|
└── pyproject.toml
|
|
126
128
|
```
|
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
# pysfi
|
|
2
|
-
|
|
3
|
-
Single File commands for Interactive python.
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
pysfi is a Python project that provides single-file command-line utilities, designed to be lightweight and easy-to-use.
|
|
8
|
-
|
|
9
|
-
## Available Commands
|
|
10
|
-
|
|
11
|
-
- **alarmclk**: Alarm clock functionality
|
|
12
|
-
- **[bumpversion](sfi/bumpversion/README.md)**: Automated version number management tool
|
|
13
|
-
- **
|
|
14
|
-
- **[filedate](sfi/filedate/README.md)**: A file date management tool that normalizes date prefixes in filenames
|
|
15
|
-
- **mkp**: Make Python project utilities
|
|
16
|
-
- **
|
|
17
|
-
- **pyloadergen**: Python loader code generation
|
|
18
|
-
- **
|
|
19
|
-
|
|
20
|
-
## Installation
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
# Install using uv (recommended)
|
|
24
|
-
uv add pysfi
|
|
25
|
-
|
|
26
|
-
# Or using pip
|
|
27
|
-
pip install pysfi
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Development
|
|
31
|
-
|
|
32
|
-
### Requirements
|
|
33
|
-
|
|
34
|
-
- Python >= 3.8
|
|
35
|
-
- [uv](https://github.com/astral-sh/uv) (recommended) or pip
|
|
36
|
-
|
|
37
|
-
### Development Dependencies
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
uv pip install -e ".[dev]"
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Code Standards
|
|
44
|
-
|
|
45
|
-
The project uses Ruff for code linting and formatting:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
# Check code
|
|
49
|
-
ruff check .
|
|
50
|
-
|
|
51
|
-
# Format code
|
|
52
|
-
ruff format .
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Project Structure
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
pysfi/
|
|
59
|
-
├── pyproject.toml # Main project configuration
|
|
60
|
-
├── README.md
|
|
61
|
-
└── sfi/
|
|
62
|
-
├── __init__.py
|
|
63
|
-
├── alarmclock/ # alarmclk command module
|
|
64
|
-
│ ├── alarmclock.py
|
|
65
|
-
│ ├── pyproject.toml
|
|
66
|
-
│ └── __init__.py
|
|
67
|
-
├──
|
|
68
|
-
│ ├──
|
|
69
|
-
│ ├── pyproject.toml
|
|
70
|
-
│ └── __init__.py
|
|
71
|
-
├── filedate/ # filedate command module
|
|
72
|
-
│ ├── filedate.py
|
|
73
|
-
│ ├── pyproject.toml
|
|
74
|
-
│ ├── README.md # Detailed documentation
|
|
75
|
-
│ └── __init__.py
|
|
76
|
-
├── makepython/ # mkp command module
|
|
77
|
-
│ ├── makepython.py
|
|
78
|
-
│ ├── pyproject.toml
|
|
79
|
-
│ └── __init__.py
|
|
80
|
-
├──
|
|
81
|
-
│ ├──
|
|
82
|
-
│ ├── pyproject.toml
|
|
83
|
-
│ └── __init__.py
|
|
84
|
-
├── pyloadergen/ # pyloadergen command module
|
|
85
|
-
│ ├── pyloadergen.py
|
|
86
|
-
│ ├── pyproject.toml
|
|
87
|
-
│ └── __init__.py
|
|
88
|
-
└──
|
|
89
|
-
├── fspacker.py
|
|
90
|
-
└── pyproject.toml
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## License
|
|
94
|
-
|
|
95
|
-
MIT License
|
|
96
|
-
|
|
97
|
-
## Contributing
|
|
98
|
-
|
|
99
|
-
Issues and Pull Requests are welcome!
|
|
1
|
+
# pysfi
|
|
2
|
+
|
|
3
|
+
Single File commands for Interactive python.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
pysfi is a Python project that provides single-file command-line utilities, designed to be lightweight and easy-to-use.
|
|
8
|
+
|
|
9
|
+
## Available Commands
|
|
10
|
+
|
|
11
|
+
- **alarmclk**: Alarm clock functionality
|
|
12
|
+
- **[bumpversion](sfi/bumpversion/README.md)**: Automated version number management tool
|
|
13
|
+
- **pyembedinstall**: Embed installation utilities
|
|
14
|
+
- **[filedate](sfi/filedate/README.md)**: A file date management tool that normalizes date prefixes in filenames
|
|
15
|
+
- **mkp**: Make Python project utilities
|
|
16
|
+
- **pyprojectparse**: Project parsing and analysis tools
|
|
17
|
+
- **pyloadergen**: Python loader code generation
|
|
18
|
+
- **pypack**: Python packaging utilities
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Install using uv (recommended)
|
|
24
|
+
uv add pysfi
|
|
25
|
+
|
|
26
|
+
# Or using pip
|
|
27
|
+
pip install pysfi
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Development
|
|
31
|
+
|
|
32
|
+
### Requirements
|
|
33
|
+
|
|
34
|
+
- Python >= 3.8
|
|
35
|
+
- [uv](https://github.com/astral-sh/uv) (recommended) or pip
|
|
36
|
+
|
|
37
|
+
### Development Dependencies
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
uv pip install -e ".[dev]"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Code Standards
|
|
44
|
+
|
|
45
|
+
The project uses Ruff for code linting and formatting:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Check code
|
|
49
|
+
ruff check .
|
|
50
|
+
|
|
51
|
+
# Format code
|
|
52
|
+
ruff format .
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Project Structure
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pysfi/
|
|
59
|
+
├── pyproject.toml # Main project configuration
|
|
60
|
+
├── README.md
|
|
61
|
+
└── sfi/
|
|
62
|
+
├── __init__.py
|
|
63
|
+
├── alarmclock/ # alarmclk command module
|
|
64
|
+
│ ├── alarmclock.py
|
|
65
|
+
│ ├── pyproject.toml
|
|
66
|
+
│ └── __init__.py
|
|
67
|
+
├── pyembedinstall/ # pyembedinstall command module
|
|
68
|
+
│ ├── pyembedinstall.py
|
|
69
|
+
│ ├── pyproject.toml
|
|
70
|
+
│ └── __init__.py
|
|
71
|
+
├── filedate/ # filedate command module
|
|
72
|
+
│ ├── filedate.py
|
|
73
|
+
│ ├── pyproject.toml
|
|
74
|
+
│ ├── README.md # Detailed documentation
|
|
75
|
+
│ └── __init__.py
|
|
76
|
+
├── makepython/ # mkp command module
|
|
77
|
+
│ ├── makepython.py
|
|
78
|
+
│ ├── pyproject.toml
|
|
79
|
+
│ └── __init__.py
|
|
80
|
+
├── pyprojectparse/ # pyprojectparse command module
|
|
81
|
+
│ ├── pyprojectparse.py
|
|
82
|
+
│ ├── pyproject.toml
|
|
83
|
+
│ └── __init__.py
|
|
84
|
+
├── pyloadergen/ # pyloadergen command module
|
|
85
|
+
│ ├── pyloadergen.py
|
|
86
|
+
│ ├── pyproject.toml
|
|
87
|
+
│ └── __init__.py
|
|
88
|
+
└── pypack/ # pypack command module
|
|
89
|
+
├── fspacker.py
|
|
90
|
+
└── pyproject.toml
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT License
|
|
96
|
+
|
|
97
|
+
## Contributing
|
|
98
|
+
|
|
99
|
+
Issues and Pull Requests are welcome!
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Pypack Demo
|
|
2
|
+
|
|
3
|
+
This is a demo application to showcase the pypack workflow packaging tool.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Ensure pypack is installed:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
cd sfi/pypack
|
|
11
|
+
pip install -e .
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
### Basic Build
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cd sfi/examples/pack_demo
|
|
20
|
+
pypack build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This will:
|
|
24
|
+
|
|
25
|
+
1. Parse the `pyproject.toml` file
|
|
26
|
+
2. Pack the source code
|
|
27
|
+
3. Install Python runtime
|
|
28
|
+
4. Generate a console loader
|
|
29
|
+
5. Assemble the final package
|
|
30
|
+
|
|
31
|
+
### Advanced Build Options
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Build with GUI loader
|
|
35
|
+
pypack build --loader-type gui
|
|
36
|
+
|
|
37
|
+
# Build with specific Python version
|
|
38
|
+
pypack build --python-version 3.11.5
|
|
39
|
+
|
|
40
|
+
# Skip loader generation (faster for development)
|
|
41
|
+
pypack build --no-loader
|
|
42
|
+
|
|
43
|
+
# Build with verbose logging
|
|
44
|
+
pypack build --debug
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Output
|
|
48
|
+
|
|
49
|
+
After successful build, the output will be in `dist/package/`:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
dist/package/
|
|
53
|
+
├── src/ # Packed source code
|
|
54
|
+
├── runtime/ # Python runtime
|
|
55
|
+
├── main.exe # Generated loader
|
|
56
|
+
└── metadata.json # Package metadata
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Running the Packaged Application
|
|
60
|
+
|
|
61
|
+
Run the generated loader:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
cd dist/package
|
|
65
|
+
./main.exe
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Workflow Stages
|
|
69
|
+
|
|
70
|
+
The packaging process executes the following stages:
|
|
71
|
+
|
|
72
|
+
1. **Parse Project**: Extract project information from `pyproject.toml`
|
|
73
|
+
2. **Pack Source & Install Python**: Parallel execution of source packing and Python installation
|
|
74
|
+
3. **Generate Loader**: Create cross-platform loader executable
|
|
75
|
+
4. **Assemble Package**: Combine all components into final package
|
|
76
|
+
|
|
77
|
+
Each stage can run independently or in parallel based on dependencies, maximizing efficiency.
|
|
@@ -1,137 +1,169 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
build-backend = "hatchling.build"
|
|
3
|
-
requires = ["hatchling"]
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
dependencies = ["tomli>=2.4.0; python_version<'3.11'"]
|
|
7
|
-
description = "Single File commands for Interactive python."
|
|
8
|
-
name = "pysfi"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.8"
|
|
11
|
-
version = "0.1.
|
|
12
|
-
|
|
13
|
-
[project.scripts]
|
|
14
|
-
alarmclk = "sfi.alarmclock.alarmclock:main"
|
|
15
|
-
bumpversion = "sfi.bumpversion.bumpversion:main"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
[tool.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
".
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
]
|
|
125
|
-
|
|
126
|
-
[
|
|
127
|
-
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = "hatchling.build"
|
|
3
|
+
requires = ["hatchling"]
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
dependencies = ["tomli>=2.4.0; python_version<'3.11'"]
|
|
7
|
+
description = "Single File commands for Interactive python."
|
|
8
|
+
name = "pysfi"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
version = "0.1.11"
|
|
12
|
+
|
|
13
|
+
[project.scripts]
|
|
14
|
+
alarmclk = "sfi.alarmclock.alarmclock:main"
|
|
15
|
+
bumpversion = "sfi.bumpversion.bumpversion:main"
|
|
16
|
+
cleanbuild = "sfi.cleanbuild.cleanbuild:main"
|
|
17
|
+
condasetup = "sfi.condasetup.condasetup:main"
|
|
18
|
+
docscan = "sfi.docscan.docscan:main"
|
|
19
|
+
docscan-gui = "sfi.docscan.docscan_gui:main"
|
|
20
|
+
filedate = "sfi.filedate.filedate:main"
|
|
21
|
+
gitt = "sfi.gittool.gittool:main"
|
|
22
|
+
llmcli = "sfi.llmclient.llmclient:main"
|
|
23
|
+
llmqnt = "sfi.llmquantize.llmquantize:main"
|
|
24
|
+
llmsvr = "sfi.llmserver.llmserver:main"
|
|
25
|
+
mkp = "sfi.makepython.makepython:main"
|
|
26
|
+
pdfsplit = "sfi.pdfsplit.pdfsplit:main"
|
|
27
|
+
pyarchive = "sfi.pyarchive.pyarchive:main"
|
|
28
|
+
pyembedinstall = "sfi.pyembedinstall.pyembedinstall:main"
|
|
29
|
+
pylibpack = "sfi.pylibpack.pylibpack:main"
|
|
30
|
+
pyloadergen = "sfi.pyloadergen.pyloadergen:main"
|
|
31
|
+
pyp = "sfi.pypack.pypack:main"
|
|
32
|
+
pypack = "sfi.pypack.pypack:main"
|
|
33
|
+
pyprojectparse = "sfi.pyprojectparse.pyprojectparse:main"
|
|
34
|
+
pysourcepack = "sfi.pysourcepack.pysourcepack:main"
|
|
35
|
+
quizbase = "sfi.quizbase.quizbase:main"
|
|
36
|
+
quizbase-gui = "sfi.quizbase.quizbase_gui:main"
|
|
37
|
+
regval = "sfi.regexvalidate.regexvalidate:main"
|
|
38
|
+
sfi = "sfi.cli:main"
|
|
39
|
+
taskk = "sfi.taskkill.taskkill:main"
|
|
40
|
+
wch = "sfi.which.which:main"
|
|
41
|
+
|
|
42
|
+
[project.optional-dependencies]
|
|
43
|
+
all = ["pysfi[gui,office,ocr,extra]"]
|
|
44
|
+
extra = ["ebooklib>=0.18", "markdown>=3.5", "odfpy>=1.4.1", "pypdf>=3.0.0"]
|
|
45
|
+
gui = ["PySide2>=5.15.2.1", "pyside2-stubs>=5.15.2.1.2"]
|
|
46
|
+
ocr = ["Pillow>=10.0.0", "pytesseract>=0.3.10"]
|
|
47
|
+
office = [
|
|
48
|
+
"openpyxl>=3.1.0",
|
|
49
|
+
"pymupdf>=1.24.11",
|
|
50
|
+
"python-docx>=1.1.0",
|
|
51
|
+
"python-pptx>=0.6.21",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
[tool.hatch.build.targets.wheel]
|
|
55
|
+
exclude = [
|
|
56
|
+
"sfi/*/README.md",
|
|
57
|
+
"sfi/*/dist",
|
|
58
|
+
"sfi/*/pyproject.toml",
|
|
59
|
+
"sfi/*/tests",
|
|
60
|
+
]
|
|
61
|
+
packages = ["sfi"]
|
|
62
|
+
|
|
63
|
+
# Only include necessary source files to minimize package size
|
|
64
|
+
[tool.hatch.build]
|
|
65
|
+
include = ["README.md", "sfi/**/*.py", "sfi/pyproject.toml"]
|
|
66
|
+
|
|
67
|
+
[tool.ruff]
|
|
68
|
+
line-length = 88
|
|
69
|
+
target-version = "py38"
|
|
70
|
+
|
|
71
|
+
# Exclude files and directories
|
|
72
|
+
exclude = [
|
|
73
|
+
".bzr",
|
|
74
|
+
".direnv",
|
|
75
|
+
".eggs",
|
|
76
|
+
".git",
|
|
77
|
+
".git-rewrite",
|
|
78
|
+
".hg",
|
|
79
|
+
".mypy_cache",
|
|
80
|
+
".nox",
|
|
81
|
+
".pants.d",
|
|
82
|
+
".pytype",
|
|
83
|
+
".ruff_cache",
|
|
84
|
+
".svn",
|
|
85
|
+
".tox",
|
|
86
|
+
".venv",
|
|
87
|
+
"__pypackages__",
|
|
88
|
+
"_build",
|
|
89
|
+
"buck-out",
|
|
90
|
+
"build",
|
|
91
|
+
"dist",
|
|
92
|
+
"node_modules",
|
|
93
|
+
"venv",
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
[tool.ruff.lint]
|
|
97
|
+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
98
|
+
fixable = ["ALL"]
|
|
99
|
+
ignore = [
|
|
100
|
+
"B008", # Do not perform function calls in function arguments
|
|
101
|
+
"E501", # Line too long (handled by formatter)
|
|
102
|
+
"RUF001", # Language specific rules
|
|
103
|
+
"RUF002", # Language specific rules
|
|
104
|
+
"RUF003", # Language specific rules
|
|
105
|
+
]
|
|
106
|
+
select = [
|
|
107
|
+
"B", # flake8-bugbear
|
|
108
|
+
"C4", # flake8-comprehensions
|
|
109
|
+
"E", # pycodestyle errors
|
|
110
|
+
"F", # Pyflakes
|
|
111
|
+
"I", # isort
|
|
112
|
+
"N", # pep8-naming
|
|
113
|
+
"RUF", # Ruff-specific rules
|
|
114
|
+
"SIM", # flake8-simplify
|
|
115
|
+
"UP", # pyupgrade
|
|
116
|
+
"W", # pycodestyle warnings
|
|
117
|
+
]
|
|
118
|
+
unfixable = []
|
|
119
|
+
|
|
120
|
+
[tool.ruff.lint.isort]
|
|
121
|
+
known-first-party = ["sfi"]
|
|
122
|
+
|
|
123
|
+
[tool.ruff.lint.per-file-ignores]
|
|
124
|
+
"__init__.py" = ["F401"] # Allow unused imports
|
|
125
|
+
|
|
126
|
+
[tool.uv.workspace]
|
|
127
|
+
members = [
|
|
128
|
+
"sfi/alarmclock",
|
|
129
|
+
"sfi/bumpversion",
|
|
130
|
+
"sfi/cleanbuild",
|
|
131
|
+
"sfi/condasetup",
|
|
132
|
+
"sfi/docscan",
|
|
133
|
+
"sfi/filedate",
|
|
134
|
+
"sfi/gittool",
|
|
135
|
+
"sfi/llmclient",
|
|
136
|
+
"sfi/llmquantize",
|
|
137
|
+
"sfi/llmserver",
|
|
138
|
+
"sfi/makepython",
|
|
139
|
+
"sfi/pdfsplit",
|
|
140
|
+
"sfi/pyarchive",
|
|
141
|
+
"sfi/pyembedinstall",
|
|
142
|
+
"sfi/pylibpack",
|
|
143
|
+
"sfi/pyloadergen",
|
|
144
|
+
"sfi/pypack",
|
|
145
|
+
"sfi/pyprojectparse",
|
|
146
|
+
"sfi/pysourcepack",
|
|
147
|
+
"sfi/quizbase",
|
|
148
|
+
"sfi/regexvalidate",
|
|
149
|
+
"sfi/taskkill",
|
|
150
|
+
"sfi/which",
|
|
151
|
+
"sfi/workflowengine",
|
|
152
|
+
]
|
|
153
|
+
|
|
154
|
+
[dependency-groups]
|
|
155
|
+
dev = [
|
|
156
|
+
"hatch>=1.14.2",
|
|
157
|
+
"hypothesis>=6.113.0",
|
|
158
|
+
"pysfi[all]",
|
|
159
|
+
"pyside2>=5.15.2.1",
|
|
160
|
+
"pytest-asyncio>=0.24.0",
|
|
161
|
+
"pytest-benchmark>=4.0.0",
|
|
162
|
+
"pytest-cov>=5.0.0",
|
|
163
|
+
"pytest-mock>=3.14.0",
|
|
164
|
+
"pytest-qt>=4.4.0",
|
|
165
|
+
"pytest>=8.3.5",
|
|
166
|
+
"qdarkstyle>=3.2.3",
|
|
167
|
+
"ruff>=0.14.11",
|
|
168
|
+
"tomli>=2.4.0",
|
|
169
|
+
]
|