Having the freedom to chose my work environment on the computer, I move more and more tasks to Emacs recently, like running terminal windows with https://codeberg.org/harald/terminal-frame . Another pet of mine is my python build system: https://codeberg.org/harald/pythonbuilder

The latter can produce a nice SVG graph, using #graphviz, of the dependency tree of the build setup.

And should I forget which targets the build has, it is just a C-x C-f dependencies.svg away to see that graph.๐Ÿ˜€

#emacs #terminal_frame #pythonbuilder

terminal-frame

Dedicated terminal frame for Emacs' M-x shell

Codeberg.org

Pythonbuilder update. Removes a feature described in the last post about #pythonbuilder. ๐Ÿคฆโ€โ™€๏ธ But we have new features which are hopefully better:๐Ÿ˜Ž

- Save build state of successfully created targets even if the build stops with an exception.
- Simplify state computation for Paths object. A Paths object is a bit like a combination of a Path + rglob.

https://codeberg.org/harald/pythonbuilder

Feedback welcome.

#pythonbuilder
#buildmachine
#bashbuilder
#buildsystem
#buildtool
#softwaredevelopment
#programming

pythonbuilder

Build system written and specified in Python.

Codeberg.org

A pythonbuilder update adds a technical feature hard to describe if you haven't used the software. I try anyway:

So far you could define that a file, using a much simplified example, Path("build/README.html") is a Target to be build by writing

Target(Path("build/README.html"), ...)

With the new feature, that first argument of Target may be a Callable.

https://codeberg.org/harald/pythonbuilder

#pythonbuilder
#buildmachine
#bashbuilder
#buildsystem
#buildtool
#softwaredevelopment
#programming

pythonbuilder

Build system written and specified in Python.

Codeberg.org

Nice, lazy import in Python on the way.

https://peps.python.org/pep-0810/

Though I must say that pythonbuilder (https://codeberg.org/harald/pythonbuilder ) is able to start up, define ~20 targets, analyze them, and if there is nothing to do, finish in around 50ms. Lazy loading might hardly improve it, but lets see.

#python #pythonbuilder #lazyimport

PEP 810 โ€“ Explicit lazy imports | peps.python.org

This PEP introduces syntax for lazy imports as an explicit language feature:

Python Enhancement Proposals (PEPs)

Pythonbuilder update available.

A maintenance release with code cleanup. See the commits from v-2025-09-21 to v-2025-09-26: https://codeberg.org/harald/pythonbuilder/graph

The one publicly visible change should be that fields of the Target class got Final type hints as needed. This would show up for brave souls writing to these fields (nobody should) **and** using a type checker.๐Ÿ˜€

https://codeberg.org/harald/pythonbuilder

#pythonbuilder
#buildmachine
#bashbuilder
#buildsystem
#buildtool
#softwaredevelopment
#programming

pythonbuilder

Build system written and specified in Python.

Codeberg.org

Pythonbuilder got some updates since Aug-21st.

- It is now a regular python package which should need less sys.path wrestling to use it.
- The Paths class, a Path combined with an iterator over contained files, can now be created with extensive file include/exclude and directory include/exclude regular expression patterns.

https://docs.miamao.de/@main/pythonbuilder/pythonbuilder.pbutil.Paths.html#filtered

https://codeberg.org/harald/pythonbuilder

#pythonbuilder
#buildmachine
#bashbuilder
#buildsystem
#buildtool
#softwaredevelopment
#programming

pythonbuilder.pbutil.Paths

Most build systems have their own syntax to write build scripts with the twist that functions are only run if their output could differ from the last call.

I turned this upside-down thing on its feet again, providing a Python library to run functions only if needed.

So your build script is just a Python script, but still does not run functions unnecessarily.

https://codeberg.org/harald/pythonbuilder

#pythonbuilder #buildtool #cmake #gradle #ant #buildautomation

pythonbuilder

Build system written and specified in Python.

Codeberg.org

Pythonbuilder got some updates since Aug-17th

The function pbutil.main() provides a shallow wrapper around updateTargets() to parse, so far, two options out of a typical sys.argv, one to set the log level and one to force targets to be updated even if their state proves them as up-to-date. Quite practical for debugging the build process itself.

https://harald.codeberg.page/pythonbuilder/@main/apidoc/pbutil.html#main

https://codeberg.org/harald/pythonbuilder

#pythonbuilder
#buildmachine
#bashbuilder
#buildsystem
#buildtool
#softwaredevelopment
#programming

pbutil

Pythonbuilder got some updates since Aug-3rd.

- Targets which comprise of only a subset of the files in a directory can now be represented with a Paths object: https://harald.codeberg.page/pythonbuilder/@main/apidoc/pbutil.Paths.html

- Improved error handling to allow for sys.exit(1) in case of a build failure.

- Expert: a state=... function either have the Target object or the Target.item as its first parameter

https://codeberg.org/harald/pythonbuilder

#pythonbuilder
#buildmachine
#bashbuilder
#buildsystem
#buildtool
#softwaredevelopment
#programming

pbutil.Paths

The pythonbuilder got a few improvements. Apart from introducing ruff as a consistent python code formatter and for linting in addition to mypy, it got a new module pbpython.py which wraps

- ruff check
- ruff format
- mypy

calls for easy use as target builders.

https://codeberg.org/harald/pythonbuilder

#pythonbuilder
#buildmachine
#bashbuilder
#buildsystem
#buildtool
#softwaredevelopment
#programming
#python
#ruff
#mypy

pythonbuilder

Build system written and specified in Python.

Codeberg.org