summaryrefslogtreecommitdiff
path: root/python-kindle.spec
blob: ec6543d6da50c407ae7a4968cc87c7d45940ae3d (plain)
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
%global _empty_manifest_terminate_build 0
Name:		python-kindle
Version:	0.4.16
Release:	1
Summary:	Kindle - Making a PyTorch model easier than ever!
License:	MIT License  Copyright (c) 2021 Jongkuk Lim  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
URL:		https://github.com/JeiKeiLim/kindle
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/b4/fb/16afb261e17f822952c64d021d4cb35d0f2ba97e0ebf55191b98ad5ffb5a/kindle-0.4.16.tar.gz
BuildArch:	noarch

Requires:	python3-tqdm
Requires:	python3-PyYAML
Requires:	python3-torch
Requires:	python3-ptflops
Requires:	python3-timm
Requires:	python3-tabulate
Requires:	python3-einops

%description
  0 |         -1 |   1 |      616 |            Conv | [6, 5, 1, 0], activation: LeakyReLU |          3 |           8 |     [3, 32, 32] |     [8, 32, 32] |
  1 |         -1 |   1 |        0 |         MaxPool |                                 [2] |          8 |           8 |       [8 32 32] |     [8, 16, 16] |
  2 |         -1 |   1 |    3,200 |       nn.Conv2d |          [16, 5, 1, 2], bias: False |          8 |          16 |       [8 16 16] |    [16, 16, 16] |
  3 |         -1 |   1 |       32 |  nn.BatchNorm2d |                                  [] |         16 |          16 |      [16 16 16] |    [16, 16, 16] |
  4 |         -1 |   1 |        0 |         nn.ReLU |                                  [] |         16 |          16 |      [16 16 16] |    [16, 16, 16] |
  5 |         -1 |   1 |        0 |         MaxPool |                                 [2] |         16 |          16 |      [16 16 16] |      [16, 8, 8] |
  6 |         -1 |   1 |        0 |         Flatten |                                  [] |         -1 |        1024 |        [16 8 8] |          [1024] |
  7 |         -1 |   1 |  123,000 |          Linear |                       [120, 'ReLU'] |       1024 |         120 |          [1024] |           [120] |
  8 |         -1 |   1 |   10,164 |          Linear |                        [84, 'ReLU'] |        120 |          84 |           [120] |            [84] |
  9 |         -1 |   1 |      850 |          Linear |                                [10] |         84 |          10 |            [84] |            [10] |
