pycrucible 0.2.9__py3-none-win_amd64.whl → 0.3.1__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,296 @@
1
+ Metadata-Version: 2.4
2
+ Name: pycrucible
3
+ Version: 0.3.1
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
+ # Community
30
+ You can visit our community group on Telegram
31
+ [PyCrucible Telegram Community](https://t.me/PyCrucibleCommunity)
32
+
33
+ # Changelog
34
+ You can see latest changes at [CHANGELOG FILE](https://github.com/razorblade23/PyCrucible/blob/main/CHANGELOG.md).
35
+
36
+ # Github Action
37
+ PyCrucible has associated GitHub Action workflow which you can use to embed your python applications directly in CI.
38
+ [GitHub Action marketplace](https://github.com/marketplace/actions/build-python-app-with-pycrucible).
39
+ [GitHub Repository](https://github.com/razorblade23/pycrucible-action)
40
+
41
+ ## Documentation
42
+ Documentation can be found at [PyCrucible docs](https://pycrucible.razorblade23.dev).
43
+
44
+ ## How to get `PyCrucible`
45
+ There are a couple of ways to get PyCrucible.
46
+
47
+ ### Using `PyPI`
48
+ PyCrucible is published to `PyPI` for every release. All you need to do is:
49
+ ```bash
50
+ pip install pycrucible
51
+ ```
52
+
53
+ ### Using `Github Releases`
54
+ You can download pre-made binaries for your system from [Github Releases](https://github.com/razorblade23/PyCrucible/releases/latest) page
55
+
56
+ ### Downloading and building from source code
57
+ 1. Ensure you have [Rust](https://www.rust-lang.org/) installed.
58
+
59
+ 2. Clone the repository
60
+ ```git clone https://github.com/razorblade23/PyCrucible```
61
+
62
+ 3. Change directory to be inside of a project
63
+ ```cd PyCrucible```
64
+
65
+ 4. Build Runner
66
+ ```cargo build -p pycrucible_runner --release```
67
+
68
+ 5. Build Pycrucible
69
+ ```cargo build -p pycrucible --release```
70
+
71
+ > [!NOTE]
72
+ > The resulting binary will be in `target/release/pycrucible`.
73
+
74
+ ## How to use `PyCrucible`
75
+ All you need for starting is a single `main.py` file with some code.
76
+
77
+ If you installed it using `pip` you can just run it with:
78
+ ```bash
79
+ pycrucible -e .
80
+ ```
81
+
82
+ This will embed your project and produce a new binary which is by default called `launcher` (or `launcher.exe` on Windows).
83
+ > [!TIP]
84
+ > To configure the output path and name of your binary, use `-o` or `--output` flag.
85
+ >
86
+ > Example: `pycrucible -e . -o ./myapp` (or `pycrucible -e . -o ./myapp.exe`)
87
+
88
+ This is now all you need to distribute your python project to other people.
89
+
90
+ No python required on their end. Just this single binary.
91
+
92
+ Running `pycrucible --help` reveals more options:
93
+ ```bash
94
+ $ pycrucible --help
95
+ Tool to generate python executable by melding UV and python source code in crucible of one binary
96
+
97
+ Usage: pycrucible [OPTIONS]
98
+
99
+ Options:
100
+ -e, --embed <EMBED>
101
+ Directory containing Python project to embed. When specified, creates a new binary with the embedded project
102
+ -o, --output <OUTPUT>
103
+ Output path for the new binary when using --embed
104
+ --uv-path <UV_PATH>
105
+ Path to `uv` executable. If not found, it will be downloaded automatically [default: `.`]
106
+ --debug
107
+ Enable debug output
108
+ -h, --help
109
+ Print help
110
+ -V, --version
111
+ Print version
112
+ ```
113
+
114
+
115
+ ## How to configure `PyCrucible`
116
+ Configuration can be set in two files:
117
+ - `pycrucible.toml`
118
+ - `pyproject.toml`
119
+
120
+ > [!NOTE]
121
+ > When both `pycrucible.toml` and `pyproject.toml` are discovered, configuration from `pycrucible.toml` will take effect.
122
+
123
+ > [!IMPORTANT]
124
+ > When using any configuration, only `entrypoint` is required. Other options are optional.
125
+
126
+ > [!TIP]
127
+ > In both `pycrucible.toml` and `pyproject.toml` directive `entrypoint` can also be replaced by just `entry`.
128
+
129
+ 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)
130
+
131
+ In `pycrucible.toml` you would define configuration like this:
132
+ ```toml
133
+ entrypoint = "src/main.py"
134
+ # or
135
+ entry = "src/main.py"
136
+
137
+ [options]
138
+ debug = false
139
+ extract_to_temp = false
140
+ delete_after_run = false
141
+
142
+ [patterns]
143
+ include = [
144
+ "**/*.py",
145
+ ]
146
+ exclude = [
147
+ "**/__pycache__/**",
148
+ ]
149
+
150
+ [env]
151
+ FOO = "foo"
152
+ BAR = "bar"
153
+
154
+ [hooks]
155
+ pre_run = "some_script.py"
156
+ post_run = "some_other_script.py"
157
+ ```
158
+
159
+ In `pyproject.toml` you would define configuration like this:
160
+ ```toml
161
+ [tool.pycrucible]
162
+ entrypoint = "src/main.py"
163
+ # or
164
+ entry = "src/main.py"
165
+
166
+ [tool.pycrucible.options]
167
+ debug = false
168
+ extract_to_temp = false
169
+ delete_after_run = false
170
+ offline_mode = false
171
+
172
+ [tool.pycrucible.patterns]
173
+ include = [
174
+ "**/*.py",
175
+ ]
176
+ exclude = [
177
+ "**/__pycache__/**",
178
+ ]
179
+
180
+ [tool.pycrucible.env]
181
+ FOO = "foo"
182
+ BAR = "bar"
183
+
184
+ [tool.pycrucible.hooks]
185
+ pre_run = "some_script.py"
186
+ post_run = "some_other_script.py"
187
+ ```
188
+
189
+ > [!TIP]
190
+ > You can use `patterns` to include or exclude any arbitrary files, like HTML templates, Kivy layout files or any other arbitrary files needed for your application.
191
+
192
+ > [!IMPORTANT]
193
+ > There is no need for setting `PYTHONPATH` env variable as `uv` will take care of this. If this is really needed, `uv` will complain and you should also also set `UV_LINK_MODE="copy"` as env variable to mitigate the warning.
194
+
195
+ ### Update your project from GitHub
196
+ In configuration file its possible to set your GitHub repository, so the resulting binary will always check for update before running the application.
197
+
198
+ In `pycrucible.toml` it would look like this:
199
+ ```toml
200
+ [source]
201
+ repository = "https://github.com/username/repo"
202
+ branch = "main"
203
+ update_strategy = "pull"
204
+ ```
205
+
206
+
207
+ In `pyproject.toml` it would look like this-
208
+ ```toml
209
+ [tool.pycrucible.source]
210
+ repository = "https://github.com/username/repo"
211
+ branch = "main"
212
+ update_strategy = "pull"
213
+ ```
214
+
215
+ #### Default configuration
216
+ ```python
217
+ entrypoint = "main.py"
218
+
219
+ # Options
220
+ debug = false
221
+ extract_to_temp = false
222
+ delete_after_run = false
223
+
224
+ # Patterns
225
+ patterns.include = [
226
+ "**/*.py",
227
+ ]
228
+ patterns.exclude = [
229
+ ".venv/**/*",
230
+ "**/__pycache__/**",
231
+ ".git/**/*",
232
+ "**/*.pyc",
233
+ "**/*.pyo",
234
+ "**/*.pyd"
235
+ ]
236
+
237
+ # Source repository (GitHub)
238
+ source = None
239
+
240
+ # Enviroment variables
241
+ env = None
242
+
243
+ # Pre and post run hooks
244
+ hooks = None
245
+ ```
246
+ If any of these configuration options is not used, it will be replaced with default value.
247
+ #### NOTE - `entrypoint` directive is required when using any configuration options.
248
+
249
+ ## Security / Code signing
250
+ For users who want to verify the authenticity of the `builder` binary, we recommend code signing. This ensures that the binary you download has not been tampered with.
251
+ Code signing will be automatic in next release of `PyCrucible`.
252
+
253
+
254
+ The `builder` is the only distributed artifact; the Python projects themselves are provided by users at runtime.
255
+
256
+ Signing the builder ensures the binary is authentic.
257
+
258
+ Generated self-contained binaries (created by the builder) are not pre-signed — users may optionally sign them for their own distribution.
259
+
260
+ > [!IMPORTANT]
261
+ > Make sure you run code signing **after** embedding your project. This makes sure that embedded project also be part of the signiture.
262
+
263
+ ## Features
264
+ - **Cross-Platform**:
265
+ - [x] Windows support
266
+ - [x] macOS support (testing)
267
+ - [x] Linux support
268
+ - **Small overhead**:
269
+ - [x] Runner binary that embeds your project is **just 2 MB**. This ofcourse grows with embedding `uv` and your project.
270
+ - **Configurable**:
271
+ - [ ] Use `pycrucible.toml` or `pyproject.toml` to customize embedding details
272
+ - [x] entrypoint
273
+ - [x] include/exlude files
274
+ - [x] arguments to `uv`
275
+ - [x] env variables
276
+ - [x] update source code from github
277
+ - [x] pre and post run hooks (python scripts)
278
+ - [ ] offline mode
279
+ - [x] extract to temporary directory (removes temporary directory after running automaticly)
280
+ - [x] remove extracted files after running
281
+ - [x] Support for multiple ways of defining requirements
282
+ - [x] `uv` initialized `pyproject.toml` (This is preffered !)
283
+ - [x] `requirements.txt`
284
+ - [x] `pylock.toml`
285
+ - [x] `setup.py`
286
+ - [x] `setup.cfg`
287
+ - [x] Load the project as a directory
288
+ - **Tests**:
289
+ - [x] Unit tests covering as much as i can make it
290
+
291
+ ## Thanks to
292
+ The idea is inspired by [Packaged](https://packaged.live/).
293
+
294
+ Thanks to all the briliant developers at `Astral`.
295
+ They did awesome job with [uv](https://astral.sh/blog/uv).
296
+
@@ -0,0 +1,5 @@
1
+ pycrucible-0.3.1.data/scripts/pycrucible.exe,sha256=noUkz4cMyF7QFmah6jsVVpY1MI55VFPUrvrUyrvAymU,5043200
2
+ pycrucible-0.3.1.dist-info/METADATA,sha256=ZRfBy2vgSjehDdbap1HXEF1MyzZFOh1XmsFdS9XoTDc,9687
3
+ pycrucible-0.3.1.dist-info/WHEEL,sha256=BV3ZP699xxmMelj8d6UzKLQSx3JdzqHyifn4bQk5AR8,93
4
+ pycrucible-0.3.1.dist-info/licenses/LICENSE,sha256=1mKlWQzjtJbLuK-6mzMhwomUm2wTeOPVMBZUGYp4tSE,966
5
+ pycrucible-0.3.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.9.0)
2
+ Generator: maturin (1.9.6)
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,,