This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
pepe—a portable multi-language file preprocessor

There are tons of template systems. This is just a basic preprocessor.

Pepe is usable both as a command line app and as a Python module.
Pepe syntax is hidden within comments (whatever the syntax for comments
in the target file type), so that the file can still have valid syntax.
Pepe syntax mimics that of the C preprocessor, but its behavior differs.

Who is it for?
Pepe is targeted at **build systems** that deal with many types of files.
Languages for which it works include:

* C++
* Python,
* Perl
* Tcl
* JavaScript
* TeX
* Fortran
* Java
* Shell scripts (Bash, CSH, etc.)
* C#

Pepe began as a fork of Trent Mick's preprocess_ which has been used for
build-time code differentiation in the Komodo_ build system, which
includes source code in Python, JavaScript, XML, CSS, Perl, and C/C++.

How it works
All preprocessor statements are on their own line. A preprocessor statement
is a comment (as appropriate for the language of the file being preprocessed).
This way the preprocessor statements do not make an unpreprocessed file
syntactically incorrect.

For example::

pepe -D FEATURES=macros,scc

will yield this transformation::

... ...
# #if "macros" in FEATURES
def do_work_with_macros(): def do_work_with_macros():
pass pass
# #else
def do_work_without_macros():
# #endif
... ...

or, with a JavaScript file::

... ...
// #if "macros" in FEATURES
function do_work_with_macros() { function do_work_with_macros() {
} }
// #else
function do_work_without_macros() {
// #endif
... ...

The ``#if`` expression (``"macros" in FEATURES`` in the example) is Python
code, so it has Python's full comparison richness. A number of
preprocessor statements are implemented::

#define VAR [VALUE]
#undef VAR
#ifdef VAR
#ifndef VAR
#include "FILE"

As well, pepe will do inline substitution of defined variables.
Although, this is currently turned off by default because substitution occurs
in program strings, which is not ideal. When a future version of
pepe can lex languages being preprocessed it will NOT substitute
into program strings and substitution will be turned ON by default.

Install Notes
Installing Pepe is easy::

$ pip install pepe

Getting Started

Using as a shell command::

$ pepe --help

Pepe can also be used as a module. Please see the documentation_
for more information.

.. _preprocess:
.. _Komodo:
.. _documentation:
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting