[Python-modules-commits] r19377 - in packages/cssutils/trunk/debian (15 files)

cjsmo-guest at users.alioth.debian.org cjsmo-guest at users.alioth.debian.org
Sat Nov 19 08:09:43 UTC 2011


    Date: Saturday, November 19, 2011 @ 08:09:39
  Author: cjsmo-guest
Revision: 19377

made additional changes so update-alternatives actually works, added 01_csscombine_typo_fix.patch

Added:
  packages/cssutils/trunk/debian/patches/
  packages/cssutils/trunk/debian/patches/01_csscombine_typo_fix.patch
  packages/cssutils/trunk/debian/patches/series
Modified:
  packages/cssutils/trunk/debian/changelog
  packages/cssutils/trunk/debian/control
  packages/cssutils/trunk/debian/python-cssutils.postinst
  packages/cssutils/trunk/debian/python3-cssutils.postinst
  packages/cssutils/trunk/debian/rules
Deleted:
  packages/cssutils/trunk/debian/man/csscapture3.manpage1
  packages/cssutils/trunk/debian/man/csscombine3.manpage1
  packages/cssutils/trunk/debian/man/cssparse3.manpage1
  packages/cssutils/trunk/debian/python-cssutils.links
  packages/cssutils/trunk/debian/python-cssutils.manpages
  packages/cssutils/trunk/debian/python3-cssutils.links
  packages/cssutils/trunk/debian/python3-cssutils.manpages

Modified: packages/cssutils/trunk/debian/changelog
===================================================================
--- packages/cssutils/trunk/debian/changelog	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/changelog	2011-11-19 08:09:39 UTC (rev 19377)
@@ -18,13 +18,18 @@
     - B-D on python3, and python3-setuptools.
     - No longer Depend on python-encutils.
     - No longer Recommend python-cssutils-doc package.
-    - Add Replaces and Breaks on python-cssutils (<= 0.9.8~a1),
-      python-encutils (<= 0.9.8~a1)
+    - Added Provides, Conflicts and Replaces so python-cssutils-0.9.8~a1 is
+      completely removed from the system.
   * debian/rules
     - Removed dh_install override, no longer needed.
     - Added rules to build python2 and python3 packages
-    - Added rules to rename cssparse, csscombine and csscapture to cssparse3,
-      csscombine3, csscapture3 to resolve a naming conflict in /usr/bin.
+    - Added rules to remove cssparse, csscombine and csscapture so
+      update alternative can be used.
+    - Added dh_installman override and make copies of manpages to be used in
+      python2 and python3 packages.
+    - Added dh_links override to make the update-alternatives sym links.
+    - Added rules to rename python3 executables shebang to python3.
+    - Added dh_fixperms override to make our executables executable.
   * Removed python-cssutils-doc.links, python-cssutils-doc.doc-base,
     python-cssutils-doc.docs, python-cssutils-doc.examples,
     python-cssutils.install, python-encutils.install, no longer needed.
@@ -32,14 +37,12 @@
     python-cssutils package.
   * Added python-cssutils.examples to install the examples as part of
     python-cssutils package.
-  * Added cssparse3.manpage1, csscombine3.manpage1 and csscapture3.manpage1
-    for the python3 package.
-  * Added python3-cssutils.doc, python3-cssutils.examples,
-    python3-cssutils.manpages, python3-encutils.manpages to install docs,
-    manpages and examples into the python3 package.
+  * Added python3-cssutils.doc, python3-cssutils.examples, to install docs,
+    and examples into the python3 package.
   * Update to use update-alternatives, added python-cssutils.links,
     python-cssutils.postinst, python-cssutils.prerm, python3-cssutils.links,
     python3-cssutils.postinst, python3-cssutils.prerm.
+  * Added 01_csscombine_typo_fix.patch to correct a typo in csscombine.py.
 
  -- Charlie Smotherman <cjsmo at cableone.net>  Sun, 15 Nov 2011 22:16:42 -0500
 

Modified: packages/cssutils/trunk/debian/control
===================================================================
--- packages/cssutils/trunk/debian/control	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/control	2011-11-19 08:09:39 UTC (rev 19377)
@@ -6,9 +6,9 @@
            Martin Pitt <mpitt at debian.org>,
            Charlie Smotherman <cjsmo at cableone.net>
 Build-Depends: debhelper (>= 7.0.50~),
-               python (>= 2.6.6-3~),
+               python-all (>= 2.6.6-3~),
                python-setuptools,
