Commit Graph

52 Commits

Author SHA1 Message Date
Campbell Barton 5486c70aae Fix #115056: man-page fails to build with non-portable install
This effectively reverts [0] which required the installed Blender
along with the `bpy` module to load for the install target to generate
the man-page. It turns out running a full Blender at install time can be
quite involved.

Now the man-page generator runs `blender --help` & `blender --version`,
converting the output into a man-page from a Python script.

Some minor changes have also been made:

- Use PYTHON_EXECUTABLE so the systems Python
  (which may not be compatible) isn't used.
- Remove leading blender version from the description
  which was unintentionally being included.

[0]: 61d99d450e
2023-11-28 16:55:53 +11:00
HurricanePootis 70e2c0bcd4 Fix #115056: man page generation fails with Python error
Need to convert byte to string.

Pull Request: https://projects.blender.org/blender/blender/pulls/115127
2023-11-22 20:00:58 +01:00
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton 65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Campbell Barton 61d99d450e manpage: use bpy.app.help_text() for manual text extraction
Call Blender directly to generate the man-page,
instead of relying on the systems Python which called Blender twice and
processed it's output.
2023-05-27 17:55:57 +10:00
Campbell Barton 60d97fb5fa Fix man-page generation when ASAN_OPTIONS included strict_init_order
The install target would fail when ASAN_OPTIONS was set for the
environment that launched the build.

Resolve by explicitly overriding these settings.
2023-05-24 21:54:54 +10:00
Campbell Barton c4c1cc7cd3 Cleanup: double quotes for non-enum strings
Also use back-ticks for code-references in comments.
2023-04-18 10:51:32 +10:00
Campbell Barton 39c341bf4a Cleanup: remove redundant braces from assert & raise
autopep8 v1.7 added a space after assert & raise,
remove the braces as they aren't needed.
2022-09-14 16:18:59 +10:00
Campbell Barton 3ca76ae0e8 Cleanup: remove "<pep8 compliant>" from headers
It can be assumed that all scripts comply with basic pep8 formatting
regarding white-space, indentation etc.

Also remove note in best practices page & update `tests/python/pep8.py`.

If we want to exclude some scripts from make format,
this can be done by adding them to `ignore_files` in:
source/tools/utils_maintenance/autopep8_format_paths.py

Or using `# nopep8` for to ignore for individual lines.

Ref T98554
2022-06-02 20:16:20 +10:00
Campbell Barton c2cdbe1e88 Cleanup: run autopep8 on doc/ 2022-04-20 15:10:14 +10:00
Campbell Barton 0a4fdcbb5f Cleanup: unused Python variables & imports 2022-03-04 11:07:37 +11:00
Campbell Barton 31be5ce8b9 GNUmakefile: update arguments for 'doc_man' target
Add '--verbose' argument to the script so the destination is printed.
Otherwise there is no hint to where the man page was written.
2022-02-14 16:20:16 +11:00
Campbell Barton bff0cf1030 Cleanup: remove white-space before headers 2022-02-11 14:23:54 +11:00
Campbell Barton c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
luzpaz 92dae5775f Cleanup: Fix typos in source code
Source typos corrected

Reviewed By: Blendify

Differential Revision: https://developer.blender.org/D13462
2021-12-06 22:23:17 -05:00
Aaron Carlisle 3fb47956c0 Man Page: Fix spelling 2021-07-22 20:13:14 -04:00
Campbell Barton d3cb1d845b Fix error extracting date in manpage generator
Error from recent cleanup 0e3bc2e321
2021-04-11 16:02:00 +10:00
Campbell Barton 0e3bc2e321 Cleanup: further cleanup to man page generator
- Raw strings (since backslashes were used for un-escaped characters).
- Parse the version string, avoiding color management errors being
  included.
2021-04-11 12:00:44 +10:00
Campbell Barton f337310b43 Cleanup: minor improvements & type hints for man-page generator
- Use main() function.
- Use argparse for parsing arguments.
- Keep under 120 column width.
- Use type hints (passes `mypy --strict`).
2021-04-10 17:54:42 +10:00
Ankit Meel 27e2c5ab78 Tests, docs: Use sanitizer options from environment too.
Don't overwrite environment variables that may
contain options like suppression files, symboliser etc.
It's similar to rBa181b156399a13fa429159112e30c8005d5e8a59
and rBA589d13408a60cbec34a8bc3cc798c586043743ae .
For Blender Add-ons repo, see the equivalent in D9816.

Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D9815
2021-01-29 14:13:26 +05:30
Campbell Barton 61bf51acb5 Cleanup: pep8 for examples 2019-11-01 10:53:47 +11:00
Bastien Montagne cb5ed2e5f4 Manpage gen script: fix for python < 3.7, and missing Blender build info.
Python3.7 is still fairly recent, not all distro use it as system python
yet, fallback to code compatible up to py3.5.

Also, often distro builds of Blender do not have the buildinfo, in that
case fallback to `SOURCE_DATE_EPOCH` envvar, and as last resort to
current time, as in orig patch D5756 (we still use blender builddate
when available).

