Skip to content

Commit 9044623

Browse files
committed
feat: add readme and license
1 parent 5b08fda commit 9044623

12 files changed

Lines changed: 847 additions & 71 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.python-version
33
__pycache__
44
*.egg-info
5-
.ruff_cache
5+
.ruff_cache
6+
build

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 104 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,109 @@
77
</div>
88

99
> [!WARNING]
10-
> DO NOT use suap as a tool for building and installing cloudy-org applications, that is not the intent of the tool. For application setup / installation check the application's own instructions via it's `README.md` file.
10+
> **USER NOTICE:** DO NOT use suap as a tool for building or installing cloudy-org applications, that is not the intent of the tool.
11+
> For application setup / installation check the application's own instructions in it's `README.md` file.
1112
12-
> [!NOTE]
13-
> As the main usage of suap is in CI, we only target supporting Python **3.13**.
14-
> Also currently the tool is Linux only, that may or may not change.
13+
### Prerequisites:
14+
- **[NSIS](https://nsis.sourceforge.io/Main_Page)** (for packaging windows installers)
15+
- **[Rust](https://www.rust-lang.org/tools/install)** and **Cargo** (for packaging cargo projects).
16+
- **[x86_64-pc-windows-gnu](https://doc.rust-lang.org/nightly/rustc/platform-support/windows-gnu.html)** (for building windows binaries)
1517

16-
*Readme Work In Progress...*
18+
## Packaging Usage
19+
20+
### GitHub Workflow (CI)
21+
```yml
22+
# .github/workflows/suap.yml
23+
24+
name: Suap Package & Publish Binaries on Release Tag
25+
26+
# ... WIP, help wanted!
27+
```
28+
29+
> [!WARNING]
30+
> Suap is not really designed for usage in a development environment but
31+
> rather in CI. You would only really want to use it during development for testing.
32+
>
33+
> Suap targets Python **3.13** support and currently only supports **Linux** (this may or may not change).
34+
35+
### Pip Install
36+
```sh
37+
python -m venv .venv
38+
source .venv/bin/activate
39+
40+
pip install git+https://github.com/cloudy-org/suap@v0.1.0-alpha.1
41+
42+
suap --help
43+
```
44+
45+
### UV Install
46+
```sh
47+
uv tool install --from git+https://github.com/cloudy-org/suap@v0.1.0-alpha.1 suap
48+
49+
uvx suap --help
50+
```
51+
52+
Now that the tool is installed in your environment, make sure you're inside your cloudy-org applications's directory with `suap.toml` at it's root.
53+
54+
If you don't have a `suap.toml` file, create one from the example **[here](./examples/suap.toml)**.
55+
56+
From here on you can query the help command for various actions you can perform other than packaging.
57+
58+
```sh
59+
suap --help
60+
```
61+
62+
### Packaging
63+
```sh
64+
suap package --project cargo --platform-format windows
65+
```
66+
67+
#### Project
68+
In the future a suap project may have multiple types of projects under it so you must specify which type you're packaging via `--project` <sub>(at least for now)</sub>.
69+
70+
#### Platform format
71+
At this moment there are 3 platform formats you can package to:
72+
73+
- `linux-bin` ([standalone binary][uploading-bins-covention])
74+
- `windows-bin` ([standalone binary][uploading-bins-covention])
75+
- `windows-setup` ([windows installer][uploading-bins-covention])
76+
77+
```sh
78+
--platform-format {platform}-{format}
79+
```
80+
81+
The `windows` platform format key is an umbrella key to build and package both formats `windows-bin` and `windows-setup`, the same way the `linux` key contains `linux-bin`.
82+
83+
Use the specific key (e.g: `linux-bin`) if you would like to target packaging just that format and not any other format under that platform.
84+
85+
#### Icons
86+
In the `suap.toml` config we set the icons folder (`icons = "./assets/icons"`). We must populate that with icons for the application (be it placeholders or real official icons for prod):
87+
88+
```toml
89+
# The icons folder is where you'll place your icons.
90+
#
91+
# The name of the image files must be specific like so:
92+
# "windows.ico" - windows specific app icon
93+
# "original.png" - when there's no platform specific icon suap falls back to this
94+
icons = "./assets/icons"
95+
```
96+
97+
Here's an example:
98+
99+
<img width="400px" src="./assets/icons_example.png">
100+
101+
#### Output
102+
And here's me using suap to package windows binaries for roseate with the command from earlier:
103+
104+
<img width="600px" src="./assets/showcase_cli.png">
105+
106+
The `./dist` folder:
107+
108+
<img width="400px" src="./assets/showcase_output.png">
109+
110+
<br>
111+
112+
*Readme Work In Progress...*
113+
114+
115+
[uploading-bins-covention]: https://github.com/cloudy-org/.github/blob/main/convention/releases.md#the-convention-of-uploading-binaries

assets/icons_example.png

13.1 KB
Loading

assets/showcase_cli.png

98.4 KB
Loading

assets/showcase_output.png

12.4 KB
Loading

examples/suap.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# suap.toml
2+
3+
version = 1
4+
5+
# If display name is not specified the strict
6+
# lower-case project app name will be used instead.
7+
display-name = "My Beautiful App"
8+
9+
# The icons folder is where you'll place your icons.
10+
#
11+
# The name of the image files must be specific like so:
12+
# "windows.ico" - windows specific app icon
13+
# "original.png" - when there's no platform specific icon suap falls back to this
14+
icons = "./assets/icons"
15+
16+
# E.g: image/png
17+
mime_types = []
18+
19+
# [project.cargo]
20+
# The name of the cargo binary crate to target
21+
# bin-crate = "roseate"

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ suap = "suap.main:app"
1414

1515
[dependency-groups]
1616
dev = [
17-
"ty>=0.0.21",
18-
"ruff>=0.15.5"
17+
"ty>=0.0.23",
18+
"ruff>=0.15.6"
1919
]
2020

2121
[build-system]
@@ -25,5 +25,8 @@ build-backend = "setuptools.build_meta"
2525
[tool.setuptools.dynamic]
2626
version = { attr = "suap.__version__" }
2727

28+
[tool.setuptools.packages.find]
29+
include = ["suap*"]
30+
2831
[tool.setuptools.package-data]
2932
suap = ["templates/*"]

suap.example.toml

Lines changed: 0 additions & 23 deletions
This file was deleted.

suap/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.1.0"
1+
__version__ = "0.1.0-alpha.1"

0 commit comments

Comments
 (0)