-               python3,
+               python3-all,
                python3-setuptools
 Standards-Version: 3.9.2
 Homepage: https://bitbucket.org/cthedot/cssutils
@@ -22,8 +22,9 @@
 Depends: ${misc:Depends},
          ${python:Depends},
          python-pkg-resources
-Replaces: python-encutils (<< 0.9.8~a1)
-Breaks: python-encutils (<< 0.9.8~a1)
+Provides: python-cssutils
+Conflicts: python-cssutils (<< 0.9.8~a3), python-encutils (<= 0.9.8~a1)
+Replaces: python-cssutils (<= 0.9.8~a1), python-encutils (<= 0.9.8~a1)
 Description: CSS Cascading Style Sheets parser and builder
  Package to parse and build CSS Cascading Style Sheets. DOM only, not any
  rendering facilities! Base upon and partly implements the following
@@ -43,8 +44,9 @@
 Depends: ${misc:Depends},
          ${python3:Depends},
          python3-pkg-resources
-Replaces: python-encutils (<< 0.9.8~a1)
-Breaks: python-encutils (<< 0.9.8~a1)
+Provides: python3-cssutils
+Conflicts: python-cssutils (<< 0.9.8~a3), python-encutils (<= 0.9.8~a1)
+Replaces: python-cssutils (<= 0.9.8~a1), python-encutils (<= 0.9.8~a1)
 Description: Python3 CSS Cascading Style Sheets parser and builder
  Python3 package to parse and build CSS Cascading Style Sheets. DOM only, not
  any rendering facilities! Base upon and partly implements the following

