Skip to main content

The compilation database Swiss army knife

Project description

Introduction

compdb is a command line tool to manipulates compilation databases. A compilation database is a database for compile options, it has records of which compile options are used to build the files in a project. An example of compilation database is the JSON Compilation Database

compdb aims to make it easier for you to run tools on your codebase by spoon-feeding you the right compile options.

compdb is not so much about generating the initial compilation database, this, is left to other tools, such as cmake and ninja. It is only a glue between the initial compilation database and your tool(s).

Motivation

With the proliferation of Clang-based tools, it has become apparent that the compile options are no longer useful uniquely to the compiler.

Standalone tools such as clang-tidy or text editors with libclang integration have to deal with compile options.

Examples of such tools, dealing with compilation databases are: irony-mode, rtags and ycmd.

Based on this evidence, compdb came to life. A tool that has knowledge of the compile options and can share it both to inform the text editor and to run clang based tool from the shell.

Getting started

Installation

Install with pip:

pip install compdb

>From Github, as user:

pip install --user git+https://github.com/Sarcasm/compdb.git#egg=compdb

For development:

pip install --user -e .

With setuptools:

python setup.py install

Running the tests

To run the tests, type:

python -m tests

Or:

tox --skip-missing-interpreters

For regression tests on a few open source projects:

cd tests/regression/headerdb
make [all|help]

Contribute

Contributions are always welcome!

Try to be consistent with the actual code, it will ease the review.

License

This project is licensed under the MIT License. See LICENSE.txt for details.

Acknowledgments

  • repo: for its ubiquitous command line interface, which served as an inspiration

  • scan-build: for the clear Python package design

  • git: for the git-config API

  • julio.meroh.net: for the interesting article serie on CLI design

Project details


Download files

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

Source Distribution

compdb-0.1.0.tar.gz (20.3 kB view hashes)

Uploaded Source

Built Distributions

compdb-0.1.0-py3-none-any.whl (25.2 kB view hashes)

Uploaded Python 3

compdb-0.1.0-py2-none-any.whl (25.3 kB view hashes)

Uploaded Python 2

Supported by

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