Opened 3 weeks ago

Closed 3 weeks ago

Last modified 3 weeks ago

#36162 closed Bug (fixed)

Docs make black doesn't work on MacOS

Reported by: Mike Edmunds Owned by: Mike Edmunds
Component: Packaging Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The docs make black target doesn't work on MacOS (and presumably other BSD) due to differences in the find command. This complicates checking docs locally (or in general investigating issues with blacken-docs).

% (cd docs; make black)      
find -name "*.txt" -not -path "./_build/*" -not -path "./_theme/*" \
                | xargs blacken-docs --rst-literal-block; echo $? > "_build/black/output.txt"
find: illegal option -- n
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]

% uname -a
Darwin --- 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec  6 18:40:14 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T8103 arm64

Change History (6)

comment:1 by Mike Edmunds, 3 weeks ago

Has patch: set

comment:2 by Natalia Bidart, 3 weeks ago

Triage Stage: UnreviewedAccepted
Version: 5.1dev

Thank you Edmund, patch looks great!

comment:3 by Natalia Bidart, 3 weeks ago

Triage Stage: AcceptedReady for checkin

comment:4 by GitHub <noreply@…>, 3 weeks ago

Resolution: fixed
Status: assignedclosed

In 248d8457:

Fixed #36162 -- Fixed the black Makefile docs rule to work on macOS.

The make black target in the docs directory used Linux-specific
syntax for its find command. Changed to syntax that also works
on macOS and other BSD Unix variants.

comment:5 by Natalia <124304+nessita@…>, 3 weeks ago

In e939cff:

[5.2.x] Fixed #36162 -- Fixed the black Makefile docs rule to work on macOS.

The make black target in the docs directory used Linux-specific
syntax for its find command. Changed to syntax that also works
on macOS and other BSD Unix variants.
Backport of 248d8457cbec631ef93d76137bc621106347adda from main.

comment:6 by Natalia <124304+nessita@…>, 3 weeks ago

In 76b4fb74:

[5.1.x] Fixed #36162 -- Fixed the black Makefile docs rule to work on macOS.

The make black target in the docs directory used Linux-specific
syntax for its find command. Changed to syntax that also works
on macOS and other BSD Unix variants.
Backport of 248d8457cbec631ef93d76137bc621106347adda from main.

Note: See TracTickets for help on using tickets.
Back to Top