190 Commits

Author SHA1 Message Date
Campbell Barton
801ee4203f Cleanup: remove unused "--cmake-command" & import
Ref !138644
2025-10-15 19:14:26 +11:00
Sergey Sharybin
cfd04172c9 Fix #144521: Unable to fetch LFS objects on make update with Glthub mirror
The setting is called `lfs.remote.searchall`, the `remote` part of it being
an exact string, it is not to be expanded with the name of the remote.

Whenever name of the remote is to be used Git documentation uses `<remote>`
syntax.

Tested by triggering the original issue (clone the Github mirror, make update,
wait for a new LFS object appear in the upstream, make update again). Before
this change the LFS object will not be fetched, and based on the Git Curl's
log only the github origin was used to fetch LFS object, none other remotes
were tried.

Also confirmed by checking the Git-LFS code:
https://github.com/git-lfs/git-lfs/blob/v3.7.0/config/config.go#L232

Pull Request: https://projects.blender.org/blender/blender/pulls/144574
2025-08-14 17:51:52 +02:00
Sybren A. Stüvel
bfd43d4320 Build files: add note that certain files should be py3.6 compatible
Add a note to `build_files/utils/README.md` that explains the Python files
in that directory have to be compatible with Python 3.6.

Pull Request: https://projects.blender.org/blender/blender/pulls/143792
2025-08-09 16:57:10 +02:00
Bart van der Braak
2986a2696f Python Module: Add note about archived versions
Related to infrastructure/meta#146

Pull Request: https://projects.blender.org/blender/blender/pulls/143470
2025-07-30 10:43:25 +02:00
Brecht Van Lommel
b4417cff35 Build: Change make update to always do git lfs pull
Some users still have issues getting LFS files downloaded properly, though the
exact cause is unclear. Normally with a properly installed git lfs, git pull
should already take care of it.

When for whatever reason that is not the case and files have not been fetched
yet, now do lfs pull which is the same as lfs fetch + lfs checkout. Even when
git pull can not run.

Ref #143461

Pull Request: https://projects.blender.org/blender/blender/pulls/143478
2025-07-29 13:35:03 +02:00
Jonas Holzman
9d993b4f74 Build: Add macOS x64 deprecation warning to make update
Add a simple deprecation message to warn users that macOS pre-compiled
dependencies are no longer provided starting with 5.0, and that they
should either build the libraries themselves or downgrade to 4.5.

This is what the warning looks like in context:
```
$ make update
git lfs install --skip-repo
Git LFS initialized.

Configuring Precompiled Libraries
=================================

Detected platform     : macos
Detected architecture : x64

Updating Libraries
==================

* Skipping lib/linux_x64
* Skipping lib/macos_arm64
* Skipping lib/windows_x64
* Skipping lib/windows_arm64

Update finished with the following messages
===========================================

Blender repository skipped: you have unstaged changes
WARNING: macOS x64/Intel support was dropped in Blender 5.0.
         As such, pre-compiled dependencies are no longer provided.
         You may build the dependencies yourself, or downgrade to Blender 4.5.
         For more details, please see: https://devtalk.blender.org/t/38835
```

Pull Request: https://projects.blender.org/blender/blender/pulls/143133
2025-07-25 22:39:00 +02:00
Campbell Barton
f470a0bbd0 Cleanup: quiet mypy warning 2025-07-22 11:59:43 +10:00
Sebastian Parborg
0f4a46093e Fix: Properly package unicode folders/files with make_source_archive.py
The issue was that `git ls-files` will per default escape unicode
characters. This make it so that our python script couldn't find any
files or folder as it expected unescaped characters.
2025-07-21 12:37:11 +02:00
Sergey Sharybin
963d23b0de Make update: Tweak logic for the LFS fallback
Check for both git.b.o and projects.b.o pars of the URL.
The LFS objects should be able to be fetched from either
of those domains.

Pull Request: https://projects.blender.org/blender/blender/pulls/140647
2025-06-20 17:26:15 +02:00
Sergey Sharybin
ab4c8853ee Make update: Automatically switch to git.blender.org URLs
Ref #140121

Pull Request: https://projects.blender.org/blender/blender/pulls/140538
2025-06-17 17:34:28 +02:00
Bastien Montagne
3a47bd7e5a Fix #139810: Missing git lfs checkout in make update.
When binary files managed by git-lfs are not hosted by the main source
repo (e.g. when using the github mirror), the fall-back repo set up by
`lfs_fallback_setup` does fetch the files, but the follow-up call to
`git pull` in `work_tree_update` does not check them out.

This commit simply adds an extra `git lfs checkout` command there.

Pull Request: https://projects.blender.org/blender/blender/pulls/139825
2025-06-04 18:19:25 +02:00
Campbell Barton
6a1fa176ef Cleanup: spelling in comments & duplicate terms (check_spelling.py)
Also minor clarification in doc-string.
2025-06-04 01:51:29 +00:00
Brecht Van Lommel
68ddf4125c Build: Explicitly fetch LFS files from fallback remote
Do it in make update tight after adding the remote. For some reason the
searchall mechanism does not work reliably immediately after checkout.

