pycrucible 0.2.9__py3-none-win_amd64.whl → 0.3.0__py3-none-win_amd64.whl

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.
@@ -0,0 +1,271 @@
1
+ Metadata-Version: 2.4
2
+ Name: pycrucible
3
+ Version: 0.3.0
4
+ Classifier: Programming Language :: Python :: 3
5
+ Classifier: Programming Language :: Rust
6
+ Classifier: License :: OSI Approved :: MIT License
7
+ Classifier: Operating System :: OS Independent
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Topic :: Software Development :: Build Tools
10
+ License-File: LICENSE
11
+ Summary: Python wrapper for the PyCrucible CLI tool
12
+ Keywords: install,python installer,install python,python packaging,python build tool,pycrucible,pyinstaller,py2exe,python wrapper,python cli tool
13
+ Author-email: razorblade23 <contact@razorblade23.dev>
14
+ License: MIT
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
17
+ Project-URL: Homepage, https://github.com/razorblade23/PyCrucible
18
+ Project-URL: Repository, https://github.com/razorblade23/PyCrucible.git
19
+ Project-URL: Issues, https://github.com/razorblade23/PyCrucible/issues
20
+
21
+ ![Poster image of PyCrucible](/assets/PyCrucible_poster.png)
22
+
23
+ ## Overview
24
+ This tool runs a Python application using the UV binary. It extracts your application, optionally reads configuration from pycrucible.toml or pyproject.toml, and uses uv to execute it in an ephemeral environment.
25
+
26
+ ## What does this mean?
27
+ You get a single self-contained binary that can be distributed across machines running the same platform. No Python installation is required - just an internet connection. Run the executable, and it takes care of the rest.
28
+
29
+ > [!NOTE]
30
+ > This readme is for version v0.3.x. A few important changes has been made, but mostly to the better use of tool.
31
+ >
32
+ > You can see all the changes in [CHANGELOG FILE](https://github.com/razorblade23/PyCrucible/blob/main/CHANGELOG.md).
33
+
34
+ ## Documentation
35
+ Documentation can be found at [PyCrucible docs](https://pycrucible.razorblade23.dev).
36
+
37
+ ## Documentation
38
+ Better documentation can be found at [docs](https://pycrucible.razorblade23.dev).
39
+
40
+ ## How to get `PyCrucible`
41
+ There are a couple of ways to get PyCrucible.
42
+
43
+ ### Using `PyPI`
44
+ PyCrucible is published to `PyPI` for every release. All you need to do is:
45
+ ```bash
46
+ pip install pycrucible
47
+ ```
48
+
49
+ ### Using `Github Releases`
50
+ You can download pre-made binaries for your system from [Github Releases](https://github.com/razorblade23/PyCrucible/releases/latest) page
51
+
52
+ ### Downloading and building from source code
53
+ 1. Ensure you have [Rust](https://www.rust-lang.org/) installed.
54
+
55
+ 2. Clone the repository
56
+ ```git clone https://github.com/razorblade23/PyCrucible```
57
+
58
+ 3. Change directory to be inside of a project
59
+ ```cd PyCrucible```
60
+
61
+ 4. Build Runner
62
+ ```cargo build -p pycrucible_runner --release```
63
+
64
+ 5. Build Pycrucible
65
+ ```cargo build -p pycrucible --release```
66
+
67
+ > [!NOTE]
68
+ > The resulting binary will be in `target/release/pycrucible`.
69
+
70
+ ## How to use `PyCrucible`
71
+ All you need for starting is a single `main.py` file with some code.
72
+
73
+ If you installed it using `pip` you can just run it with:
74
+ ```bash
75
+ pycrucible -e .
76
+ ```
77
+
78
+ This will embed your project and produce a new binary which is by default called `launcher` (or `launcher.exe` on Windows).
79
+ > [!TIP]
80
+ > To configure the output path and name of your binary, use `-o` or `--output` flag.
81
+ >
82
+ > Example: `pycrucible -e . -o ./myapp` (or `pycrucible -e . -o ./myapp.exe`)
83
+
84
+ This is now all you need to distribute your python project to other people.
85
+
86
+ No python required on their end. Just this single binary.
87
+
88
+ Running `pycrucible --help` reveals more options:
89
+ ```bash
90
+ $ pycrucible --help
91
+ Tool to generate python executable by melding UV and python source code in crucible of one binary
92
+
93
+ Usage: pycrucible [OPTIONS]
94
+
95
+ Options:
96
+ -e, --embed <EMBED>
97
+ Directory containing Python project to embed. When specified, creates a new binary with the embedded project
98
+ -o, --output <OUTPUT>
99
+ Output path for the new binary when using --embed
100
+ --uv-path <UV_PATH>
101
+ Path to `uv` executable. If not found, it will be downloaded automatically [default: `.`]
102
+ --debug
103
+ Enable debug output
104
+ -h, --help
105
+ Print help
106
+ -V, --version
107
+ Print version
108
+ ```
109
+
110
+
111
+ ## How to configure `PyCrucible`
112
+ Configuration can be set in two files:
113
+ - `pycrucible.toml`
114
+ - `pyproject.toml`
115
+
116
+ > [!NOTE]
117
+ > When both `pycrucible.toml` and `pyproject.toml` are discovered, configuration from `pycrucible.toml` will take effect.
118
+
119
+ > [!IMPORTANT]
120
+ > When using any configuration, only `entrypoint` is required. Other options are optional.
121
+
122
+ > [!TIP]
123
+ > In both `pycrucible.toml` and `pyproject.toml` directive `entrypoint` can also be replaced by just `entry`.
124
+
125
+ Both of these files have exact same configuration options. You can find example file for `pycrucible.toml` [here](https://raw.githubusercontent.com/razorblade23/PyCrucible/refs/heads/main/pycrucible.toml.example)
126
+
127
+ In `pycrucible.toml` you would define configuration like this:
128
+ ```toml
129
+ entrypoint = "src/main.py"
130
+ # or
131
+ entry = "src/main.py"
132
+
133
+ [options]
134
+ debug = false
135
+ extract_to_temp = false
136
+ delete_after_run = false
137
+
138
+ [package.patterns]
139
+ include = [
140
+ "**/*.py",
141
+ ]
142
+ exclude = [
143
+ "**/__pycache__/**",
144
+ ]
145
+
146
+ [env]
147
+ FOO = "foo"
148
+ BAR = "bar"
149
+
150
+ [hooks]
151
+ pre_run = "some_script.py"
152
+ post_run = "some_other_script.py"
153
+ ```
154
+
155
+ In `pyproject.toml` you would define configuration like this:
156
+ ```toml
157
+ [tool.pycrucible]
158
+ entrypoint = "src/main.py"
159
+ # or
160
+ entry = "src/main.py"
161
+
162
+ [tool.pycrucible.options]
163
+ debug = false
164
+ extract_to_temp = false
165
+ delete_after_run = false
166
+ offline_mode = false
167
+
168
+ [tool.pycrucible.patterns]
169
+ include = [
170
+ "**/*.py",
171
+ ]
172
+ exclude = [
173
+ "**/__pycache__/**",
174
+ ]
175
+
176
+ [tool.pycrucible.env]
177
+ FOO = "foo"
178
+ BAR = "bar"
179
+
180
+ [tool.pycrucible.hooks]
181
+ pre_run = "some_script.py"
182
+ post_run = "some_other_script.py"
183
+ ```
184
+
185
+ ### Update your project from GitHub
186
+ In configuration file its possible to set your GitHub repository, so the resulting binary will always check for update before running the application.
187
+
188
+ In `pycrucible.toml` it would look like this:
189
+ ```toml
190
+ [source]
191
+ repository = "https://github.com/username/repo"
192
+ branch = "main"
193
+ update_strategy = "pull"
194
+ ```
195
+
196
+
197
+ In `pyproject.toml` it would look like this-
198
+ ```toml
199
+ [tool.pycrucible.source]
200
+ repository = "https://github.com/username/repo"
201
+ branch = "main"
202
+ update_strategy = "pull"
203
+ ```
204
+
205
+ #### Default configuration
206
+ ```python
207
+ entrypoint = "main.py"
208
+
209
+ # Options
210
+ debug = false
211
+ extract_to_temp = false
212
+ delete_after_run = false
213
+
214
+ # Patterns
215
+ patterns.include = [
216
+ "**/*.py",
217
+ ]
218
+ patterns.exclude = [
219
+ ".venv/**/*",
220
+ "**/__pycache__/**",
221
+ ".git/**/*",
222
+ "**/*.pyc",
223
+ "**/*.pyo",
224
+ "**/*.pyd"
225
+ ]
226
+
227
+ # Source repository (GitHub)
228
+ source = None
229
+
230
+ # Enviroment variables
231
+ env = None
232
+
233
+ # Pre and post run hooks
234
+ hooks = None
235
+ ```
236
+ If any of these configuration options is not used, it will be replaced with default value.
237
+ #### NOTE - `entrypoint` directive is required when using any configuration options.
238
+
239
+ ## Features
240
+ - **Cross-Platform**:
241
+ - [x] Windows support
242
+ - [x] macOS support (testing)
243
+ - [x] Linux support
244
+ - **Small overhead**:
245
+ - [x] Runner binary that embeds your project is **just 2 MB**. This ofcourse grows with embedding `uv` and your project.
246
+ - **Configurable**:
247
+ - [ ] Use `pycrucible.toml` or `pyproject.toml` to customize embedding details
248
+ - [x] entrypoint
249
+ - [x] include/exlude files
250
+ - [x] arguments to `uv`
251
+ - [x] env variables
252
+ - [x] update source code from github
253
+ - [x] pre and post run hooks (python scripts)
254
+ - [ ] offline mode
255
+ - [x] extract to temporary directory (removes temporary directory after running automaticly)
256
+ - [x] remove extracted files after running
257
+ - [x] Support for multiple ways of defining requirements
258
+ - [x] `uv` initialized `pyproject.toml` (This is preffered !)
259
+ - [x] `requirements.txt`
260
+ - [x] `pylock.toml`
261
+ - [x] `setup.py`
262
+ - [x] `setup.cfg`
263
+ - [x] Load the project as a directory
264
+ - **Tests**:
265
+ - [x] Unit tests covering as much as i can make it
266
+
267
+ ## Thanks to
268
+ The idea is inspired by [Packaged](https://packaged.live/).
269
+
270
+ Thanks to all the briliant developers at `Astral`.
271
+ They did awesome job with [uv](https://astral.sh/blog/uv).
@@ -0,0 +1,5 @@
1
+ pycrucible-0.3.0.data/scripts/pycrucible.exe,sha256=otIXw6YNUmC_Rqx_PnzG_HC1Q2lwB4BIvt20BSvtB7Y,5093376
2
+ pycrucible-0.3.0.dist-info/METADATA,sha256=moQ87txeIwx86SJG_FclIEJzynaHC5y7XmE0B49H5HY,8314
3
+ pycrucible-0.3.0.dist-info/WHEEL,sha256=T1-x9ZAB-aE3ewIGbYuockW5ywV7fI-Nla9FsiR1vW4,93
4
+ pycrucible-0.3.0.dist-info/licenses/LICENSE,sha256=1mKlWQzjtJbLuK-6mzMhwomUm2wTeOPVMBZUGYp4tSE,966
5
+ pycrucible-0.3.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.9.0)
2
+ Generator: maturin (1.9.1)
3
3
  Root-Is-Purelib: false
4
4
  Tag: py3-none-win_amd64
@@ -1,246 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pycrucible
3
- Version: 0.2.9
4
- Classifier: Programming Language :: Python :: 3
5
- Classifier: Programming Language :: Rust
6
- Classifier: License :: OSI Approved :: MIT License
7
- Classifier: Operating System :: OS Independent
8
- Classifier: Intended Audience :: Developers
9
- Classifier: Topic :: Software Development :: Build Tools
10
- License-File: LICENSE
11
- Summary: Python wrapper for the PyCrucible CLI tool
12
- Keywords: install,python installer,install python,python packaging,python build tool,pycrucible,pyinstaller,py2exe,python wrapper,python cli tool
13
- Author-email: razorblade23 <contact@razorblade23.dev>
14
- License: MIT
15
- Requires-Python: >=3.6
16
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
17
- Project-URL: Homepage, https://github.com/razorblade23/PyCrucible
18
- Project-URL: Repository, https://github.com/razorblade23/PyCrucible.git
19
- Project-URL: Issues, https://github.com/razorblade23/PyCrucible/issues
20
-
21
- # PyCrucible
22
- #### "Run Python Apps Instantly, No Setup Required."
23
-
24
- A robust, cross-platform builder and launcher for Python apps using UV.
25
-
26
- ## Overview
27
-
28
- This tool runs a Python application with a help of UV binary. It extracts your package (ZIP or directory), loads an optional configuration from `pycrucible.toml`, and uses `uv` to run your app in an ephemeral environment.
29
-
30
- ## Features
31
-
32
- - **Cross-Platform**:
33
- - [x] Windows support
34
- - [x] macOS support (testing)
35
- - [x] Linux support
36
- - **Configurable**:
37
- - [ ] Use `pycrucible.toml` to customize embedding details
38
- - [x] entrypoint
39
- - [x] include/exlude files
40
- - [ ] arguments to `uv
41
- - [ ] env variables
42
- - [x] pre and post run hooks (python scripts)
43
- - [x] Support for multiple ways of defining requirements
44
- - [x] `uv` initialized `pyproject.toml`
45
- - [x] `requirements.txt`
46
- - [x] `pylock.toml`
47
- - [x] `setup.py`
48
- - [x] `setup.cfg`
49
- - [x] Load the project as a directory
50
- - [ ] Load the project as .zip archive
51
- - **Cleanup**:
52
- - [ ] Optionally remove files after execution (reccomended for temporary directories)
53
- - **Tests**:
54
- - [ ] Unit tests cover configuration, extraction, and hook execution
55
- - **Source Update**:
56
- - [x] Initiate an update of source code pulling from GitHub
57
-
58
-
59
- ## Building from source
60
-
61
- 1. Ensure you have [Rust](https://www.rust-lang.org/) installed.
62
-
63
- 2. Clone the repository
64
- - `git clone https://github.com/razorblade23/PyCrucible`
65
-
66
- 3. Change directory to be inside of a project
67
- - `cd PyCrucible`
68
-
69
- 4. Build the binary
70
- - `cargo build --release`
71
-
72
- #### The resulting binary will be in `target/release/pycrucible`.
73
-
74
-
75
- ## Downloading pre-made binary
76
- You can download pre-made binaries for your system from [Releases](https://github.com/razorblade23/PyCrucible/releases/latest) page
77
-
78
- ## PyCrucible configuration
79
- A directory with a single `.py` file is all you need to start.
80
- There are however multiple configuration options to suit your specific needs.
81
-
82
- ##### Note - when using any configuration, only `entrypoint` is required. Other options are optional.
83
-
84
- Configuration can be set in two ways:
85
- - `pycrucible.toml`
86
- - `pyproject.toml`
87
-
88
- Both of these files have exact same configuration options. You can find example file for `pycrucible.toml` [here](https://raw.githubusercontent.com/razorblade23/PyCrucible/refs/heads/main/pycrucible.toml.example)
89
-
90
- ### Diffrence between configuration options
91
- ##### Note - In both `pycrucible.toml` and `pyproject.toml` directive `entrypoint` can also be replaced by just `entry`.
92
-
93
-
94
- In `pycrucible.toml` you would define configuration like this:
95
- ```toml
96
- entrypoint = "src/main.py"
97
- # or
98
- entry = "src/main.py"
99
-
100
- [package.patterns]
101
- include = [
102
- "**/*.py",
103
- ]
104
- exclude = [
105
- "**/__pycache__/**",
106
- ]
107
-
108
- [hooks]
109
- pre_run = "some_script.py"
110
- post_run = "some_other_script.py"
111
- ```
112
-
113
-
114
- In `pyproject.toml` you would define configuration like this:
115
- ```toml
116
- [tool.pycrucible]
117
- entrypoint = "src/main.py"
118
- # or
119
- entry = "src/main.py"
120
-
121
- [tool.pycrucible.patterns]
122
- include = [
123
- "**/*.py",
124
- ]
125
- exclude = [
126
- "**/__pycache__/**",
127
- ]
128
-
129
- [tool.pycrucible.hooks]
130
- pre_run = "some_script.py"
131
- post_run = "some_other_script.py"
132
- ```
133
-
134
- #### Default configuration
135
- ```rust
136
- ProjectConfig {
137
- package: PackageConfig {
138
- entrypoint: "main.py".into(),
139
- patterns: FilePatterns {
140
- include: vec!["**/*.py".to_string()],
141
- exclude: vec![
142
- ".venv/**/*".to_string(),
143
- "**/__pycache__/**".to_string(),
144
- ".git/**/*".to_string(),
145
- "**/*.pyc".to_string(),
146
- "**/*.pyo".to_string(),
147
- "**/*.pyd".to_string(),
148
- ],
149
- },
150
- },
151
- source: None,
152
- uv: None,
153
- env: None,
154
- hooks: Some(Hooks {
155
- pre_run: Some("".to_string()),
156
- post_run: Some("".to_string()),
157
- }),
158
- }
159
- ```
160
-
161
- ### Update your project from GitHub
162
- In configuration file its possible to set your GitHub repository, so the resulting binary will always check for update before running the application.
163
-
164
- In `pycrucible.toml` it would look like this:
165
- ```toml
166
- [source]
167
- repository = "https://github.com/username/repo"
168
- branch = "main"
169
- update_strategy = "pull"
170
- ```
171
-
172
-
173
- In `pyproject.toml` it would look like this-
174
- ```toml
175
- [tool.pycrucible.source]
176
- repository = "https://github.com/username/repo"
177
- branch = "main"
178
- update_strategy = "pull"
179
- ```
180
-
181
-
182
- ## Prepare your python project
183
- Your project should include at least:
184
- - A directory with your Python application (with an entry point (default: __main__.py))
185
- - Some kind of manifest file declaring dependacies and/or configuration
186
- - (optional) configuration file or section
187
- - only `entrypoint` is required if using this configuration file, other options are optional
188
- - if this file is not present, it will be created with default values.
189
-
190
- ## Usage
191
- ```
192
- $ pycrucible --help
193
- Tool to generate python executable by melding UV and python source code in crucible of one binary
194
-
195
- Usage: pycrucible [OPTIONS]
196
-
197
- Options:
198
- -e, --embed <EMBED>
199
- Directory containing Python project to embed. When specified, creates a new binary with the embedded project
200
- -o, --output <OUTPUT>
201
- Output path for the new binary when using --embed
202
- --uv-path <UV_PATH>
203
- Path to `uv` executable. If not found, it will be downloaded automatically [default: `.`]
204
- --extract-to-temp
205
- Extract Python project to a temporary directory when running
206
- --debug
207
- Enable debug output
208
- --delete-after-run <DELETE_AFTER_RUN>
209
- Delete extracted files after running. Note: requires re-downloading dependencies on each run [default: false]
210
- -h, --help
211
- Print help
212
- -V, --version
213
- Print version
214
- ```
215
-
216
- ### Usage examples (Linux)
217
- You can copy built/downloaded binary to your project folder and just run:
218
-
219
- `./pycrucible -e . -o ./launcher`
220
-
221
- This will embed your project into another binary (that we called "launcher")
222
-
223
- You can run your project from binary by running
224
-
225
- `./launcher`
226
-
227
- ### Usage examples (Windows)
228
- You can copy built/downloaded binary to your project folder and just run:
229
-
230
- `pycrucible.exe -e . -o ./launcher`
231
-
232
- This will embed your project into another binary (that we called "launcher")
233
-
234
- You can run your project from binary by running
235
-
236
- `launcher.exe`
237
-
238
- Now you can copy that "launcher" on practicly any machine with the same architecture.
239
- Machine only needs internet connection in order to download the dependacies.
240
- This proccess is extremely fast (but reliant on internet connection)
241
-
242
-
243
- ## Thanks to
244
- The idea is inspired by [Packaged](https://packaged.live/)
245
- Thanks to all the briliant developers at `Astral` - they did awesome job with [uv](https://astral.sh/blog/uv)
246
-
@@ -1,5 +0,0 @@
1
- pycrucible-0.2.9.data/scripts/pycrucible.exe,sha256=c_eMdBU7y2PmmBIcXkBsNUqFeiSRlBVG65V7cGFLCeA,7517184
2
- pycrucible-0.2.9.dist-info/METADATA,sha256=8PcbbSeOWP5ou1gIcaBjCxfYnHViRCuBqhjGL4tvacM,7975
3
- pycrucible-0.2.9.dist-info/WHEEL,sha256=S7OxZtuPihI-XN3jZuq2sqVMik-O-jyGLiThWItpyfk,93
4
- pycrucible-0.2.9.dist-info/licenses/LICENSE,sha256=1mKlWQzjtJbLuK-6mzMhwomUm2wTeOPVMBZUGYp4tSE,966
5
- pycrucible-0.2.9.dist-info/RECORD,,