Model Summary: 20 layers, 137,862 parameters, 137,862 gradients
```
## AutoML with Kindle
* [Kindle](https://github.com/JeiKeiLim/kindle) offers the easiest way to build your own deep learning architecture. Beyond building a model, AutoML became easier with [Kindle](https://github.com/JeiKeiLim/kindle) and [Optuna](https://optuna.org) or other optimization frameworks.
* For further information, please refer to [https://limjk.ai/kindle/usages/#automl-with-optuna](https://limjk.ai/kindle/usages/#automl-with-optuna)
# Supported modules
* Detailed documents can be found [https://limjk.ai/kindle/modules/](https://limjk.ai/kindle/modules/)
|Module|Components|Arguments|
|------|----------|---------|
|Conv|Conv -> BatchNorm -> Activation|[out_channels, kernel_size, stride, padding, groups, activation]|
|DWConv|DWConv -> BatchNorm -> Activation|[out_channels, kernel_size, stride, padding, activation]|
|Focus|Reshape x -> Conv -> Concat|[out_channels, kernel_size, stride, padding, activation]|
|Bottleneck|Expansion ConvBNAct -> ConvBNAct|[out_channels, shortcut, groups, expansion, activation]|
|BottleneckCSP|CSP Bottleneck|[out_channels, shortcut, groups, expansion, activation]
|C3|CSP Bottleneck with 3 Conv|[out_channels, shortcut, groups, expansion, activation]|
|MV2Block|MobileNet v2 block|[out_channels, stride, expand_ratio, activation]|
|AvgPool|Average pooling|[kernel_size, stride, padding]|
|MaxPool|Max pooling|[kernel_size, stride, padding]|
|GlobalAvgPool|Global Average Pooling|[]|
|SPP|Spatial Pyramid Pooling|[out_channels, [kernel_size1, kernel_size2, ...], activation]|
|SPPF|Spatial Pyramid Pooling - Fast|[out_channels, kernel_size, activation]|
|Flatten|Flatten|[]|
|Concat|Concatenation|[dimension]|
|Linear|Linear|[out_channels, activation]|
|Add|Add|[]|
|UpSample|UpSample|[]|
|Identity|Identity|[]|
|YamlModule|Custom module from yaml file|['yaml/file/path', arg0, arg1, ...]|
|nn.{module_name}|PyTorch torch.nn.* module|Please refer to [https://pytorch.org/docs/stable/nn.html](https://pytorch.org/docs/stable/nn.html)|
|Pretrained|timm.create_model|[model_name, use_feature_maps, features_only, pretrained]|
|PreTrainedFeatureMap|Bypass feature layer map from `Pretrained`|[feature_idx]|
|YOLOHead|YOLOv5 head module|[n_classes, anchors, out_xyxy]|
|MobileViTBlock|MobileVit Block(experimental)|[conv_channels, mlp_channels, depth, kernel_size, patch_size, dropout, activation]
* **nn.{module_name}** is currently experimental. This might change in the future release. Use with caution.
* For the supported model of **Pretrained** module, please refer to [https://rwightman.github.io/pytorch-image-models/results](https://rwightman.github.io/pytorch-image-models/results)
# Custom module support
## Custom module with yaml
* You can make your own custom module with yaml file. Please refer to [https://limjk.ai/kindle/tutorial/#2-design-custom-module-with-yaml](https://limjk.ai/kindle/tutorial/#2-design-custom-module-with-yaml) for further detail.
## Custom module from source code
* You can also make your own custom module from the source code. Please refer to https://limjk.ai/kindle/tutorial/#3-design-custom-module-from-source for further detail.
# Pretrained model support
* Pre-trained model from [timm](https://github.com/rwightman/pytorch-image-models) can be loaded in kindle yaml config file. Please refer to [https://limjk.ai/kindle/tutorial/#4-utilize-pretrained-model](https://limjk.ai/kindle/tutorial/#4-utilize-pretrained-model) for further detail.
# Model profiler
* Kindle provides model profiling option for each layers and calculating MACs.
* Please refer to https://limjk.ai/kindle/functionality/#1-model-profiling for further detail.
# Test Time Augmentation
* Kindle model supports TTA with easy usability. Just pass the model input and augmentation function.
* Please refer to https://limjk.ai/kindle/functionality/#3-test-time-augmentation for further detail.
# Recent changes
|Version|Description|Date|
|-------|-----------|----|
|0.4.16|Fix decomposed conv fuse and add kindle version variable.|2021. 10. 25|
|0.4.14|Add MobileViTBlock module|2021. 10. 18|
|0.4.12|Add MV2Block module|2021. 10. 14|
|0.4.11|Add SPPF module in yolov5 v6.0|2021. 10. 13|
|0.4.10|Fix ONNX export padding issue.|2021. 10. 13|
|0.4.6|Add YOLOHead to choose coordinates format.|2021. 10. 09|
|0.4.5|Add C3 Module|2021. 10. 08|
|0.4.4|Fix YOLOHead module issue with anchor scaling|2021. 10. 08|
|0.4.2|Add YOLOModel, and ConvBN fusion, and Fix activation apply issue|2021. 09. 19|
|0.4.1|Add YOLOHead, SPP, BottleneckCSP, and Focus modules|2021. 09. 13|
|0.3.2|Fix PreTrained to work without PreTrainedFeatureMap|2021. 06. 03|
|0.3.1|Calculating MACs in profiler|2021. 05. 02|
|0.3.0|Add PreTrained support|2021. 04. 20|
# Planned features
* ~~Custom module support~~
* ~~Custom module with yaml support~~
* ~~Use pre-trained model~~
* Graphical model file generator
* Ensemble model
* More modules!

%package -n python3-kindle
Summary:	Kindle - Making a PyTorch model easier than ever!
Provides:	python-kindle
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-kindle
  0 |         -1 |   1 |      616 |            Conv | [6, 5, 1, 0], activation: LeakyReLU |          3 |           8 |     [3, 32, 32] |     [8, 32, 32] |
  1 |         -1 |   1 |        0 |         MaxPool |                                 [2] |          8 |           8 |       [8 32 32] |     [8, 16, 16] |
  2 |         -1 |   1 |    3,200 |       nn.Conv2d |          [16, 5, 1, 2], bias: False |          8 |          16 |       [8 16 16] |    [16, 16, 16] |
  3 |         -1 |   1 |       32 |  nn.BatchNorm2d |                                  [] |         16 |          16 |      [16 16 16] |    [16, 16, 16] |
  4 |         -1 |   1 |        0 |         nn.ReLU |                                  [] |         16 |          16 |      [16 16 16] |    [16, 16, 16] |
  5 |         -1 |   1 |        0 |         MaxPool |                                 [2] |         16 |          16 |      [16 16 16] |      [16, 8, 8] |
  6 |         -1 |   1 |        0 |         Flatten |                                  [] |         -1 |        1024 |        [16 8 8] |          [1024] |
  7 |         -1 |   1 |  123,000 |          Linear |                       [120, 'ReLU'] |       1024 |         120 |          [1024] |           [120] |
  8 |         -1 |   1 |   10,164 |          Linear |                        [84, 'ReLU'] |        120 |          84 |           [120] |            [84] |
  9 |         -1 |   1 |      850 |          Linear |                                [10] |         84 |          10 |            [84] |            [10] |
Model Summary: 20 layers, 137,862 parameters, 137,862 gradients
```
## AutoML with Kindle
* [Kindle](https://github.com/JeiKeiLim/kindle) offers the easiest way to build your own deep learning architecture. Beyond building a model, AutoML became easier with [Kindle](https://github.com/JeiKeiLim/kindle) and [Optuna](https://optuna.org) or other optimization frameworks.
* For further information, please refer to [https://limjk.ai/kindle/usages/#automl-with-optuna](https://limjk.ai/kindle/usages/#automl-with-optuna)
# Supported modules
* Detailed documents can be found [https://limjk.ai/kindle/modules/](https://limjk.ai/kindle/modules/)
|Module|Components|Arguments|
|------|----------|---------|
|Conv|Conv -> BatchNorm -> Activation|[out_channels, kernel_size, stride, padding, groups, activation]|
|DWConv|DWConv -> BatchNorm -> Activation|[out_channels, kernel_size, stride, padding, activation]|
|Focus|Reshape x -> Conv -> Concat|[out_channels, kernel_size, stride, padding, activation]|
|Bottleneck|Expansion ConvBNAct -> ConvBNAct|[out_channels, shortcut, groups, expansion, activation]|
|BottleneckCSP|CSP Bottleneck|[out_channels, shortcut, groups, expansion, activation]
|C3|CSP Bottleneck with 3 Conv|[out_channels, shortcut, groups, expansion, activation]|
|MV2Block|MobileNet v2 block|[out_channels, stride, expand_ratio, activation]|
|AvgPool|Average pooling|[kernel_size, stride, padding]|
|MaxPool|Max pooling|[kernel_size, stride, padding]|
|GlobalAvgPool|Global Average Pooling|[]|
|SPP|Spatial Pyramid Pooling|[out_channels, [kernel_size1, kernel_size2, ...], activation]|
|SPPF|Spatial Pyramid Pooling - Fast|[out_channels, kernel_size, activation]|
|Flatten|Flatten|[]|
|Concat|Concatenation|[dimension]|
|Linear|Linear|[out_channels, activation]|
|Add|Add|[]|
|UpSample|UpSample|[]|
|Identity|Identity|[]|
|YamlModule|Custom module from yaml file|['yaml/file/path', arg0, arg1, ...]|
|nn.{module_name}|PyTorch torch.nn.* module|Please refer to [https://pytorch.org/docs/stable/nn.html](https://pytorch.org/docs/stable/nn.html)|
|Pretrained|timm.create_model|[model_name, use_feature_maps, features_only, pretrained]|
|PreTrainedFeatureMap|Bypass feature layer map from `Pretrained`|[feature_idx]|
|YOLOHead|YOLOv5 head module|[n_classes, anchors, out_xyxy]|
|MobileViTBlock|MobileVit Block(experimental)|[conv_channels, mlp_channels, depth, kernel_size, patch_size, dropout, activation]
* **nn.{module_name}** is currently experimental. This might change in the future release. Use with caution.
* For the supported model of **Pretrained** module, please refer to [https://rwightman.github.io/pytorch-image-models/results](https://rwightman.github.io/pytorch-image-models/results)
# Custom module support
## Custom module with yaml
* You can make your own custom module with yaml file. Please refer to [https://limjk.ai/kindle/tutorial/#2-design-custom-module-with-yaml](https://limjk.ai/kindle/tutorial/#2-design-custom-module-with-yaml) for further detail.
## Custom module from source code
* You can also make your own custom module from the source code. Please refer to https://limjk.ai/kindle/tutorial/#3-design-custom-module-from-source for further detail.
# Pretrained model support
* Pre-trained model from [timm](https://github.com/rwightman/pytorch-image-models) can be loaded in kindle yaml config file. Please refer to [https://limjk.ai/kindle/tutorial/#4-utilize-pretrained-model](https://limjk.ai/kindle/tutorial/#4-utilize-pretrained-model) for further detail.
# Model profiler
* Kindle provides model profiling option for each layers and calculating MACs.
* Please refer to https://limjk.ai/kindle/functionality/#1-model-profiling for further detail.
# Test Time Augmentation
* Kindle model supports TTA with easy usability. Just pass the model input and augmentation function.
* Please refer to https://limjk.ai/kindle/functionality/#3-test-time-augmentation for further detail.
# Recent changes
|Version|Description|Date|
|-------|-----------|----|
|0.4.16|Fix decomposed conv fuse and add kindle version variable.|2021. 10. 25|
|0.4.14|Add MobileViTBlock module|2021. 10. 18|
|0.4.12|Add MV2Block module|2021. 10. 14|
|0.4.11|Add SPPF module in yolov5 v6.0|2021. 10. 13|
|0.4.10|Fix ONNX export padding issue.|2021. 10. 13|
|0.4.6|Add YOLOHead to choose coordinates format.|2021. 10. 09|
|0.4.5|Add C3 Module|2021. 10. 08|
|0.4.4|Fix YOLOHead module issue with anchor scaling|2021. 10. 08|
|0.4.2|Add YOLOModel, and ConvBN fusion, and Fix activation apply issue|2021. 09. 19|
|0.4.1|Add YOLOHead, SPP, BottleneckCSP, and Focus modules|2021. 09. 13|
|0.3.2|Fix PreTrained to work without PreTrainedFeatureMap|2021. 06. 03|
|0.3.1|Calculating MACs in profiler|2021. 05. 02|
|0.3.0|Add PreTrained support|2021. 04. 20|
# Planned features
* ~~Custom module support~~
* ~~Custom module with yaml support~~
* ~~Use pre-trained model~~
* Graphical model file generator
* Ensemble model
* More modules!

%package help
Summary:	Development documents and examples for kindle
Provides:	python3-kindle-doc
%description help
  0 |         -1 |   1 |      616 |            Conv | [6, 5, 1, 0], activation: LeakyReLU |          3 |           8 |     [3, 32, 32] |     [8, 32, 32] |
  1 |         -1 |   1 |        0 |         MaxPool |                                 [2] |          8 |           8 |       [8 32 32] |     [8, 16, 16] |
  2 |         -1 |   1 |    3,200 |       nn.Conv2d |          [16, 5, 1, 2], bias: False |          8 |          16 |       [8 16 16] |    [16, 16, 16] |
  3 |         -1 |   1 |       32 |  nn.BatchNorm2d |                                  [] |         16 |          16 |      [16 16 16] |    [16, 16, 16] |
  4 |         -1 |   1 |        0 |         nn.ReLU |                                  [] |         16 |          16 |      [16 16 16] |    [16, 16, 16] |
  5 |         -1 |   1 |        0 |         MaxPool |                                 [2] |         16 |          16 |      [16 16 16] |      [16, 8, 8] |
  6 |         -1 |   1 |        0 |         Flatten |                                  [] |         -1 |        1024 |        [16 8 8] |          [1024] |
  7 |         -1 |   1 |  123,000 |          Linear |                       [120, 'ReLU'] |       1024 |         120 |          [1024] |           [120] |
  8 |         -1 |   1 |   10,164 |          Linear |                        [84, 'ReLU'] |        120 |          84 |           [120] |            [84] |
  9 |         -1 |   1 |      850 |          Linear |                                [10] |         84 |          10 |            [84] |            [10] |
Model Summary: 20 layers, 137,862 parameters, 137,862 gradients
```
## AutoML with Kindle
* [Kindle](https://github.com/JeiKeiLim/kindle) offers the easiest way to build your own deep learning architecture. Beyond building a model, AutoML became easier with [Kindle](https://github.com/JeiKeiLim/kindle) and [Optuna](https://optuna.org) or other optimization frameworks.
* For further information, please refer to [https://limjk.ai/kindle/usages/#automl-with-optuna](https://limjk.ai/kindle/usages/#automl-with-optuna)
# Supported modules
* Detailed documents can be found [https://limjk.ai/kindle/modules/](https://limjk.ai/kindle/modules/)
|Module|Components|Arguments|
|------|----------|---------|
|Conv|Conv -> BatchNorm -> Activation|[out_channels, kernel_size, stride, padding, groups, activation]|
|DWConv|DWConv -> BatchNorm -> Activation|[out_channels, kernel_size, stride, padding, activation]|
|Focus|Reshape x -> Conv -> Concat|[out_channels, kernel_size, stride, padding, activation]|
|Bottleneck|Expansion ConvBNAct -> ConvBNAct|[out_channels, shortcut, groups, expansion, activation]|
|BottleneckCSP|CSP Bottleneck|[out_channels, shortcut, groups, expansion, activation]
|C3|CSP Bottleneck with 3 Conv|[out_channels, shortcut, groups, expansion, activation]|
|MV2Block|MobileNet v2 block|[out_channels, stride, expand_ratio, activation]|
|AvgPool|Average pooling|[kernel_size, stride, padding]|
|MaxPool|Max pooling|[kernel_size, stride, padding]|
|GlobalAvgPool|Global Average Pooling|[]|
|SPP|Spatial Pyramid Pooling|[out_channels, [kernel_size1, kernel_size2, ...], activation]|
|SPPF|Spatial Pyramid Pooling - Fast|[out_channels, kernel_size, activation]|
|Flatten|Flatten|[]|
|Concat|Concatenation|[dimension]|
|Linear|Linear|[out_channels, activation]|
|Add|Add|[]|
|UpSample|UpSample|[]|
|Identity|Identity|[]|
|YamlModule|Custom module from yaml file|['yaml/file/path', arg0, arg1, ...]|
|nn.{module_name}|PyTorch torch.nn.* module|Please refer to [https://pytorch.org/docs/stable/nn.html](https://pytorch.org/docs/stable/nn.html)|
|Pretrained|timm.create_model|[model_name, use_feature_maps, features_only, pretrained]|
|PreTrainedFeatureMap|Bypass feature layer map from `Pretrained`|[feature_idx]|
|YOLOHead|YOLOv5 head module|[n_classes, anchors, out_xyxy]|
|MobileViTBlock|MobileVit Block(experimental)|[conv_channels, mlp_channels, depth, kernel_size, patch_size, dropout, activation]
* **nn.{module_name}** is currently experimental. This might change in the future release. Use with caution.
* For the supported model of **Pretrained** module, please refer to [https://rwightman.github.io/pytorch-image-models/results](https://rwightman.github.io/pytorch-image-models/results)
# Custom module support
## Custom module with yaml
* You can make your own custom module with yaml file. Please refer to [https://limjk.ai/kindle/tutorial/#2-design-custom-module-with-yaml](https://limjk.ai/kindle/tutorial/#2-design-custom-module-with-yaml) for further detail.
## Custom module from source code
* You can also make your own custom module from the source code. Please refer to https://limjk.ai/kindle/tutorial/#3-design-custom-module-from-source for further detail.
# Pretrained model support
* Pre-trained model from [timm](https://github.com/rwightman/pytorch-image-models) can be loaded in kindle yaml config file. Please refer to [https://limjk.ai/kindle/tutorial/#4-utilize-pretrained-model](https://limjk.ai/kindle/tutorial/#4-utilize-pretrained-model) for further detail.
# Model profiler
* Kindle provides model profiling option for each layers and calculating MACs.
* Please refer to https://limjk.ai/kindle/functionality/#1-model-profiling for further detail.
# Test Time Augmentation
* Kindle model supports TTA with easy usability. Just pass the model input and augmentation function.
* Please refer to https://limjk.ai/kindle/functionality/#3-test-time-augmentation for further detail.
# Recent changes
|Version|Description|Date|
|-------|-----------|----|
|0.4.16|Fix decomposed conv fuse and add kindle version variable.|2021. 10. 25|
|0.4.14|Add MobileViTBlock module|2021. 10. 18|
|0.4.12|Add MV2Block module|2021. 10. 14|
|0.4.11|Add SPPF module in yolov5 v6.0|2021. 10. 13|
|0.4.10|Fix ONNX export padding issue.|2021. 10. 13|
|0.4.6|Add YOLOHead to choose coordinates format.|2021. 10. 09|
|0.4.5|Add C3 Module|2021. 10. 08|
|0.4.4|Fix YOLOHead module issue with anchor scaling|2021. 10. 08|
|0.4.2|Add YOLOModel, and ConvBN fusion, and Fix activation apply issue|2021. 09. 19|
|0.4.1|Add YOLOHead, SPP, BottleneckCSP, and Focus modules|2021. 09. 13|
|0.3.2|Fix PreTrained to work without PreTrainedFeatureMap|2021. 06. 03|
|0.3.1|Calculating MACs in profiler|2021. 05. 02|
|0.3.0|Add PreTrained support|2021. 04. 20|
# Planned features
* ~~Custom module support~~
* ~~Custom module with yaml support~~
* ~~Use pre-trained model~~
* Graphical model file generator
* Ensemble model
* More modules!

%prep
%autosetup -n kindle-0.4.16

%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-kindle -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Tue May 30 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.16-1
- Package Spec generated