Fixes part of #139328.
2025-05-26 19:09:27 +02:00
Sebastian Parborg
09766d1996 Fix: Don't update submodules that we shouldn't checkout
There were a logic error in make update where we would fetch data from
submodules when not referenced in our local git config.

Fixes part of #139328.

Pull Request: https://projects.blender.org/blender/blender/pulls/139350
2025-05-26 19:09:26 +02:00
Sebastian Parborg
790d808b71 Fix: Lint issues in make_update.py 2025-05-26 15:31:17 +02:00
Sebastian Parborg
d94aeee2dc Linux: Fetch libraries with "make update", update help arguments for make_update.py
End users that do not want the libraries can use `make update_code`

Pull Request: https://projects.blender.org/blender/blender/pulls/139353
2025-05-26 14:33:35 +02:00
Campbell Barton
b9d4b3b9a4 Cleanup: unused import 2025-05-09 13:36:18 +10:00
Sergey Sharybin
d0bc85487a Cleanup: Formatting of make_update.py 2025-05-06 13:47:41 +02:00
Sergey Sharybin
1ec9aa1cf1 Fix: make update does not update benchmark data
A mistake in the #137219 which cleanup too much code.

Pull Request: https://projects.blender.org/blender/blender/pulls/138483
2025-05-06 12:21:41 +02:00
Sergey Sharybin
617d79be76 Fix: maker test was checking for the old test files location
There is no need to do this anymore, as the files are expected to
always be there.
2025-05-05 16:52:55 +02:00
Brecht Van Lommel
dfccf9510d Build: Auto add Git LFS fallback remote in "make update"
For the official GitHub mirror and other repositories that do not include LFS
files, this adds an `lfs-fallback` remote. It will be used automatically if a
file can't be found on the regular remote.

Ref #137215

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/137615
2025-05-05 15:33:53 +02:00
Sergey Sharybin
bbfc97ad6f Move tests/data and assets to the main repository
This change moves the tests data files and publish folder of assets
repository to the main blender.git repository as LFS files.

The goal of this change is to eliminate toil of modifying tests,
cherry-picking changes to LFS branches, adding tests as part of a
PR which brings new features or fixes.

More detailed explanation and conversation can be found in the
design task.

Ref #137215

Pull Request: https://projects.blender.org/blender/blender/pulls/137219
2025-05-05 15:10:22 +02:00
Campbell Barton
d616c87d03 Cleanup: spelling in comments (make check_spelling_*) 2025-03-21 11:51:50 +11:00
YimingWu
0566b802c7 Fix #134550: Python: Limit numpy version for bpy wheel
bpy is not compatible with numpy 2+, as the VFX reference platform uses
1.26 atm. This fix amended the install requirement package to specify
numpy>=1.26,<2.0 to mitigate this issue.

Suggested by Brandy Johnston (@bradyajohnston)

Pull Request: https://projects.blender.org/blender/blender/pulls/134551
2025-03-20 15:19:05 +01:00
Sergey Sharybin
44c01ff893 Fix: Incorrect platform tag used for WoA bpy
The platform tag came from virtualized CPU on which Python 3.9 is
running on the buildbot.

Use the same trick to detect the host CPU as for the message on the
splash screen.

Pull Request: https://projects.blender.org/blender/blender/pulls/136085
2025-03-17 16:18:19 +01:00
Campbell Barton
e50420f918 Cleanup: resolve mypy warning 2025-03-06 11:13:09 +11:00
Sebastian Parborg
277add8fc9 Add ability to create a test data archive with make_source_archive
This makes it so that we ship the test data for every major release
in its own separate archive. (In case someone wants to easily run the
tests for a specific older release without using git)

Pull Request: https://projects.blender.org/blender/blender/pulls/135293
2025-03-04 13:55:23 +01:00
Sebastian Parborg
7913237d33 Change make_source_archive to include all submodule files
It will not include submodules that are not checked out by default.
It now also has an explicit variable for folders to skip.

Pull Request: https://projects.blender.org/blender/blender/pulls/135293
2025-03-04 13:55:12 +01:00
Thomas Dinges
d66b10bac0 Cleanup: Remove transform parameter now that asset folder was updated. 2025-02-04 16:43:54 +01:00
Thomas Dinges
21873221f8 Fix make_source_archive using outdated path to assets. 2025-02-04 16:19:54 +01:00
Campbell Barton
4cd827870d Cleanup: quiet check_spelling_* targets
Also correct outdated references to `ghash`.
2025-02-02 13:58:34 +11:00
Campbell Barton
9d4b48b107 Cleanup: spelling in build-files & docs 2025-01-31 15:22:50 +11:00
Brecht Van Lommel
381e125153 Fix: Invalid character in bpy package description on pypi
Unclear why this started happening since the 4.3.0 package, maybe an update
to Python on the build machine.
2025-01-15 09:42:05 +01:00
Campbell Barton
4f1817cc18 Cleanup: declare __all__ for Python scripts
Declare all to make public public API's explicit and
help detect unused code.
2025-01-06 16:45:36 +11:00
Campbell Barton
3091dadfeb Cleanup: declare __all__ for some scripts in build_files/ 2025-01-04 20:37:46 +11:00
Bastien Montagne
2c9ab53273 Add 'system python' validation for some py scripts.
The goal of this test is to try to import some critical py scripts with the
system python of the building machine.
The main target is to ensure that these py scripts remain usable by all
buildbot machines, as some of them are using fairly outdated python
versions.

