debian/0000755000000000000000000000000011677467113007203 5ustar debian/changelog0000644000000000000000000000061611677467113011060 0ustar preprocess (1.1.0+ds-1build1) precise; urgency=low * Rebuild to drop python2.6 dependencies. -- Matthias Klose Sat, 31 Dec 2011 02:07:07 +0000 preprocess (1.1.0+ds-1) unstable; urgency=low [ Johannes Ring ] * Initial release (Closes: #620701) [ Stefano Rivera ] * Set DM-Upload-Allowed: yes -- Johannes Ring Wed, 08 Jun 2011 09:12:17 +0200 debian/rules0000755000000000000000000000265311573616506010266 0ustar #!/usr/bin/make -f DEB_PYTHON2_MODULE_PACKAGES = preprocess include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/python-distutils.mk DEB_INSTALL_CHANGELOGS_ALL = README.txt DEB_INSTALL_MANPAGES_preprocess := debian/preprocess.1 PY_VERSIONS = $(shell pyversions --requested debian/control) test-stamp-%: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) echo "-- Running tests for $*." cd test; /usr/bin/$* test.py endif binary-post-install/preprocess:: $(addprefix test-stamp-, $(PY_VERSIONS)) clean:: -rm -rf $(addprefix test-stamp-, $(PY_VERSIONS)) -find $(CURDIR) -name "*.pyc" | xargs rm -rf -rm -rf $(CURDIR)/test/tmp DEB_STRIPPED_UPSTREAM_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed -n -e 's/\+ds.*$$//p') get-orig-source: rm -rf $@ mkdir $@ uscan --no-conf --force-download --verbose --destdir $@ \ --download-version $(DEB_STRIPPED_UPSTREAM_VERSION) \ --upstream-version $(DEB_STRIPPED_UPSTREAM_VERSION) unzip -o $@/$(DEB_SOURCE_PACKAGE)-$(DEB_STRIPPED_UPSTREAM_VERSION).zip -d $@ rm -f $@/$(DEB_SOURCE_PACKAGE)-$(DEB_STRIPPED_UPSTREAM_VERSION)/bin/preprocess.exe mv $@/$(DEB_SOURCE_PACKAGE)-$(DEB_STRIPPED_UPSTREAM_VERSION) \ $@/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig cd $@ && GZIP=--best tar -cz --owner root --group root --mode a+rX -f \ ../$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz \ $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).orig rm -r $@ debian/control0000644000000000000000000000173211573512333010577 0ustar Source: preprocess Section: devel Priority: optional Maintainer: Python Applications Packaging Team Uploaders: Johannes Ring Build-Depends: cdbs (>= 0.4.90~), debhelper (>= 7), python-all (>= 2.6.6-3~) Standards-Version: 3.9.2 X-Python-Version: >= 2.5 Homepage: http://preprocess.googlecode.com Vcs-Svn: svn://svn.debian.org/python-apps/packages/preprocess/trunk Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/preprocess/trunk/ DM-Upload-Allowed: yes Package: preprocess Architecture: all Depends: ${python:Depends}, ${misc:Depends} Description: portable multi-language file preprocessor Preprocess is like a typical C preprocessor, but it extends to multiple languages. Languages for which it works include: C++, Python, Perl, Tcl, XML, JavaScript, CSS, IDL, TeX, Fortran, PHP, Java, Shell scripts (Bash, CSH, etc.) and C#. . Preprocess is usable both as a command line app and as a Python module. debian/preprocess.10000644000000000000000000000714411560740607011451 0ustar .TH PREPROCESS 1 \" -*- nroff -*- .SH NAME preprocess \- Preprocess a file. .SH SYNOPSIS \fBpreprocess\fR [\fIoptions\fR...] \fIinfile\fR .SH DESCRIPTION Preprocess is like a typical C preprocessor, but it extends to multiple languages. Languages for which it works include: C++, Python, Perl, Tcl, XML, JavaScript, CSS, IDL, TeX, Fortran, PHP, Java, Shell scripts (Bash, CSH, etc.) and C#. Preprocess is usable both as a command line app and as a Python module. .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR Print help text and exit. .TP \fB\-V\fR, \fB\-\-version\fR Print the version info and exit. .TP \fB\-v\fR, \fB\-\-verbose\fR Give verbose output for errors. .TP \fB\-o\fR \fIoutfile\fR Write output to the given file instead of to stdout. .TP \fB\-f\fR, \fB\-\-force\fR Overwrite given output file. Otherwise an IOError will be raised if \fIoutfile\fR already exists. .TP \fB\-D\fR \fIdefine\fR Define a variable for preprocessing. \fIdefine\fR can simply be a variable name (in which case it will be true) or it can be of the form \fIvar\fR=\fIval\fR. An attempt will be made to convert \fIval\fR to an integer so "\fB\-D FOO=0\fR" will create a false value. .TP \fB\-I\fR \fIdir\fR Add a directory to the include path for #include directives. .TP \fB\-k\fR, \fB\-\-keep-lines\fR Emit empty lines for preprocessor statement lines and skipped output lines. This allows line numbers to stay constant. .TP \fB\-s\fR, \fB\-\-substitute\fR Substitute defines into emitted lines. By default substitution is NOT done because it currently will substitute into program strings. .SH MODULE USAGE .LP .IP from preprocess import preprocess preprocess(infile, outfile=sys.stdout, defines={}, force=0, keepLines=0, includePath=[], substitute=0) .LP The can be marked up with special preprocessor statement lines of the form: .IP .LP where the are the native comment delimiters for that file type. .SH EXAMPLES .LP HTML (*.htm, *.html) or XML (*.xml, *.kpf, *.xul) files: .IP ... .LP Python (*.py), Perl (*.pl), Tcl (*.tcl), Ruby (*.rb), Bash (*.sh), or make ([Mm]akefile*) files: .IP # #if defined('FAV_COLOR') and FAV_COLOR == "blue" ... # #elif FAV_COLOR == "red" ... # #else ... # #endif .LP C (*.c, *.h), C++ (*.cpp, *.cxx, *.cc, *.h, *.hpp, *.hxx, *.hh), Java (*.java), PHP (*.php) or C# (*.cs) files: .IP // #define FAV_COLOR 'blue' ... /* #ifndef FAV_COLOR */ ... // #endif .LP Fortran 77 (*.f) or 90/95 (*.f90) files: .IP C #if COEFF == 'var' ... C #endif .SH PREPROCESSOR SYNTAX .LP Valid statements: .IP #define [] #undef #ifdef #ifndef #if #elif #else #endif #error #include "" .LP where is any valid Python expression. .LP The expression after #if/elif may be a Python statement. It is an error to refer to a variable that has not been defined by a \fB\-D\fR option or by an in-content #define. .LP Special built-in methods for expressions: .IP defined(varName) Return true if given variable is defined. .SH TIPS .LP A suggested file naming convention is to let input files to preprocess be of the form .p. and direct the output of preprocess to ., e.g.: .IP \fBpreprocess\fR \-o foo.py foo.p.py .LP The advantage is that other tools (esp. editors) will still recognize the unpreprocessed file as the original language. .SH AUTHORS Trent Mick This manual page was written by Johannes Ring for the Debian GNU/Linux system (but may be used by others). debian/copyright0000644000000000000000000000522511572122571011130 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174 Upstream-Name: preprocess Upstream-Contact: Trent Mick Source: http://preprocess.googlecode.com Comment: Since upstream only provides a .zip archive, we need to repackage it into a .tar.gz. This is done in the get-orig-source target in debian/rules. The Windows binary file "bin/preprocess.exe" is also removed from the archive in the get-orig-source target. Files: * Copyright: 2002-2005 ActiveState Corp. License: Expat Files: debian/* Copyright: 2010-2011 Johannes Ring License: GPL-2+ This software is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this software. If not, see . . On Debian systems the full text of the GNU General Public License can be found in the file '/usr/share/common-licenses/GPL-2'. Files: test/test_preprocess_inputs.py src/exe/launcher.cpp test/test_preprocess.py Copyright: 2002-2008 Trent Mick License: Expat Files: test/testlib.py test/test.py lib/preprocess.py Copyright: 2000-2008 ActiveState Software Inc. License: Expat License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/source/0000755000000000000000000000000011573620405010471 5ustar debian/source/format0000644000000000000000000000001411560740607011702 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000024011573616506010225 0ustar version=3 opts=dversionmangle=s/\+ds// \ http://code.google.com/p/preprocess/downloads/list \ http://preprocess.googlecode.com/files/preprocess-([\d.]+)\.zip debian/compat0000644000000000000000000000000211560740607010372 0ustar 7 debian/docs0000644000000000000000000000002211571700430010031 0ustar BUGS.txt TODO.txt