1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
|
%global _empty_manifest_terminate_build 0
Name: python-sailboat
Version: 0.26.2
Release: 1
Summary: A quick and easy way to distribute your Python projects!
License: MIT
URL: https://github.com/cole-wilson/sailboat
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/3a/ae/08650d566196de2d8c80ba7657692d8ba77bc27665ea98d34f48a2e26675/sailboat-0.26.2.tar.gz
BuildArch: noarch
Requires: python3-toml
Requires: python3-semver
Requires: python3-requests
Requires: python3-setuptools
Requires: python3-twine
Requires: python3-colorama
Requires: python3-enlighten
Requires: python3-blessed
%description
<h1 align="center"><img src="https://www.pinclipart.com/picdir/big/383-3832964_im-on-a-boat-stamp-sailboat-stencil-clipart.png" width="70px">
<br>
sailboat
<br>
<a href="https://github.com/cole-wilson/sailboat"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/cole-wilson/sailboat?style=social"></a>
<a href="https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fsole-wilson%2Fsailboat"><img alt="Twitter" src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fsole-wilson%2Fsailboat"></a>
<br>
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/cole-wilson/sailboat">
<img alt="GitHub Release Date" src="https://img.shields.io/github/release-date/cole-wilson/sailboat?label=latest%20release">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/cole-wilson/sailboat/Publish%20release%20files%20for%20Sailboat.">
<img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/cole-wilson/sailboat">
<img alt="GitHub release (latest SemVer including pre-releases)" src="https://img.shields.io/github/v/release/cole-wilson/sailboat?include_prereleases">
<img alt="GitHub" src="https://img.shields.io/github/license/cole-wilson/sailboat">
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/sailboat">
</h1>
<a style="display:inline-block;" align="center" href="//sailboat.colewilson.xyz">View Documentation Site</a>
## About
Sailboat is a Python developer's best friend. It's a Python build tool that can do anything you need it to! It suports a countless number of plugins — you can even [make your own](#plugins). Sailboat is made for anyone, whether you are a beginner on your very first project, or a senior software engineer with years of experience.
Let's say that that you have created a basic game, **Guess My Number**, and you want to send it to all of your friends. There are a lot of different ways you can do this, but using Sailboat is the easiest. All you have to do is type three commands: `sail quickstart`, `sail build`, and `sail release`, and you can have a Homebrew file, a `pip` installable package, and a [PyInstaller](https://www.pyinstaller.org/) desktop app. So easy!
Sailboat also supports custom subcommands. These don't build your project, but they can add features such as a todo list that help speed up your development process.
## Installation
### Pip:
```bash
pip3 install sailboat
```
### Binary:
Download from [latest release](https://github.com/cole-wilson/sailboat/releases/latest).
### Homebrew:
```bash
brew install cole-wilson/taps/Sailboat
```
### Build From Source:
```bash
git clone https://github.com/cole-wilson/sailboat
cd sailboat
python3 setup.py install
```
## Usage:
Sailboat is intended to be used from the command line/terminal.
It is suggested to run `sail quickstart` to get started. Then, use `sail build` to build your project, and `sail release` to release it! Be sure to to look at the subcommand docs for more detail.
*(look in table below)*
There are two base commands that can be used: `sail` and `sailboat`. These both do exactly the same thing, there is no difference. `sail` will be used in the documentation, as it's shorter easier to type, but you can do whatever.
To get a list of the availible subcommands type `sail help`.
To refresh the plugin list, type `sail -r`.
There are countless subcommands, but these are the core ones:
|subcommand|description|
|----------|-----------|
| add | Add a plugin to your project. |
| build | Build your project for release. |
| dev | Run your project without building it. |
| git | Manage git for your project. |
| github | Manage git for your project. |
| plugins | Plugin manager. |
| quickstart | Get your project up and running. |
| release | Release your project. |
| remove | Remove a plugin from you project. |
| wizard | Configure you project or a plugin. |
| workflow | Generate a GitHub actions workflow file. |
| help | Display this message. |
## Plugins:
Sailboat uses a plugin based architecture. Every single command or subcommand is a plugin, even the core features. Plugins are registered using the [Python entry points system](https://amir.rachum.com/blog/2017/07/28/python-entry-points/), using the group name `sailboat_plugins`. There are four types of plugins:
### `core`
This type of plugin is reserved for 1st party plugins - plugins that are part of the actual Sailboat source. They have unreserved access to all project data, and therefore this type should not be used in custom plugins.
### `command`
`command` plugins are most basic form of a plugin. They are called by typing `sail <name of plugin>`. They are standalone python scripts that add to the project, like a task list manager.
### `build`
This is perhaps the most common type of plugin, they are run with the `build` core plugin, and are used to generate or edit project files. An example would be the PyInstaller plugin, which generates frozen binaries of the project. These should store output in the top level `dist` folder, in a subfolder with the name of the project. For example: the PyInstaller plugin saves output in `./dist/pyinstaller`. Build plugins can also contain `release` plugins within them.
### `release`
This group of plugins is used by the `release` core plugin. They are used to distribute files. For example: the `homebrew` release plugin uploads the Homebrew formula to a GitHub repo.
All plugins should be a subclass of `sailboat.plugins.Plugin`, a basic class that provide the neccesary functions and registration features. An example `command` plugin might look like this:
```python
from sailboat.plugins import Plugin
class Echo(Plugin):
description = "A basic command plugin that echos it's input."
_type = 'command'
setup = {"string_to_echo":"What string should I echo? "} # Used by wizard
def run(self):
string = self.getData('string_to_echo') # Get string to echo.
print(string)
return
```
Plugins store their data in the `sailboat.toml` file, under their type namespace. For example, the above example will store it's data like so:
```toml
...
[command.echo]
string_to_echo = "Testing..."
...
```
A plugin should ***NEVER*** edit the `sailboat.toml` file on it's own. Instead plugins should use the provided functions OR edit `self.data`, a dictionary of the file. Only data stored in the plugins namespace will be preserved. However, a plugin can read from the top level data.
Plugins can get very complex, and therefore useful, but it is too long to put here. Please look at the [`sailboat.colewilson.xyz/plugins.html`](//sailboat.colewilson.xyz/plugins.html) file for details.
## Acknowledgements:
Thanks to all the people at PyInstaller, dmgbuild, twine, and GitHub actions who provided ways for me to create this.
## Stargazers
[](https://github.com/cole-wilson/sailboat/stargazers)
## Contributors
- Cole Wilson
## Contact
Please submit an issue if you have any questions or need help or find a bug. I'm happy to help!
<cole@colewilson.xyz>
%package -n python3-sailboat
Summary: A quick and easy way to distribute your Python projects!
Provides: python-sailboat
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-sailboat
<h1 align="center"><img src="https://www.pinclipart.com/picdir/big/383-3832964_im-on-a-boat-stamp-sailboat-stencil-clipart.png" width="70px">
<br>
sailboat
<br>
<a href="https://github.com/cole-wilson/sailboat"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/cole-wilson/sailboat?style=social"></a>
<a href="https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fsole-wilson%2Fsailboat"><img alt="Twitter" src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fsole-wilson%2Fsailboat"></a>
<br>
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/cole-wilson/sailboat">
<img alt="GitHub Release Date" src="https://img.shields.io/github/release-date/cole-wilson/sailboat?label=latest%20release">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/cole-wilson/sailboat/Publish%20release%20files%20for%20Sailboat.">
<img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/cole-wilson/sailboat">
<img alt="GitHub release (latest SemVer including pre-releases)" src="https://img.shields.io/github/v/release/cole-wilson/sailboat?include_prereleases">
<img alt="GitHub" src="https://img.shields.io/github/license/cole-wilson/sailboat">
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/sailboat">
</h1>
<a style="display:inline-block;" align="center" href="//sailboat.colewilson.xyz">View Documentation Site</a>
## About
Sailboat is a Python developer's best friend. It's a Python build tool that can do anything you need it to! It suports a countless number of plugins — you can even [make your own](#plugins). Sailboat is made for anyone, whether you are a beginner on your very first project, or a senior software engineer with years of experience.
Let's say that that you have created a basic game, **Guess My Number**, and you want to send it to all of your friends. There are a lot of different ways you can do this, but using Sailboat is the easiest. All you have to do is type three commands: `sail quickstart`, `sail build`, and `sail release`, and you can have a Homebrew file, a `pip` installable package, and a [PyInstaller](https://www.pyinstaller.org/) desktop app. So easy!
Sailboat also supports custom subcommands. These don't build your project, but they can add features such as a todo list that help speed up your development process.
## Installation
### Pip:
```bash
pip3 install sailboat
```
### Binary:
Download from [latest release](https://github.com/cole-wilson/sailboat/releases/latest).
### Homebrew:
```bash
brew install cole-wilson/taps/Sailboat
```
### Build From Source:
```bash
git clone https://github.com/cole-wilson/sailboat
cd sailboat
python3 setup.py install
```
## Usage:
Sailboat is intended to be used from the command line/terminal.
It is suggested to run `sail quickstart` to get started. Then, use `sail build` to build your project, and `sail release` to release it! Be sure to to look at the subcommand docs for more detail.
*(look in table below)*
There are two base commands that can be used: `sail` and `sailboat`. These both do exactly the same thing, there is no difference. `sail` will be used in the documentation, as it's shorter easier to type, but you can do whatever.
To get a list of the availible subcommands type `sail help`.
To refresh the plugin list, type `sail -r`.
There are countless subcommands, but these are the core ones:
|subcommand|description|
|----------|-----------|
| add | Add a plugin to your project. |
| build | Build your project for release. |
| dev | Run your project without building it. |
| git | Manage git for your project. |
| github | Manage git for your project. |
| plugins | Plugin manager. |
| quickstart | Get your project up and running. |
| release | Release your project. |
| remove | Remove a plugin from you project. |
| wizard | Configure you project or a plugin. |
| workflow | Generate a GitHub actions workflow file. |
| help | Display this message. |
## Plugins:
Sailboat uses a plugin based architecture. Every single command or subcommand is a plugin, even the core features. Plugins are registered using the [Python entry points system](https://amir.rachum.com/blog/2017/07/28/python-entry-points/), using the group name `sailboat_plugins`. There are four types of plugins:
### `core`
This type of plugin is reserved for 1st party plugins - plugins that are part of the actual Sailboat source. They have unreserved access to all project data, and therefore this type should not be used in custom plugins.
### `command`
`command` plugins are most basic form of a plugin. They are called by typing `sail <name of plugin>`. They are standalone python scripts that add to the project, like a task list manager.
### `build`
This is perhaps the most common type of plugin, they are run with the `build` core plugin, and are used to generate or edit project files. An example would be the PyInstaller plugin, which generates frozen binaries of the project. These should store output in the top level `dist` folder, in a subfolder with the name of the project. For example: the PyInstaller plugin saves output in `./dist/pyinstaller`. Build plugins can also contain `release` plugins within them.
### `release`
This group of plugins is used by the `release` core plugin. They are used to distribute files. For example: the `homebrew` release plugin uploads the Homebrew formula to a GitHub repo.
All plugins should be a subclass of `sailboat.plugins.Plugin`, a basic class that provide the neccesary functions and registration features. An example `command` plugin might look like this:
```python
from sailboat.plugins import Plugin
class Echo(Plugin):
description = "A basic command plugin that echos it's input."
_type = 'command'
setup = {"string_to_echo":"What string should I echo? "} # Used by wizard
def run(self):
string = self.getData('string_to_echo') # Get string to echo.
print(string)
return
```
Plugins store their data in the `sailboat.toml` file, under their type namespace. For example, the above example will store it's data like so:
```toml
...
[command.echo]
string_to_echo = "Testing..."
...
```
A plugin should ***NEVER*** edit the `sailboat.toml` file on it's own. Instead plugins should use the provided functions OR edit `self.data`, a dictionary of the file. Only data stored in the plugins namespace will be preserved. However, a plugin can read from the top level data.
Plugins can get very complex, and therefore useful, but it is too long to put here. Please look at the [`sailboat.colewilson.xyz/plugins.html`](//sailboat.colewilson.xyz/plugins.html) file for details.
## Acknowledgements:
Thanks to all the people at PyInstaller, dmgbuild, twine, and GitHub actions who provided ways for me to create this.
## Stargazers
[](https://github.com/cole-wilson/sailboat/stargazers)
## Contributors
- Cole Wilson
## Contact
Please submit an issue if you have any questions or need help or find a bug. I'm happy to help!
<cole@colewilson.xyz>
%package help
Summary: Development documents and examples for sailboat
Provides: python3-sailboat-doc
%description help
<h1 align="center"><img src="https://www.pinclipart.com/picdir/big/383-3832964_im-on-a-boat-stamp-sailboat-stencil-clipart.png" width="70px">
<br>
sailboat
<br>
<a href="https://github.com/cole-wilson/sailboat"><img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/cole-wilson/sailboat?style=social"></a>
<a href="https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fsole-wilson%2Fsailboat"><img alt="Twitter" src="https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Fgithub.com%2Fsole-wilson%2Fsailboat"></a>
<br>
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/cole-wilson/sailboat">
<img alt="GitHub Release Date" src="https://img.shields.io/github/release-date/cole-wilson/sailboat?label=latest%20release">
<img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/cole-wilson/sailboat/Publish%20release%20files%20for%20Sailboat.">
<img alt="GitHub code size in bytes" src="https://img.shields.io/github/languages/code-size/cole-wilson/sailboat">
<img alt="GitHub release (latest SemVer including pre-releases)" src="https://img.shields.io/github/v/release/cole-wilson/sailboat?include_prereleases">
<img alt="GitHub" src="https://img.shields.io/github/license/cole-wilson/sailboat">
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/sailboat">
</h1>
<a style="display:inline-block;" align="center" href="//sailboat.colewilson.xyz">View Documentation Site</a>
## About
Sailboat is a Python developer's best friend. It's a Python build tool that can do anything you need it to! It suports a countless number of plugins — you can even [make your own](#plugins). Sailboat is made for anyone, whether you are a beginner on your very first project, or a senior software engineer with years of experience.
Let's say that that you have created a basic game, **Guess My Number**, and you want to send it to all of your friends. There are a lot of different ways you can do this, but using Sailboat is the easiest. All you have to do is type three commands: `sail quickstart`, `sail build`, and `sail release`, and you can have a Homebrew file, a `pip` installable package, and a [PyInstaller](https://www.pyinstaller.org/) desktop app. So easy!
Sailboat also supports custom subcommands. These don't build your project, but they can add features such as a todo list that help speed up your development process.
## Installation
### Pip:
```bash
pip3 install sailboat
```
### Binary:
Download from [latest release](https://github.com/cole-wilson/sailboat/releases/latest).
### Homebrew:
```bash
brew install cole-wilson/taps/Sailboat
```
### Build From Source:
```bash
git clone https://github.com/cole-wilson/sailboat
cd sailboat
python3 setup.py install
```
## Usage:
Sailboat is intended to be used from the command line/terminal.
It is suggested to run `sail quickstart` to get started. Then, use `sail build` to build your project, and `sail release` to release it! Be sure to to look at the subcommand docs for more detail.
*(look in table below)*
There are two base commands that can be used: `sail` and `sailboat`. These both do exactly the same thing, there is no difference. `sail` will be used in the documentation, as it's shorter easier to type, but you can do whatever.
To get a list of the availible subcommands type `sail help`.
To refresh the plugin list, type `sail -r`.
There are countless subcommands, but these are the core ones:
|subcommand|description|
|----------|-----------|
| add | Add a plugin to your project. |
| build | Build your project for release. |
| dev | Run your project without building it. |
| git | Manage git for your project. |
| github | Manage git for your project. |
| plugins | Plugin manager. |
| quickstart | Get your project up and running. |
| release | Release your project. |
| remove | Remove a plugin from you project. |
| wizard | Configure you project or a plugin. |
| workflow | Generate a GitHub actions workflow file. |
| help | Display this message. |
## Plugins:
Sailboat uses a plugin based architecture. Every single command or subcommand is a plugin, even the core features. Plugins are registered using the [Python entry points system](https://amir.rachum.com/blog/2017/07/28/python-entry-points/), using the group name `sailboat_plugins`. There are four types of plugins:
### `core`
This type of plugin is reserved for 1st party plugins - plugins that are part of the actual Sailboat source. They have unreserved access to all project data, and therefore this type should not be used in custom plugins.
### `command`
`command` plugins are most basic form of a plugin. They are called by typing `sail <name of plugin>`. They are standalone python scripts that add to the project, like a task list manager.
### `build`
This is perhaps the most common type of plugin, they are run with the `build` core plugin, and are used to generate or edit project files. An example would be the PyInstaller plugin, which generates frozen binaries of the project. These should store output in the top level `dist` folder, in a subfolder with the name of the project. For example: the PyInstaller plugin saves output in `./dist/pyinstaller`. Build plugins can also contain `release` plugins within them.
### `release`
This group of plugins is used by the `release` core plugin. They are used to distribute files. For example: the `homebrew` release plugin uploads the Homebrew formula to a GitHub repo.
All plugins should be a subclass of `sailboat.plugins.Plugin`, a basic class that provide the neccesary functions and registration features. An example `command` plugin might look like this:
```python
from sailboat.plugins import Plugin
class Echo(Plugin):
description = "A basic command plugin that echos it's input."
_type = 'command'
setup = {"string_to_echo":"What string should I echo? "} # Used by wizard
def run(self):
string = self.getData('string_to_echo') # Get string to echo.
print(string)
return
```
Plugins store their data in the `sailboat.toml` file, under their type namespace. For example, the above example will store it's data like so:
```toml
...
[command.echo]
string_to_echo = "Testing..."
...
```
A plugin should ***NEVER*** edit the `sailboat.toml` file on it's own. Instead plugins should use the provided functions OR edit `self.data`, a dictionary of the file. Only data stored in the plugins namespace will be preserved. However, a plugin can read from the top level data.
Plugins can get very complex, and therefore useful, but it is too long to put here. Please look at the [`sailboat.colewilson.xyz/plugins.html`](//sailboat.colewilson.xyz/plugins.html) file for details.
## Acknowledgements:
Thanks to all the people at PyInstaller, dmgbuild, twine, and GitHub actions who provided ways for me to create this.
## Stargazers
[](https://github.com/cole-wilson/sailboat/stargazers)
## Contributors
- Cole Wilson
## Contact
Please submit an issue if you have any questions or need help or find a bug. I'm happy to help!
<cole@colewilson.xyz>
%prep
%autosetup -n sailboat-0.26.2
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-sailboat -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 0.26.2-1
- Package Spec generated
|