Current status:
* Scripts in `build_files` and `docs` are checked.
* Some python scripts in `build_files` were 'reverted' to be compatible
  with older required python version currently (3.6).
* A few scripts are excluded from the test, mostly because they use Blender's
  `bpy` module, which means they are only intended to be ran with Blender's
  python anyway.
* The test is only enabled for Linux buildbots currently, as they use the
  oldest Python by far.

Notes:
* Some more scripts are likely to be moved around in the future.
* Whether these tests need to be enabled on windows or macos platforms remains
  an open question.

Pull Request: https://projects.blender.org/blender/blender/pulls/130746
2024-12-24 11:55:29 +01:00
Campbell Barton
6ca1417103 Cleanup: suppress unused Python warnings
Suppress unused warnings using the "vulture" utility.

- Include public definitions in the modules `__all__`.
- Mark arguments & variables as unused with a "_" prefix.
2024-12-03 12:54:13 +11:00
Campbell Barton
bc66905a15 Cleanup: remove/comment unused functions 2024-12-02 11:23:47 +11:00
Campbell Barton
273f48cd53 Cleanup: use main functions to allow importing scripts
Support importing scripts without running their logic to
allow basic validation (see #130746).

Parts of !131037 were used.

Co-authored-by: Bastien Montagne <bastien@blender.org>
2024-11-29 15:54:58 +11:00
Raphael Langerhorst
f662caf722 Add RISCV CPU architecture support to build config
Remove assert statement from make_update.py, making it ready for any
architecture.

Add riscv 32, 64 and 128 bit cpu architecture with little/big endian
to Blender's BLI_build_config.h and Libmv's build_config.h

Tested (to compile) on riscv64 little endian machine.

Pull Request: https://projects.blender.org/blender/blender/pulls/130920
2024-11-28 12:37:26 +01:00
Sergey Sharybin
c533a7b008 Fix: make_bpy_wheel.py is incompatible with Python 3.9
Buildbot uses Python 3.9, so it needs to be supported.

Arguably, the system-wide Python 3.6 needs to be supported to, but
it is a bit more tricky change, and is not a stopper for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/130664
2024-11-21 11:48:43 +01:00
Campbell Barton
3c3c27f1ed Unbreak "make update" on Rocky8 which uses Python 3.6 2024-11-06 21:14:53 +11:00
Campbell Barton
8570dd22e7 Merge branch 'blender-v4.3-release' 2024-11-02 23:06:24 +11:00
Campbell Barton
62a5aed215 Cleanup: quiet mypy type warning 2024-11-02 22:56:57 +11:00
Campbell Barton
a0453ab87a Cleanup: update use of typing in for Python scripts 2024-10-23 12:48:09 +11:00
Campbell Barton
f557b0071f Unbreak "make update" on the buildbot which uses Python 3.9 2024-10-18 13:05:36 +11:00
Campbell Barton
dbfe8db84c Cleanup: remove use of deprecated typing from build_files/ 2024-10-18 11:01:43 +11:00
Brecht Van Lommel
b74dfa8cfc Build: Changes for make deps to work on Linux arm64 again
This is not an officially supported platform, but it was working before
so might as well keep it up to date.

* Tweak logic for various BLENDER_PLATFORM_ARM checks
* Use linux_arm64 name for folders, matching Windows and macOS
* CUDA is enabled, SYCL and HIP are not
* Tested to work on Rocky Linux 8
2024-09-24 15:54:47 +02:00
Sergey Sharybin
0d76071289 Build: Add option to remove stale files from checkout
This change adds `--prune-destructive` command line argument to the
`make_update.py` script which ensures directories which used to be
an in-worktree checkout do not exist. Currently it is addons and
addons_contrib folders.

This gives buildbot an ability to ensure checkout used for build is
correct, regardless of which branch or patch was built there.

The option is needed because sometimes it is still required to be
able to build patches against v330 or v360 which still use the old
style of addons.

Alternative solution could be to ignore the folders in the INSTALL
command, but this could have impact on users who wants to package
custom addons.

The downside of this solution is that buildbot potentially will be
downloading addons and addons_contrib repositories every time it
builds a patch against v330 or v360. It should not be a problem in
practice since the repositories are rather small, and patches for
these tracks are not built very often.

Ref #126557

Pull Request: https://projects.blender.org/blender/blender/pulls/127798
2024-09-18 17:53:25 +02:00
Brecht Van Lommel
97acee6e68 Cleanup: make format 2024-05-27 12:24:16 +02:00