Deleted: packages/cssutils/trunk/debian/man/csscapture3.manpage1
===================================================================
--- packages/cssutils/trunk/debian/man/csscapture3.manpage1	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/man/csscapture3.manpage1	2011-11-19 08:09:39 UTC (rev 19377)
@@ -1,35 +0,0 @@
-.TH csscapture3 1 "April 9, 2011" "" "cssutils"
-.SH NAME
-.B
-csscapture3\fR \- Downloads CSS stylesheets.
-.SH SYNOPSIS
-.B
-csscapture3
-.RI [ options "...] " URL
-.SH DESCRIPTION
-.B
-CSSCapture3\fR downloads all referenced CSS stylesheets of a given
-.I URL
-and saves them to a given target directory.
-.SH OPTIONS
-.TP
-.B \-d\fR, \fB\-\-debug\fR
-Show debug messages during capturing.
-.TP
-.B \-h\fR, \fB\-\-help\fR
-Show help message and exit.
-.TP
-.B \-m\fR. \fB\-\-minified\fR
-Saves minified version of captured files.
-.TP
-.B \-n\fR, \fB\-\-notsave\fR
-If given, files are NOT saved, only log is written.
-.TP
-.B \-s\fI DIR\fR, \fB\-\-saveto\fR=\fIDIR
-Save retrieved files to \fIDIR\fR, defaults to
-\fB./_CSSCapture_SAVED\fR.
-.TP
-.B \-u\fI UA\fR, \fB\-\-useragent\fR=\fIUA
-Useragent to use for request of \fIURL\fR, default is urllib2s default\fR.
-.SH "SEE ALSO"
-.IP /usr/share/doc/python3-cssutils-doc/docs/html/docs/index.html

Deleted: packages/cssutils/trunk/debian/man/csscombine3.manpage1
===================================================================
--- packages/cssutils/trunk/debian/man/csscombine3.manpage1	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/man/csscombine3.manpage1	2011-11-19 08:09:39 UTC (rev 19377)
@@ -1,39 +0,0 @@
-.TH csscombine3 1 "April 9, 2011" "" "cssutils"
-.SH NAME
-.B
-csscombine3\fR \- Utility to combine several stylesheets into one.
-.SH SYNOPSIS
-.B csscombine3
-.RI [ options "...] " path ...
-.SH DESCRIPTION
-.B csscombine3\fR may be used to combine several sheets loaded from a main
-sheet via \fB at import\fR rules. Nested \fB at import\fR rules are resolved since
-cssutils 0.9.6a1.
-.PP
-The resulting combined sheet (optionally minified) is sent to stdout, info and
-error messages are handled by the normal cssutils log.
-.PP
-.B csscombine3\fR may also be used to change the encoding of the stylesheet if a
-target encoding is given.
-.SH OPTIONS
-.TP
-.B \-h\fR, \fB\-\-help\fR
-Show help message and exit.
-.TP
-.B \-m\fR, \fB\-\-minify\fR
-Saves minified version of combined files, default is false.
-.TP
-.B \-s\fI SOURCEENCODING\fR, \fB\-\-sourceencoding\fR=\fISOURCEENCODING
-Encoding of input, defaulting to "css". If given, overwrites other encoding
-information like @charset declarations.
-.TP
-.B \-t\fI TARGETENCODING\fR, \fB\-\-targetencoding\fR=\fITARGETENCODING
-Encoding of output, defaulting to "UTF-8".
-.TP
-.B \-u\fI URL\fR, \fB\-\-url\fR=\fIURL
-.I URL
-to parse, path... is ignored if
-.I URL
-is given.
-.SH "SEE ALSO"
-.IP /usr/share/doc/python3-cssutils-doc/docs/html/docs/index.html

Deleted: packages/cssutils/trunk/debian/man/cssparse3.manpage1
===================================================================
--- packages/cssutils/trunk/debian/man/cssparse3.manpage1	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/man/cssparse3.manpage1	2011-11-19 08:09:39 UTC (rev 19377)
@@ -1,34 +0,0 @@
-.TH cssparse3 1 "April 7, 2011" "" "cssutils"
-.SH NAME
-.B
-cssparse3\fR \- A CSS parser.
-.SH SYNOPSIS
-.B
-cssparse3
-.RI [ options "...] [" path ...]
-.SH DESCRIPTION
-Script version of cssutils.parseString(), cssutils.parseFile() and
-cssutils.parseUrl().
-The combined CSS is outputed to \fBstdout\fR.
-Logging is directed to \fBstderr\fR.
-.SH OPTIONS
-.TP
-.B \-d\fR, \fB\-\-debug\fR
-Activate debugging output.
-.TP
-.B \-e\fI ENCODING\fR, \fB\-\-encoding\fR=\fIENCODING
-Encoding of the file or override encoding found.
-.TP
-.B \-h\fR, \fB\-\-help\fR
-Display help message and exit.
-.TP
-.B \-m\fR, \fB\-\-minify\fR
-Minify parsed CSS.
-.TP
-.B \-s\fI SOMESTRING\fR, \fB\-\-string\fR=\fISOMESTRING
-Parse given string.
-.TP
-.B \-u\fI URL\fR, \fB\-\-url\fR=\fIURL
-Parse the given \fIURL\fR.
-.SH "SEE ALSO"
-.IP /usr/share/doc/python3-cssutils-doc/docs/html/docs/index.html

Added: packages/cssutils/trunk/debian/patches/01_csscombine_typo_fix.patch
===================================================================
--- packages/cssutils/trunk/debian/patches/01_csscombine_typo_fix.patch	                        (rev 0)
+++ packages/cssutils/trunk/debian/patches/01_csscombine_typo_fix.patch	2011-11-19 08:09:39 UTC (rev 19377)
@@ -0,0 +1,24 @@
+Description: Fix for a typo in csscombine.py
+Author: Charlie Smotherman <cjsmo at cableone.net>
+
+Index: cssutils-0.9.8~a3/src/cssutils/scripts/csscombine.py
+===================================================================
+--- cssutils-0.9.8~a3.orig/src/cssutils/scripts/csscombine.py	2011-11-18 12:51:53.370764669 -0600
++++ cssutils-0.9.8~a3/src/cssutils/scripts/csscombine.py	2011-11-18 12:52:55.698764881 -0600
+@@ -54,7 +54,7 @@
+ __docformat__ = 'restructuredtext'
+ __version__ = '$Id$'
+ 
+-from cssutils.script import csscombine
++from cssutils.scripts import csscombine
+ import optparse
+ import sys
+ 
+@@ -91,4 +91,5 @@
+ 
+ 
+ if __name__ == '__main__':
+-    sys.exit(main())
+\ No newline at end of file
++    sys.exit(main())
++

Added: packages/cssutils/trunk/debian/patches/series
===================================================================
--- packages/cssutils/trunk/debian/patches/series	                        (rev 0)
+++ packages/cssutils/trunk/debian/patches/series	2011-11-19 08:09:39 UTC (rev 19377)
@@ -0,0 +1 @@
+01_csscombine_typo_fix.patch

Deleted: packages/cssutils/trunk/debian/python-cssutils.links
===================================================================
--- packages/cssutils/trunk/debian/python-cssutils.links	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/python-cssutils.links	2011-11-19 08:09:39 UTC (rev 19377)
@@ -1,3 +0,0 @@
-/usr/share/pyshared/cssutils/scripts/cssparse.py /usr/bin/cssparse.py2
-/usr/share/pyshared/cssutils/scripts/csscombine.py /usr/bin/csscombine.py2
-/usr/share/pyshared/cssutils/scripts/csscapture.py /usr/bin/csscapture.py2

Deleted: packages/cssutils/trunk/debian/python-cssutils.manpages
===================================================================
--- packages/cssutils/trunk/debian/python-cssutils.manpages	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/python-cssutils.manpages	2011-11-19 08:09:39 UTC (rev 19377)
@@ -1,3 +0,0 @@
-debian/man/csscapture.manpage1
-debian/man/csscombine.manpage1
-debian/man/cssparse.manpage1

Modified: packages/cssutils/trunk/debian/python-cssutils.postinst
===================================================================
--- packages/cssutils/trunk/debian/python-cssutils.postinst	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/python-cssutils.postinst	2011-11-19 08:09:39 UTC (rev 19377)
@@ -6,10 +6,19 @@
     configure)
         update-alternatives --install /usr/bin/cssparse cssparse \
                                       /usr/bin/cssparse.py2 20 \
-                            --slave /usr/bin/csscombine csscombine \
+                            --slave /usr/share/man/man1/cssparse.1.gz \
+                                    cssparse.1.gz \
+                                    /usr/share/man/man1/cssparse.py2.1.gz
+        update-alternatives --install /usr/bin/csscombine csscombine \
                                       /usr/bin/csscombine.py2 21 \
-                            --slave /usr/bin/csscapture csscombine \
-                                      /usr/bin/csscapture.py2 22
+                            --slave /usr/share/man/man1/csscombine.1.gz \
+                                    csscombine.1.gz \
+                                    /usr/share/man/man1/csscombine.py2.1.gz
+        update-alternatives --install /usr/bin/csscapture csscapture \
+                                      /usr/bin/csscapture.py2 22 \
+                            --slave /usr/share/man/man1/csscapture.1.gz \
+                                    csscapture.1.gz \
+                                    /usr/share/man/man1/csscapture.py2.1.gz 
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Deleted: packages/cssutils/trunk/debian/python3-cssutils.links
===================================================================
--- packages/cssutils/trunk/debian/python3-cssutils.links	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/python3-cssutils.links	2011-11-19 08:09:39 UTC (rev 19377)
@@ -1,3 +0,0 @@
-/usr/lib/python3/dist-packages/cssutils/scripts/cssparse.py /usr/bin/cssparse.py3
-/usr/lib/python3/dist-packages/cssutils/scripts/csscombine.py /usr/bin/csscombine.py3
-/usr/lib/python3/dist-packages/cssutils/scripts/csscapture.py /usr/bin/csscapture.py3

Deleted: packages/cssutils/trunk/debian/python3-cssutils.manpages
===================================================================
--- packages/cssutils/trunk/debian/python3-cssutils.manpages	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/python3-cssutils.manpages	2011-11-19 08:09:39 UTC (rev 19377)
@@ -1,3 +0,0 @@
-debian/man/csscapture3.manpage1
-debian/man/csscombine3.manpage1
-debian/man/cssparse3.manpage1

Modified: packages/cssutils/trunk/debian/python3-cssutils.postinst
===================================================================
--- packages/cssutils/trunk/debian/python3-cssutils.postinst	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/python3-cssutils.postinst	2011-11-19 08:09:39 UTC (rev 19377)
@@ -6,10 +6,19 @@
     configure)
         update-alternatives --install /usr/bin/cssparse cssparse \
                                       /usr/bin/cssparse.py3 10 \
-                            --install /usr/bin/csscombine csscombine \
+                            --slave /usr/share/man/man1/cssparse.1.gz \
+                                    cssparse.1.gz \
+                                    /usr/share/man/man1/cssparse.py3.1.gz
+        update-alternatives --install /usr/bin/csscombine csscombine \
                                       /usr/bin/csscombine.py3 11 \
-                            --install /usr/bin/csscapture csspature \
-                                      /usr/bin/csscapture.py3 12
+                            --slave /usr/share/man/man1/csscombine.1.gz \
+                                    csscombine.1.gz \
+                                    /usr/share/man/man1/csscombine.py3.1.gz
+        update-alternatives --install /usr/bin/csscapture csscapture \
+                                      /usr/bin/csscapture.py3 12 \
+                            --slave /usr/share/man/man1/csscapture.1.gz \
+                                    csscapture.1.gz \
+                                    /usr/share/man/man1/csscapture.py3.1.gz
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

Modified: packages/cssutils/trunk/debian/rules
===================================================================
--- packages/cssutils/trunk/debian/rules	2011-11-18 22:24:35 UTC (rev 19376)
+++ packages/cssutils/trunk/debian/rules	2011-11-19 08:09:39 UTC (rev 19377)
@@ -19,12 +19,52 @@
 		$$py setup.py install --skip-build --root debian/python-cssutils \
 			--install-layout deb; \
 	done
