Skip to content

Improve Makefile compatibility with macOS. - #467

Merged
petschki merged 11 commits into
masterfrom
thet/make-compatibility
Sep 23, 2026
Merged

petschki merged 11 commits into
masterfrom
thet/make-compatibility

Conversation

@thet

@thet thet commented Sep 17, 2026 •

Copy link
Copy Markdown
Member
  • The previous Makefile used .ONESHELL and .SHELLFLAGS, features of GNU make 3.82. macOS ships with GNU make 3.81 and those features are not available. For better compatibility (and maybe even maintainability), move the shell commands into their own shell scripts.
  • Makefile: Install towncrier in the venv and reuse it.
    This removes the need to have towncrier installed globally.
  • Makefile: Add update-mockup-prerelease target for the latest pre-release.
  • Makefile: Add update-mockup-prerelease target for the latest pre-release among the first 100 GitHub releases.
  • Plus more, meanwhile.

@mister-roboto

Copy link
Copy Markdown

@thet thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@thet
thet requested a review from petschki September 17, 2026 21:46
thet and others added 2 commits September 18, 2026 00:48
The previous Makefile used `.ONESHELL` and `.SHELLFLAGS`, features of GNU make
3.82. macOS ships with GNU make 3.81 and those features are not available. For
better compatibility (and maybe even maintainability), move the shell commands
into their own shell scripts.

Co-authored-by: Codex <noreply@openai.com>
This removes the need to have towncrier installed globally.

Co-authored-by: Codex <noreply@openai.com>
@thet
thet force-pushed the thet/make-compatibility branch from d840693 to ac6ac7a Compare September 17, 2026 22:53

@petschki petschki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makefile works perfect here on my Mac. Two questions:

  1. Bootstrap (S)CSS Fonts added. I always wanted that, but if we want to use that OOTB, we have to include the generated CSS file in the resources and add an upgrade step.
Bildschirmfoto 2026-09-18 um 07 35 52
  1. countryflag icons adds unneeded scripts/ directory. Should we add that to the .gitignore ?
Image

@petschki

Copy link
Copy Markdown
Member

Regarding Icon CSS: maybe this should go into the barceloneta theme package?

@thet
thet force-pushed the thet/make-compatibility branch from ac6ac7a to f783ff0 Compare September 22, 2026 11:57
@thet

thet commented Sep 22, 2026

Copy link
Copy Markdown
Member Author

@petschki I have now excluded all unnecessary files - including the fonts and css files. Hope that's ok. We can add icon fonts if really needed, but basically using svgs is the recommended way.

@thet
thet requested a review from petschki September 22, 2026 11:59
@thet
thet force-pushed the thet/make-compatibility branch from f783ff0 to 010f3bd Compare September 22, 2026 12:01
thet and others added 5 commits September 22, 2026 14:10
… and changelog entry.

Co-authored-by: Codex <noreply@openai.com>
…ase.

Co-authored-by: Codex <noreply@openai.com>
…ase among the first 100 GitHub releases.

Co-authored-by: Codex <noreply@openai.com>
When updating icons with update-bootstrap-icons and update-country-flags some
resources (.gitignore files, scripts, unused CSS and SCSS files, fonts) are
installed, which we do not use nor want. These are git-ignored and not added to
the repository.
@thet
thet force-pushed the thet/make-compatibility branch from 010f3bd to f479bef Compare September 22, 2026 12:11
@petschki

Copy link
Copy Markdown
Member

I just tried this and it works like a charm.

One thing though: I updated my branch and ran make update-mockup without extra version ... big changeset of course. I then wondered, which mockup version is used actually by the current branch. I found it somehow in the CHANGES note, but I think we should track the currently installed mockup version somewhere explicitly (like .mockup-version file or something ?) and document it. Or we have a make check-version to show us the current installed version. I think this would help us maintaining future releases ...

(before the Makefile approach you could see the version in package.json obviously)

- Add a `check-dependencies` target, which the update targets run first. It
  reports missing commands (curl, git, jq, tar, python3 with venv) with
  installation hints for macOS and Linux.
- Only (re)create the virtual environment if it is missing or broken, instead
  of running `python3 -m venv` over an existing one on every call, which mixed
  Python versions.
- Download Mockup and Bootstrap Icons from the npm registry. `update-mockup`
  uses the dist-tag `latest`, `update-mockup-prerelease` the dist-tag `alpha`
  (configurable via `MOCKUP_PRERELEASE_TAG`). Fail if the Mockup npm package
  contains no built bundle. Only copy the SVG icons of Bootstrap Icons.
- Resolve the country flags revision via `git ls-remote` and download it as
  tarball.
- Do not use the rate limited GitHub API, `wget` or `unzip` anymore. Downloads
  go to a temporary directory which is removed on exit.
- Update the news files and remove co-author lines from them; co-author
  attributions belong in the commit messages only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thet
thet force-pushed the thet/make-compatibility branch from 4f9f2d8 to f479bef Compare September 22, 2026 22:31
petschki and others added 3 commits September 23, 2026 01:08
`make update-mockup-prerelease` now installs the highest version among the npm
dist-tags `alpha`, `beta` and `rc`, which is higher than `latest`. Versions are
compared by semver instead of publish date, as maintenance releases may be
published after pre-releases of the next release line. Stale pre-release tags
of older release lines are ignored.

Remove `MOCKUP_PRERELEASE_TAG`; use `MOCKUP_VERSION` to select a specific
version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Makefile: Download resources from npm and check dependencies.
The update scripts record the version and source of Mockup, Bootstrap Icons
and country flags (including the exact revision, as the upstream version is
rarely bumped) in resource-versions.json. The file is only updated when the
resources change and is committed together with them.

- Add `make versions` to show the recorded versions.
- Include resource-versions.json in the sdist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@petschki petschki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@petschki
petschki merged commit 7a50288 into master Sep 23, 2026
10 of 12 checks passed
@petschki
petschki deleted the thet/make-compatibility branch September 23, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants