Skip to main content

Flatten Verilog filelists: resolve -f includes, expand env vars, filter preprocessor conditionals

Project description

flatten-filelist

Flatten Verilog filelists by resolving -f includes, expanding environment variables, and filtering preprocessor conditionals.

Install

pip install flatten-filelist

Usage

import flatten_filelist

content, errors = flatten_filelist.flatten_filelist("filelist.f", ["DEFINE1", "DEFINE2"])

Returns (content_lines, error_messages) — errors are collected, not fatal.

How it works

  • Recursively follows -f <path> include directives
  • Expands $VAR and ${VAR} in paths using environment variables
  • Evaluates Verilog preprocessor conditionals: `ifdef, `ifndef, `elsif, `else, `endif
  • Accumulates `define and -def macros encountered in active conditional branches
  • Supports wildcard mode ("*" directive includes all conditional branches)

Platform

Linux x86_64 only. Bundles a statically-linked musl binary that runs on any Linux kernel ≥2.6.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flatten_filelist-0.1.1-py3-none-any.whl (267.7 kB view details)

Uploaded Python 3

File details

Details for the file flatten_filelist-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flatten_filelist-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8daedc1874ba4039fd0ce8c833e764f637af6ade8bf990f2551b949165b8c4fb
MD5 501a3f890d6b16d8ad39624aaee4f03b
BLAKE2b-256 4c581d6de213e753dcf14e76d169e0d5b659ea0a35112df8ae73b30e899f7417

See more details on using hashes here.

Provenance

The following attestation bundles were made for flatten_filelist-0.1.1-py3-none-any.whl:

Publisher: publish.yml on huanghhhz/flatten-filelist

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page