-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CHANGELOG.txt
488 lines (291 loc) · 14.8 KB
/
CHANGELOG.txt
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
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# Changelog
## [0.5.1] - 2024-10-11
### Fix: Make built-in extension action exit early when building legacy
Signed-off-by: Mahid Sheikh <[email protected]>
### Fix: Rebuild Api object when legacy building to avoid extension action
Signed-off-by: Mahid Sheikh <[email protected]>
### Chore: Update CHANGELOG.txt
Signed-off-by: Mahid Sheikh <[email protected]>
## [0.5] - 2024-10-05
### Fix: Make depends_on check occur before module loading
Signed-off-by: Mahid Sheikh <[email protected]>
### Fix: Change action loading to account for additional actions
Signed-off-by: Mahid Sheikh <[email protected]>
### Fix: Make extensions only install in 4.2+
Signed-off-by: Mahid Sheikh <[email protected]>
### Fix: Resolve verification type checks caused by Python 3.8
Signed-off-by: Mahid Sheikh <[email protected]>
### Fix: Fix error with dataclass initialization
Signed-off-by: Mahid Sheikh <[email protected]>
### Fix: Use language-agnostic method for copyright validation
Signed-off-by: Mahid Sheikh <[email protected]>
### Docs: Add documentation on config options
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add depends_on for actions
This allows defining actions that require previous actions to execute
beforehand, like debug actions for specific build configurations.
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add --build-extension-only flag
This allows building only an extension. We don't have one for legacy
builds as we can't easily do that.
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add legacy building to BpyBuild
This allows addons that need to support both extensions and legacy
builds to create both in one go, thus reducing the amount of work
needed to support both older and newer versions of Blender.
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Only load modules that are passed in the CLI
This is mostly to make debugging BpyBuild with MCprep slightly
easier, and make it slightly faster overall
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add is_extension to BabContext and compatibility checks
This wires the new compatibility checks in lib_bpybuild_ext to BpyBuild
itself. In addition, this also adds the new is_extension variable to
BabContext in order to make it easier for actions to determine when an
extension is being build
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat(ext): Add the ability to check for compatibility issues
This is to make it easier for developers transitioning from legacy
addons to extensions to find and fix known compatibility issues with
extensions in legacy codebases.
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Make extension building the default
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add basic extension building to BpyBuild
This adds the ability to build extensions in BpyBuild, if
build_extension is enabled in the config. At the moment, this does not
handle legacy building.
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Return Path in build_ext
Since we need the path in BpyBuild in order to do operations such as
installation, we'll return the path in build_ext
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add validation for blender_version_max
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Finished manifest verification and added build generation
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add basic manifest verification
This implements manifest verification solely based on the Blender
documentation, so that my sanity doesn't dip -10. This means that
LibBpyBuildExt will no longer have 100% parity with the Blender
extension builder, at the cost that we can develop this much faster.
The exception to this is for security related checks, such as
blacklisting certain control characters.
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add beginnings of lib_bpybuild_ext
lib_bpybuild_ext (otherwise known as LibBpyBuildExt) aims to be a BSD
implementation of the Blender Extension builder in order to allow
BpyBuild to implement extension building. The goal is to implement 100%
feature parity with the Blender Extension builder, down to verification
checks.
Although ideally we should get this done soon, we're not really in any
rush since MCprep won't move to extensions for a good while. However,
without this, BpyBuild can't implement extensions, so we should try and
move as fast as possible.
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add 4.2+ check when building extensions
Extensions are a 4.2+ feature, so obviously addons that build extensions
should include 4.2 or above in the range of supported versions.
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Enforce string restrictions on extension_settings::build_name
`build_name` has string restrictions enforced on it, so for
consistency, `extension_settings::build_name` also has string restrictions
enforced on it.
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add extension_settings::remove_bl_info
This is intended for developers building both an extension and legacy
addon. The idea is that BpyBuild will be able to remove the `bl_info`
dictionary when building an addon as an extension, if and only if the
developer also has extension_settings::build_legacy enabled (otherwise
what's the point?).
This feature is planned to be opt-in, as it involves modifying an
addon's source code. However, perhaps at some point we could possibly
make it the default for building extensions with
extension_settings::build_legacy enabled
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Add config options for Extensions
Blender 4.2 recently introduced Extensions to replace the old legacy
addons. As a starting point to support Extensions, this patch adds the
needed config options to support Extensions. These new config options
are:
- build_extension [bool]: the switch to enable extension building
- extension_settings::blender_binary [str]: the path to the Blender
binary needed to build extensions (4.2+)
- extension_settings::build_legacy [bool]: the switch to build a legacy
addon alongside the extension
- extension_settings::build_name [str]: an optional alternative name for
extensions. By default however, we plan to do[build_name]-extension
It should be noted that this patch exclusively adds new config options,
the actual building of extensions is not supported yet. In addition, the
current roadmap for extension support involves the developer passing in
the direct path to the Blender binary, which isn't ideal for versions of
Blender from the Microsoft Store, Snap repo, and Flathub. Perhaps we may
implement our own extension builder.
Signed-off-by: Mahid Sheikh <[email protected]>
### Python: Update minimum support to Python 3.9
The update to Python 3.9 is for several reasons:
- Python 3.8 will be EOL in October
- Python 3.9 introduces better type annotations
- We don't want to be behind with dependencies
Signed-off-by: Mahid Sheikh <[email protected]>
### Chore: Update employment disclaimer
Signed-off-by: Mahid Sheikh <[email protected]>
### Chore: Add disclaimer regarding my employment
Signed-off-by: Mahid Sheikh <[email protected]>
### Refactor: Move list of actions to execute to Api object
By doing this, we can add our own built-in actions at runtime trivially,
without much extra effort
Signed-off-by: Mahid Sheikh <[email protected]>
### Refactor: Move manifest verification to built-in action
With the actions system we have in BpyBuild, it's actually easier to
make an action that performs manifest verification in the main hook.
This way, we get pre-build checks for free.
Signed-off-by: Mahid Sheikh <[email protected]>
### Refactor: Remove build_ext
Building extensions is simple enough, the more important part is
validating the manifest and performing extension checks.
Signed-off-by: Mahid Sheikh <[email protected]>
### Refactor: Replace sys.exit calls with exit_fail
To avoid typing so many characters and repeating ourselves, this patch
adds util.exit_fail, which is equal to sys.exit(EXIT_FAIL), but in an
easier to type fashion.
Signed-off-by: Mahid Sheikh <[email protected]>
### Style: Add proper name-spacing to extension errors
Signed-off-by: Mahid Sheikh <[email protected]>
### Tests: Add test for depends_on
Signed-off-by: Mahid Sheikh <[email protected]>
### Tests: Add legacy building test
Signed-off-by: Mahid Sheikh <[email protected]>
### Tests: Add test for regular extension building
Signed-off-by: Mahid Sheikh <[email protected]>
### Tests: Add manifest files to tests
Signed-off-by: Mahid Sheikh <[email protected]>
### Tests: Add new test dirs for extensions and legacy building
Signed-off-by: Mahid Sheikh <[email protected]>
## [0.4.1] - 2024-06-01
### Fix: Properly install addon if not already installed
Signed-off-by: Mahid Sheikh <[email protected]>
### Fix: Removed redundant argument in build_config
### Docs: Added details on name and file restrictions
### Docs: Removed tests.md for now
### Docs: Clarified Getting Started
Co-authored-by: Patrick W. Crawford <[email protected]>
### Docs: Added missing period to README
### Docs: Added info on using BpyBuild in addon tests
### Docs: Added info on tests in CONTRIBUTING.md
### Docs: Fixed warning in actions guide
### Feat: Add version shorthands like + and ..
The idea of version shorthands is to reduce the need for comically large
config files with giant lists of versions. Instead of the following:
```yaml
install_versions:
- 2.8
...
- 4.0
```
Developers can now do this:
```yaml
install_versions:
- 2.8..4.0
```
Way better for developer experience
Signed-off-by: Mahid Sheikh <[email protected]>
### Feat: Added string input checks
Seeing as build configs are basically untrusted user input, the current
system of not checking if the strings are valid is a pretty big security
risk. As such, BpyBuild now checks multiple parts of the config to make
sure that strings do not contain harmful characters, by limiting what
characters are allowed in the first place.
### Feat: Improved errors for config issues
### Feat: Added error handling for config parsing
### Feat: Actions can now be declared without a script
### Refactor: Changed how install_versions is checked
Previously we checked install_versions with a try-except statement that
would attempt to convert the value to a float and throw an error if it
failed. However, floats in YAML are actual floats, so we can just check
if the float is of the type float with isinstance(ver, float)
### Refactor: Migrated from cattrs to manual parsing
Although cattrs was useful for parsing the config data to an attrs
object, it had issues with errors being undecipherable to the end user.
In addition, cattrs seemed too overkill for a simple config. Thus, we've
moved away from cattrs and implemented our own basic parser to manually
parse and construct the Config object, with better errors.
### Style: Added docs for BpyError and BpyWarning
### Style: Applied Ruff's import sorter to all files
### Style: Updated codedocs
### Style: Switch to native types with __futures__
### Style: Added TypeDicts for annotation YAML data
### Test: Remove xgettext-replacement test
Signed-off-by: Mahid Sheikh <[email protected]>
<!-- generated by git-cliff -->
## [0.4.0] - 2024-04-18
### Fix: Add parent folder of script to sys.path
### Docs: Redone readme and made Getting Started
### Docs: added a getting started section
### Docs: added info on argument-less main
### Docs: removed working dir references in docs
### Docs: added info on post_install in tests for todo
### Docs: Added docs for Api object
### Feat: added backwards compat for old actions
### Feat: add path of missing file in error
### Refactor: removed circular import
### Style: Reduced indentation
### Test: MCprep tests now download in parallel
### Test: added MCprep tests for translation builds
### Test: added tests with MCprep's source tree
### Test: added proper check for post install hooks
### Test: added test checking for non-existent configs
### Test: added hooks test
### Tests: added build tests
### Tests: Modified actions to pass tests
### Test: added basic test for help argument
### Test: Moved test files
<!-- generated by git-cliff -->
## [0.3.0] - 2024-02-02
### Fix: Fixed issue with not finding .X0 versions
### Test: Added 2.8 to test file
## [0.3.0-alpha-2] - 2023-12-19
## [0.3.0-alpha-1] - 2023-09-03
### Added support for auto-installing
Working on my birthday... *sigh*
Anyway, Bpy-Build now supports automatically installing to specific
Blender versions, either through the install_versions tag or the -v
argument. Now Bpy-Build's basic functionality has been returned, yay...
Also happy birthday to me ^_^
### Changed actions to be Python based
Python based actions means less code to maintain on my end, and more
flexibility on the developer's end, win-win.
Now instead of forcing developers to use a limited subset of commands
and non-portable shell commands (curse you Windows), developers can now
define actions in Python like any regular Python script. No API, no
nothing, just the assumption that the script will be ran in the
intermediate directory.
### Updated test recipe in Justfile
### Changes to actions syntax
To make parsing easier, actions will now have the following syntax:
!action <action args>
This is not yet final, especially as I learn more on how YAML works, but
the final version will likely be simmilar.
### Added basic argument parsing and attrs dependency
Since none of the existing libraries for argument parsing have quite
what I want, I decided to write my own argument parser in Python using a
class and attrs (https://www.attrs.org).
Why attrs instead of regular dataclasses? While dataclasses are based on
attrs design wise, attrs has the following advantages:
- Better defaults (good defaults are important)
- Fine control over the class, but nothing too complicated
- Version independence
The last one is important. Bpy-Build needs to support Python 3.9 and
above. Many good dataclass features meanwhile are 3.10+ however, which
means we are unable to use them. This discrepency in version support
will also only get wider as more time passes, hence why version
independence is so important.
Attrs does not have any runtime costs, it performs changes to the actual
class itself and Python bytecode, so the only costs are in Python's
compile time, most of which aren't massive (and likely improved in
Python 3.11 anyway)
While the class makes it seem like YAML will continue to be the config
file format, I'm still deciding between YAML and TOML
### Updated pre-commit hook for Mypy
We forgot pretty printing and specifying the folder, whoops
<!-- generated by git-cliff -->