Issues raised in recent own rBcd5c70630318.
2019-09-19 15:57:33 +02:00
Bastien Montagne 741d7d60ed Cleanup: Manpage: use 'https' blender.org URL instead of 'http' one. 2019-09-18 23:04:23 +02:00
Bastien Montagne cd5c706303 Blender manpage generator: use blender build date instead of current time.
It makes much more sense to use the build timestamp of the Blender
binary used to generate that manpage, than the current time.

As a bonus, when Blender building makes use of the SOURCE_DATE_EPOCH envvar
(through CMake, since previous commit), this also propagate automatically
to that man page.

Inspired by D5756 by Bernhard M. Wiedemann (@bmwiedemann), thanks.
2019-09-18 23:04:23 +02:00
Brecht Van Lommel 2987782d6d Docs: update manpage and html with app description matching website. 2018-12-28 17:36:59 +01:00
Campbell Barton 8c15d612a5 Cleanup: pep8 2018-07-03 06:55:02 +02:00
Campbell Barton 6e131ce075 Call to python3 for stand-alone scripts
Needed since Debian & FreeBSD both move away from keeping a synlink to `python`.
2016-07-26 05:18:00 +10:00
Campbell Barton 65574b0b03 cleanup: shebang lines
D888 by @sambler
2015-01-29 15:56:23 +11:00
Campbell Barton 200dd87de1 Cleanup: pep8 & redundant vars 2014-07-22 12:03:15 +10:00
Campbell Barton cb7915fc60 Automatically generate blender.1 man page during build process
Patch T40418 by Lawrence D'Oliveiro
2014-06-14 01:19:58 +10:00
Campbell Barton f56a74566a Bump version to Blender2.70rc and new splash
Splash concept art & paint-over: David Revoy. 3D artwork by Mathieu Auvray.
2014-03-06 04:40:49 +11:00
Campbell Barton 767ac65e75 Docs: update man page script based on D251 2014-02-20 20:11:03 +11:00
Campbell Barton 7222d654b2 code cleanup: typo and stop manpage turning '$' into italic. 2013-05-25 02:21:50 +00:00
Campbell Barton 648f925017 misc changes
- update man page for new additions since last release.
- note that --start-console argument is windows only.
- correct own assertion in own recent commit.
2013-02-14 05:02:20 +00:00
Campbell Barton c0078a9879 osl style cleanup and update man-page. 2012-12-04 03:18:08 +00:00
Campbell Barton d8144ef0f5 style cleanup: comment blocks 2012-10-04 13:26:15 +00:00
Campbell Barton 2557eaf0dd print names of nodes/sockets when cycles complains about only being able to connect a closure to another closure. 2012-07-19 13:04:43 +00:00
Sergey Sharybin e75e40c972 Release commit, 2.63!
Special thanks to Mango team for awesome splash screen!
And everybody else who made this release! :)
2012-04-26 17:49:48 +00:00
Campbell Barton f774384606 updated man page 2012-04-05 09:41:55 +00:00
Campbell Barton ae17390b77 picky edits & regen man page 2011-12-10 01:07:22 +00:00
Campbell Barton 1cfbde0eb4 pass encoding to uses of decode() incase the default isnt utf-8. ignore decode errors in some cases.
This should fix an error with generated qtcreator projects.

also replace decoded bytes for unicode escape sequences in the VIEW3D_MT_edit_text_chars menu.
2011-11-17 04:05:54 +00:00
Campbell Barton ea31490247 update man before ahoy 2011-10-17 14:44:21 +00:00
Campbell Barton 92bc72dca1 convenience targets for make doc_py, doc_dna, doc_man 2011-10-16 11:09:15 +00:00
Campbell Barton 48918130a1 remove redundant code & use GL_LINE_STRIP for object spiral drawing. 2011-09-22 18:42:16 +00:00
Campbell Barton 1915f1b1e2 quiet 2 compiler warnings and update man page 2011-06-04 03:07:56 +00:00
Campbell Barton 162d02bf50 quiet warning & minor pep8 edits. 2011-04-04 22:42:43 +00:00
Campbell Barton 8cf0d64623 option for blender --addons rigify,io_scene_fbx,add_mesh_gears
needed so ctest unit testing can be done on addons that are not enabled by default.
2011-01-26 16:30:12 +00:00
Campbell Barton f0d9ff34af Command line options to set blender system environment variables.
Added because CTest has no convenient way to set environment vars for commands it runs.

 --env-system-config -> BLENDER_SYSTEM_CONFIG
 --env-system-datafiles -> BLENDER_SYSTEM_DATAFILES
 --env-system-scripts -> BLENDER_SYSTEM_SCRIPTS
 --env-system-plugins -> BLENDER_SYSTEM_PLUGINS
 --env-system-python -> BLENDER_SYSTEM_PYTHON
2011-01-19 21:30:23 +00:00
Campbell Barton 161cbed9b5 new command line option '--factory-startup' to skip reading startup.blend. useful for testing with a predictable environment.
also commented python benchmark prints on exit, can enable when profiling later.
2011-01-19 09:13:24 +00:00
Campbell Barton 91f0e13686 update UI introspect function & man page 2010-12-31 15:09:05 +00:00