fypp
« Back to VersTracker
Description:
Python powered Fortran preprocessor
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: fortran python preprocessor metaprogramming hpc code-generation
Install: brew install fypp
About:
Fypp is a Python-based preprocessor for Fortran code, enabling developers to use Python's full syntax and features within their source files. It allows for the generation of complex, repetitive, or conditional Fortran code programmatically, significantly reducing boilerplate and improving maintainability. This tool bridges the gap between the flexibility of Python and the performance of Fortran.
Key Features:
  • Full Python syntax support within Fortran source
  • Generates standard Fortran code from Python-powered templates
  • Supports multi-dimensional array operations and metaprogramming
  • Easy integration into existing build systems like CMake or Make
Use Cases:
  • Generating boilerplate code for array operations or derived types
  • Creating platform-specific code variants based on build-time conditions
  • Implementing compile-time computations to optimize performance
Alternatives:
  • cpp – Standard C preprocessor; lacks Python's power and is less suited for complex Fortran constructs.
  • m4 – A general-purpose macro processor; more complex syntax and less intuitive for Python developers.
Version History
Detected Version Rev Change Commit
Dec 27, 2024 2:29am 0 VERSION_BUMP 29da1d92
Oct 10, 2024 4:59pm 0 VERSION_BUMP 699ca0ef
Oct 10, 2024 12:12pm 0 VERSION_BUMP a8daec41
Sep 13, 2024 8:09am 0 VERSION_BUMP f3dd8f01