+	rm $(CURDIR)/debian/python-cssutils/usr/bin/cssparse
+	rm $(CURDIR)/debian/python-cssutils/usr/bin/csscombine
+	rm $(CURDIR)/debian/python-cssutils/usr/bin/csscapture
 	set -e; \
 	for py in $(PY3VERS); do \
 		$$py setup.py install --skip-build --root debian/python3-cssutils \
 			--install-layout deb; \
 	done
+	rm $(CURDIR)/debian/python3-cssutils/usr/bin/cssparse
+	rm $(CURDIR)/debian/python3-cssutils/usr/bin/csscombine
+	rm $(CURDIR)/debian/python3-cssutils/usr/bin/csscapture
 
+override_dh_installman:
+	cp debian/man/cssparse.manpage1 debian/man/cssparse.py2.1
+	dh_installman -p python-cssutils debian/man/cssparse.py2.1
+	cp debian/man/csscombine.manpage1 debian/man/csscombine.py2.1
+	dh_installman -p python-cssutils debian/man/csscombine.py2.1
+	cp debian/man/csscapture.manpage1 debian/man/csscapture.py2.1
+	dh_installman -p python-cssutils debian/man/csscapture.py2.1
+	cp debian/man/cssparse.manpage1 debian/man/cssparse.py3.1
+	dh_installman -p python3-cssutils debian/man/cssparse.py3.1
+	cp debian/man/csscombine.manpage1 debian/man/csscombine.py3.1
+	dh_installman -p python3-cssutils debian/man/csscombine.py3.1
+	cp debian/man/csscapture.manpage1 debian/man/csscapture.py3.1
+	dh_installman -p python3-cssutils debian/man/csscapture.py3.1
+
+override_dh_link:
+	dh_link -p python-cssutils /usr/share/pyshared/cssutils/scripts/cssparse.py \
+	                           /usr/bin/cssparse.py2 \
+	                           /usr/share/pyshared/cssutils/scripts/csscombine.py \
+	                           /usr/bin/csscombine.py2 \
+	                           /usr/share/pyshared/cssutils/scripts/csscapture.py \
+	                           /usr/bin/csscapture.py2
+	dh_link -p python3-cssutils /usr/lib/python3/dist-packages/cssutils/scripts/cssparse.py \
+	                            /usr/bin/cssparse.py3 \
+	                            /usr/lib/python3/dist-packages/cssutils/scripts/csscombine.py \
+	                            /usr/bin/csscombine.py3 \
+	                            /usr/lib/python3/dist-packages/cssutils/scripts/csscapture.py \
+	                            /usr/bin/csscapture.py3
+	sed -i '1s,python$$,python3,' \
+	    debian/python3-cssutils/usr/lib/python3/dist-packages/cssutils/scripts/cssparse.py
+	sed -i '1s,python$$,python3,' \
+	    debian/python3-cssutils/usr/lib/python3/dist-packages/cssutils/scripts/csscombine.py
+	sed -i '1s,python$$,python3,' \
+	    debian/python3-cssutils/usr/lib/python3/dist-packages/cssutils/scripts/csscapture.py
+
 override_dh_fixperms:
 	dh_fixperms
 	chmod +x debian/python-cssutils/usr/share/pyshared/cssutils/scripts/cssparse.py
@@ -36,4 +76,5 @@
 
 override_dh_auto_clean:
 	rm -rf build *.egg-info
-
+	rm -f debian/man/cssparse.py2.1 debian/man/csscombine.py2.1 debian/man/csscapture.py2.1
+	rm -f debian/man/cssparse.py3.1 debian/man/csscombine.py3.1 debian/man/csscapture.py3.1




More information about the Python-modules-commits mailing list