[Python-modules-commits] r16328 - in packages/preprocess/trunk (12 files)

johannr-guest at users.alioth.debian.org johannr-guest at users.alioth.debian.org
Mon Apr 4 06:07:23 UTC 2011


    Date: Monday, April 4, 2011 @ 06:07:12
  Author: johannr-guest
Revision: 16328

Add initial files for preprocess.

Added:
  packages/preprocess/trunk/debian/
  packages/preprocess/trunk/debian/README.source
  packages/preprocess/trunk/debian/changelog
  packages/preprocess/trunk/debian/compat
  packages/preprocess/trunk/debian/control
  packages/preprocess/trunk/debian/copyright
  packages/preprocess/trunk/debian/docs
  packages/preprocess/trunk/debian/preprocess.1
  packages/preprocess/trunk/debian/rules
  packages/preprocess/trunk/debian/source/
  packages/preprocess/trunk/debian/source/format
  packages/preprocess/trunk/debian/watch


Property changes on: packages/preprocess/trunk/debian
___________________________________________________________________
Added: mergeWithUpstream
   + 1

Added: packages/preprocess/trunk/debian/README.source
===================================================================
--- packages/preprocess/trunk/debian/README.source	                        (rev 0)
+++ packages/preprocess/trunk/debian/README.source	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1,6 @@
+Since upstream provides only 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 bin/preprocess.exe is also removed
+from the archive in the get-orig-source target.
+
+-- Johannes Ring <johannr at simula.no>  Wed, 29 Sep 2010 12:22:07 +0200

Added: packages/preprocess/trunk/debian/changelog
===================================================================
--- packages/preprocess/trunk/debian/changelog	                        (rev 0)
+++ packages/preprocess/trunk/debian/changelog	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1,5 @@
+preprocess (1.1.0-1) unstable; urgency=low
+
+  * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
+
+ -- Johannes Ring <johannr at simula.no>  Tue, 28 Sep 2010 14:14:44 +0200

Added: packages/preprocess/trunk/debian/compat
===================================================================
--- packages/preprocess/trunk/debian/compat	                        (rev 0)
+++ packages/preprocess/trunk/debian/compat	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1 @@
+7

Added: packages/preprocess/trunk/debian/control
===================================================================
--- packages/preprocess/trunk/debian/control	                        (rev 0)
+++ packages/preprocess/trunk/debian/control	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1,20 @@
+Source: preprocess
+Section: python
+Priority: extra
+Maintainer: Johannes Ring <johannr at simula.no>
+Uploaders: Johannes Ring <johannr at simula.no>
+Build-Depends: cdbs (>= 0.4.90~), debhelper (>= 7), python-all (>= 2.6.6-3~)
+Standards-Version: 3.9.1
+X-Python-Version: >= 2.5
+DM-Upload-Allowed: yes
+Homepage: http://preprocess.googlecode.com
+
+Package: python-preprocess
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}
+Description: a portable multi-language file preprocessor
+ Preprocess is like a typical C preprocess, 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.

Added: packages/preprocess/trunk/debian/copyright
===================================================================
--- packages/preprocess/trunk/debian/copyright	                        (rev 0)
+++ packages/preprocess/trunk/debian/copyright	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1,27 @@
+This package was debianized by Johannes Ring (Debian) <johannr at simula.no> 
+on Tue, 28 Sep 2010 14:14:44 +0200.
+
+It was downloaded from http://preprocess.googlecode.com
+
+Preprocess was written by Trent Mick <TrentM at ActiveState.com>
+
+Copyright (c) 2002-2005 ActiveState Corp.
+
+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.

Added: packages/preprocess/trunk/debian/docs
===================================================================
--- packages/preprocess/trunk/debian/docs	                        (rev 0)
+++ packages/preprocess/trunk/debian/docs	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1,3 @@
+BUGS.txt
+README.txt
+TODO.txt

Added: packages/preprocess/trunk/debian/preprocess.1
===================================================================
--- packages/preprocess/trunk/debian/preprocess.1	                        (rev 0)
+++ packages/preprocess/trunk/debian/preprocess.1	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1,132 @@
+.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 preprocess, 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 this help 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\fR FOO=0" 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 <infile> can be marked up with special preprocessor statement lines
+of the form: 
+.IP
+ <comment-prefix> <preprocessor-statement> <comment-suffix>
+.LP
+where the <comment-prefix/suffix> are the native comment delimiters for
+that file type.
+.SH EXAMPLES
+.LP
+HTML (*.htm, *.html) or XML (*.xml, *.kpf, *.xul) files:
+.IP
+ <!-- #if FOO -->
+ ...
+ <!-- #endif -->
+.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 <var> [<value>]
+ #undef <var>
+ #ifdef <var>
+ #ifndef <var>
+ #if <expr>
+ #elif <expr>
+ #else
+ #endif
+ #error <error string>
+ #include "<file>"
+.LP
+where <expr> 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 \-\fID\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 <basename>.p.<ext> and direct the output of preprocess to
+<basename>.<ext>, 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 <trentm at gmail.com>
+
+This manual page was written by Johannes Ring <johannr at simula.no> for
+the Debian GNU/Linux system (but may be used by others).

Added: packages/preprocess/trunk/debian/rules
===================================================================
--- packages/preprocess/trunk/debian/rules	                        (rev 0)
+++ packages/preprocess/trunk/debian/rules	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
+
+DEB_COMPRESS_EXCLUDE := .py
+
+install/python-preprocess::
+	dh_installman -p$(cdbs_curpkg) debian/preprocess.1
+
+get-orig-source:
+	rm -rf $@
+	mkdir $@
+	uscan --force-download --verbose --destdir $@ \
+	  --download-version $(DEB_UPSTREAM_VERSION) \
+	  --upstream-version $(DEB_UPSTREAM_VERSION)
+	unzip -o $@/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION).zip -d $@
+	rm -f $@/$(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION)/bin/preprocess.exe
+	cd $@ && tar -cf - $(DEB_SOURCE_PACKAGE)-$(DEB_UPSTREAM_VERSION) | \
+	  gzip -9f - > ../$(DEB_SOURCE_PACKAGE)_$(DEB_UPSTREAM_VERSION).orig.tar.gz
+	rm -r $@


Property changes on: packages/preprocess/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
   + *

Added: packages/preprocess/trunk/debian/source/format
===================================================================
--- packages/preprocess/trunk/debian/source/format	                        (rev 0)
+++ packages/preprocess/trunk/debian/source/format	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1 @@
+3.0 (quilt)

Added: packages/preprocess/trunk/debian/watch
===================================================================
--- packages/preprocess/trunk/debian/watch	                        (rev 0)
+++ packages/preprocess/trunk/debian/watch	2011-04-04 06:07:12 UTC (rev 16328)
@@ -0,0 +1,3 @@
+version=3
+http://code.google.com/p/preprocess/downloads/list \
+http://preprocess.googlecode.com/files/preprocess-([\d.]+)\.zip




More information about the Python-modules-commits mailing list