pycrucible 0.2.9__py3-none-macosx_10_12_x86_64.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.
Binary file
@@ -0,0 +1,246 @@
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
+
@@ -0,0 +1,5 @@
1
+ pycrucible-0.2.9.data/scripts/pycrucible,sha256=_yJ7ouP_3G0C4dvnCrTdjpotieJOk6Dz1oIWPrSDoHo,7913884
2
+ pycrucible-0.2.9.dist-info/METADATA,sha256=PCBlAQiGYT12d9AgUoJHkD_bTSPE33Z6BG4GgxN5bJc,7750
3
+ pycrucible-0.2.9.dist-info/WHEEL,sha256=_ftC59G2lUDVh6DjVQid1lXOEswHzpmZBvGibXyRtww,103
4
+ pycrucible-0.2.9.dist-info/licenses/LICENSE,sha256=8YF_TfLIuzB6B1-AFJfFCvAJmL66af2RofTeCdyeqwM,943
5
+ pycrucible-0.2.9.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-macosx_10_12_x86_64
@@ -0,0 +1,24 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2025 Razorblade23
5
+
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The GNU General Public License is a free, copyleft license for
12
+ software and other kinds of works.
13
+
14
+ The licenses for most software and other practical works are designed
15
+ to take away your freedom to share and change the works. By contrast,
16
+ the GNU General Public License is intended to guarantee your freedom to
17
+ share and change all versions of a program--to make sure it remains free
18
+ software for all its users. We, the Free Software Foundation, use the
19
+ GNU General Public License for most of our software; it applies also to
20
+ any other work released this way by its authors. You can apply it to
21
+ your programs, too.
22
+
23
+ For the full terms and conditions of this license, please refer to:
24
+ https://www.gnu.org/licenses/gpl-3.0.en.html