Automatically generate blender.1 man page during build process #40418
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40418
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
blender.1
manpage is automatically generated by the scriptblender.1.py
by postprocessing the output from the--help
and--version
commands from the Blender executable. Having such automatically-generated output in the source tree means that any changes to the relevant help text require a separate manual step to update this file.This patch gets rid of the
blender.1
file from the source tree, and adds CMake commands to automatically generate it at build time. This saves the separate manual steps for keeping it up to date.autogen-manpage.patch
Changed status to: 'Open'
Added subscriber: @ldo
In general I think this is OK, but things to consider.
Also looks like
autogen-manpage.patch
is reversed?Oops, yes, patch looks reversed.
Python binary needed: surely any reasonable system would have that. :)
Thinking about cross-compiling: good point. Perhaps the answer is to move that help text into a separate file, and have it included from there into the Blender code and man page at build time.
Just thought i should point this out, in the current source tree, blender.1.py is not marked as executable. My Git patch marks it as executable (note the “old mode” and “new mode” lines); don’t know if that would automatically happen if you were to apply the patch.
Moving the help text to a separate file would make it easier to generate the man page directly from CMake without needing Python, similar to the way my makesdna patch #37228 generates
dna_list.c
.@ldo, the issue with having a separate file is args are documented in
creator.c
via calls toBLI_argsAdd
.Having Python available seems reasonable ... but! - OSX for example doesn't have python3 in the $PATH, windows also.
For Linux now, having some Python3 in the $PATH is reasonable to expect, but when Blender first moved to Python3 this definitely wasn't the case.
Another way to resolve this could be to move the responsibility of making the man page to the packagers.
So for example, dep, rpm, pacman... etc... would have to run the script as apart of installing the package.
Yes, the way the options docs are generated is an issue. The script currently runs with Python2, not Python3.
By the way, the SCons build scripts don’t even install the man page, as far as I can make out. So perhaps its absence in certain cases is not such a calamity. :)
Re your point about Python3: was the script meant to be invoked as “python3 blender.1.py ...” rather than “blender.1.py ...”? Seems to run OK with Python2. :)
@ldo, right, this is mostly for linux packages which expect a man page. (and most/all currently use cmake).
doc/manpage/blender.1.py
- runs with python2.6+ & 3.In this case its no problem to support both, but in general we may want to depend on an exact python version for some scripts.
Just stuff to keep in mind, in this case its not really a problem.
I don’t think Linux packaging uses cross-platform builds. I believe Debian doesn’t support this.
Also it seems to me Blender cannot be cross-compiled anyway, since the makesdna and makesrna executables need to run as part of the build process. I don’t see anything to build them with different platform flags from the Blender executable itself.
Here’s a resubmitted patch, the right way round this time. :)
autogen-manpage.patch
Mostly LGTM, noticed some issues.
man_format
as is, function allows for easier extending if needed.flush()
before closing, closing implies flush."
at the end.regarding cross compiling, we had this working for linux, windows at one point, but needed to run makesdna through wine. But this isnt supported anymore.
OK, changes made as requested. But I can’t see anywhere that a leftover quotation mark appears.
autogen-manpage-20140531.patch
Attached a cleaned up patch: autogen-manpage-20140531.diff
The extra
"
I'm getting because I build with color management disabled.So I get the message
Changed status from 'Open' to: 'Resolved'
Committed
cb7915fc60
thanks for working on this issue (was silly to manually regenerate).