[Python-modules-commits] r17211 - in packages/pastescript/trunk/debian (13 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Sat May 28 16:33:50 UTC 2011


    Date: Saturday, May 28, 2011 @ 16:33:49
  Author: piotr
Revision: 17211

* Convert to dh_python2
* Source format changed to 3.0 (quilt)
* Standards-Version bumped to 3.9.2 (no changes needed)

Added:
  packages/pastescript/trunk/debian/patches/01_disable_ez_setup.patch
  packages/pastescript/trunk/debian/patches/02_rename_templates_dir.patch
  packages/pastescript/trunk/debian/patches/03_try_to_find_templates_in_system_dir.patch
  packages/pastescript/trunk/debian/patches/series
Modified:
  packages/pastescript/trunk/debian/changelog
  packages/pastescript/trunk/debian/control
  packages/pastescript/trunk/debian/rules
  packages/pastescript/trunk/debian/source/format
Deleted:
  packages/pastescript/trunk/debian/README.source
  packages/pastescript/trunk/debian/patches/00list
  packages/pastescript/trunk/debian/patches/01_disable_ez_setup.dpatch
  packages/pastescript/trunk/debian/patches/02_rename_templates_dir.dpatch
  packages/pastescript/trunk/debian/patches/03_try_to_find_templates_in_system_dir.dpatch

Deleted: packages/pastescript/trunk/debian/README.source
===================================================================
--- packages/pastescript/trunk/debian/README.source	2011-05-28 16:28:49 UTC (rev 17210)
+++ packages/pastescript/trunk/debian/README.source	2011-05-28 16:33:49 UTC (rev 17211)
@@ -1,4 +0,0 @@
-This package is using dpatch patch system. 
-
-To get the fully patched source after unpacking the source package, cd to
-the root level of the source package and run `./debian/rules patch`

Modified: packages/pastescript/trunk/debian/changelog
===================================================================
--- packages/pastescript/trunk/debian/changelog	2011-05-28 16:28:49 UTC (rev 17210)
+++ packages/pastescript/trunk/debian/changelog	2011-05-28 16:33:49 UTC (rev 17211)
@@ -1,8 +1,10 @@
-pastescript (1.7.3-7) UNRELEASED; urgency=low
+pastescript (1.7.3-7) unstable; urgency=low
 
-  * Remove all pth files, including the ones without Python version in filename
+  * Convert to dh_python2
+  * Source format changed to 3.0 (quilt)
+  * Standards-Version bumped to 3.9.2 (no changes needed)
 
- -- Piotr Ożarowski <piotr at debian.org>  Wed, 16 Jun 2010 23:45:42 +0200
+ -- Piotr Ożarowski <piotr at debian.org>  Sat, 28 May 2011 17:41:00 +0200
 
 pastescript (1.7.3-6) unstable; urgency=low
 

Modified: packages/pastescript/trunk/debian/control
===================================================================
--- packages/pastescript/trunk/debian/control	2011-05-28 16:28:49 UTC (rev 17210)
+++ packages/pastescript/trunk/debian/control	2011-05-28 16:33:49 UTC (rev 17211)
@@ -3,19 +3,19 @@
 Priority: optional
 Maintainer: Piotr Ożarowski <piotr at debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 5), dpatch
-Build-Depends-Indep: python-all (>= 2.3.5-11), python-support (>= 0.6.4),
+Build-Depends: debhelper (>= 5)
+Build-Depends-Indep: python-all (>= 2.6.6-3~),
  python-setuptools (>= 0.6b3-1~), python-sphinx, python-paste, python-pastedeploy
-Standards-Version: 3.8.4
+Standards-Version: 3.9.2
 Homepage: http://pythonpaste.org/script/
-XS-Python-Version: >= 2.4
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/pastescript/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pastescript/trunk/
+X-Python-Version: >= 2.4
 
 Package: python-pastescript
 Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}, python-paste (>= 1.6-1),
- python-pastedeploy (>= 1.3.1-2), python-setuptools | python-distribute
+Depends: ${python:Depends}, ${misc:Depends}, python-paste (>= 1.3),
+ python-pastedeploy, python-setuptools | python-distribute
 Suggests: python-cherrypy3 | python-cherrypy, python-flup (>= 0.5-1),
  python-cheetah (>= 1.0-1.1), libjs-jquery
 Description: serving web applications, creating file layouts for Python packages

Deleted: packages/pastescript/trunk/debian/patches/00list
===================================================================
--- packages/pastescript/trunk/debian/patches/00list	2011-05-28 16:28:49 UTC (rev 17210)
+++ packages/pastescript/trunk/debian/patches/00list	2011-05-28 16:33:49 UTC (rev 17211)
@@ -1,3 +0,0 @@
-01_disable_ez_setup
-02_rename_templates_dir
-03_try_to_find_templates_in_system_dir.dpatch

Deleted: packages/pastescript/trunk/debian/patches/01_disable_ez_setup.dpatch
===================================================================
--- packages/pastescript/trunk/debian/patches/01_disable_ez_setup.dpatch	2011-05-28 16:28:49 UTC (rev 17210)
+++ packages/pastescript/trunk/debian/patches/01_disable_ez_setup.dpatch	2011-05-28 16:33:49 UTC (rev 17211)
@@ -1,16 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_disable_ez_setup.dpatch by Piotr Ożarowski <piotr at debian.org>
-##
-## DP: this patch disables ez_setup which is checking if proper setuptools
-## DP: version is installed (we're forcing correct version via Build-Depends:)
-
- at DPATCH@
-diff -urNad pastescript-1.3.6~/setup.py pastescript-1.3.6/setup.py
---- pastescript-1.3.6~/setup.py	2007-09-17 23:21:23.000000000 +0200
-+++ pastescript-1.3.6/setup.py	2007-09-17 23:29:42.000000000 +0200
-@@ -1,5 +1,3 @@
--import ez_setup
--ez_setup.use_setuptools()
- from setuptools import setup, find_packages
- import re, os
- 

Added: packages/pastescript/trunk/debian/patches/01_disable_ez_setup.patch
===================================================================
--- packages/pastescript/trunk/debian/patches/01_disable_ez_setup.patch	                        (rev 0)
+++ packages/pastescript/trunk/debian/patches/01_disable_ez_setup.patch	2011-05-28 16:33:49 UTC (rev 17211)
@@ -0,0 +1,13 @@
+# 01_disable_ez_setup.dpatch by Piotr Ożarowski <piotr at debian.org>
+#
+# this patch disables ez_setup which is checking if proper setuptools
+# version is installed (we're forcing correct version via Build-Depends:)
+
+--- pastescript-1.7.3.orig/setup.py
++++ pastescript-1.7.3/setup.py
+@@ -1,5 +1,3 @@
+-import ez_setup
+-ez_setup.use_setuptools()
+ from setuptools import setup, find_packages
+ import re, os
+ 

Deleted: packages/pastescript/trunk/debian/patches/02_rename_templates_dir.dpatch
===================================================================
--- packages/pastescript/trunk/debian/patches/02_rename_templates_dir.dpatch	2011-05-28 16:28:49 UTC (rev 17210)
+++ packages/pastescript/trunk/debian/patches/02_rename_templates_dir.dpatch	2011-05-28 16:33:49 UTC (rev 17211)
@@ -1,18 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_rename_templates_dir.dpatch by Piotr Ożarowski <piotr at debian.org>
-##
-## DP: paster's templates are outside site-packages in Debian
-
- at DPATCH@
-diff -urNad pastescript-1.7~/paste/script/templates.py pastescript-1.7/paste/script/templates.py
---- pastescript-1.7~/paste/script/templates.py	2008-10-29 03:51:41.000000000 +0100
-+++ pastescript-1.7/paste/script/templates.py	2008-10-30 19:16:52.723091740 +0100
-@@ -185,7 +185,7 @@
- 
- class BasicPackage(Template):
- 
--    _template_dir = 'paster-templates/basic_package'
-+    _template_dir = '/usr/share/paster_templates/basic_package'
-     summary = "A basic setuptools-enabled package"
-     vars = [
-         var('version', 'Version (like 0.1)'),

Added: packages/pastescript/trunk/debian/patches/02_rename_templates_dir.patch
===================================================================
--- packages/pastescript/trunk/debian/patches/02_rename_templates_dir.patch	                        (rev 0)
+++ packages/pastescript/trunk/debian/patches/02_rename_templates_dir.patch	2011-05-28 16:33:49 UTC (rev 17211)
@@ -0,0 +1,15 @@
+# 02_rename_templates_dir.dpatch by Piotr Ożarowski <piotr at debian.org>
+#
+# paster's templates are outside site-packages in Debian
+
+--- pastescript-1.7.3.orig/paste/script/templates.py
++++ pastescript-1.7.3/paste/script/templates.py
+@@ -202,7 +202,7 @@ class var(object):
+ 
+ class BasicPackage(Template):
+ 
+-    _template_dir = 'paster-templates/basic_package'
++    _template_dir = '/usr/share/paster_templates/basic_package'
+     summary = "A basic setuptools-enabled package"
+     vars = [
+         var('version', 'Version (like 0.1)'),

Deleted: packages/pastescript/trunk/debian/patches/03_try_to_find_templates_in_system_dir.dpatch
===================================================================
--- packages/pastescript/trunk/debian/patches/03_try_to_find_templates_in_system_dir.dpatch	2011-05-28 16:28:49 UTC (rev 17210)
+++ packages/pastescript/trunk/debian/patches/03_try_to_find_templates_in_system_dir.dpatch	2011-05-28 16:33:49 UTC (rev 17211)
@@ -1,50 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_try_to_find_templates_in_system_dir.dpatch by  <piotr at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
- at DPATCH@
-diff -urNad pastescript-1.7.3~/paste/script/templates.py pastescript-1.7.3/paste/script/templates.py
---- pastescript-1.7.3~/paste/script/templates.py	2008-11-10 20:46:10.000000000 +0100
-+++ pastescript-1.7.3/paste/script/templates.py	2009-11-02 22:34:44.854305689 +0100
-@@ -5,6 +5,7 @@
- import inspect
- import copydir
- import command
-+import re
- 
- from paste.util.template import paste_script_template_renderer
- 
-@@ -45,13 +46,29 @@
-         mod = sys.modules[self.__class__.__module__]
-         return os.path.dirname(mod.__file__)
- 
-+    def _distro_dir(self, args):
-+        """Returns full path to template directory if it's found in
-+        /usr/local/share/paster_templates/ or /usr/share/paster_templates/"""
-+
-+        tpldir_pattern = re.compile('[^/]*templates/')
-+
-+        for d in ('/usr/local/share/paster_templates/', '/usr/share/paster_templates/'):
-+            directory = os.path.join(d, *args)
-+            if os.path.isdir(directory):
-+                return directory
-+            # remove .*templates directory if it's in the args and try again
-+            args_joined = os.path.join(*args)
-+            directory = os.path.abspath(os.path.join(d, tpldir_pattern.sub('./', args_joined)))
-+            if os.path.isdir(directory):
-+                return directory
-+
-     def template_dir(self):
-         assert self._template_dir is not None, (
-             "Template %r didn't set _template_dir" % self)
-         if isinstance( self._template_dir, tuple):
--            return self._template_dir
-+            return self._distro_dir(self._template_dir) or self._template_dir
-         else:
--            return os.path.join(self.module_dir(), self._template_dir)
-+            return self._distro_dir((self._template_dir,)) or os.path.join(self.module_dir(), self._template_dir)
- 
-     def run(self, command, output_dir, vars):
-         self.pre(command, output_dir, vars)

Added: packages/pastescript/trunk/debian/patches/03_try_to_find_templates_in_system_dir.patch
===================================================================
--- packages/pastescript/trunk/debian/patches/03_try_to_find_templates_in_system_dir.patch	                        (rev 0)
+++ packages/pastescript/trunk/debian/patches/03_try_to_find_templates_in_system_dir.patch	2011-05-28 16:33:49 UTC (rev 17211)
@@ -0,0 +1,42 @@
+--- pastescript-1.7.3.orig/paste/script/templates.py
++++ pastescript-1.7.3/paste/script/templates.py
+@@ -5,6 +5,7 @@ import os
+ import inspect
+ import copydir
+ import command
++import re
+ 
+ from paste.util.template import paste_script_template_renderer
+ 
+@@ -45,13 +46,29 @@ class Template(object):
+         mod = sys.modules[self.__class__.__module__]
+         return os.path.dirname(mod.__file__)
+ 
++    def _distro_dir(self, args):
++        """Returns full path to template directory if it's found in
++        /usr/local/share/paster_templates/ or /usr/share/paster_templates/"""
++
++        tpldir_pattern = re.compile('[^/]*templates/')
++
++        for d in ('/usr/local/share/paster_templates/', '/usr/share/paster_templates/'):
++            directory = os.path.join(d, *args)
++            if os.path.isdir(directory):
++                return directory
++            # remove .*templates directory if it's in the args and try again
++            args_joined = os.path.join(*args)
++            directory = os.path.abspath(os.path.join(d, tpldir_pattern.sub('./', args_joined)))
++            if os.path.isdir(directory):
++                return directory
++
+     def template_dir(self):
+         assert self._template_dir is not None, (
+             "Template %r didn't set _template_dir" % self)
+         if isinstance( self._template_dir, tuple):
+-            return self._template_dir
++            return self._distro_dir(self._template_dir) or self._template_dir
+         else:
+-            return os.path.join(self.module_dir(), self._template_dir)
++            return self._distro_dir((self._template_dir,)) or os.path.join(self.module_dir(), self._template_dir)
+ 
+     def run(self, command, output_dir, vars):
+         self.pre(command, output_dir, vars)

Added: packages/pastescript/trunk/debian/patches/series
===================================================================
--- packages/pastescript/trunk/debian/patches/series	                        (rev 0)
+++ packages/pastescript/trunk/debian/patches/series	2011-05-28 16:33:49 UTC (rev 17211)
@@ -0,0 +1,3 @@
+03_try_to_find_templates_in_system_dir.patch
+02_rename_templates_dir.patch
+01_disable_ez_setup.patch

Modified: packages/pastescript/trunk/debian/rules
===================================================================
--- packages/pastescript/trunk/debian/rules	2011-05-28 16:28:49 UTC (rev 17210)
+++ packages/pastescript/trunk/debian/rules	2011-05-28 16:33:49 UTC (rev 17211)
@@ -4,17 +4,16 @@
 
 PYVERS=$(shell pyversions -vr)
 PKGDIR=$(CURDIR)/debian/python-pastescript
+include /usr/share/python/python.mk
 
-include /usr/share/dpatch/dpatch.make
-
-clean: unpatch
+clean:
 	dh_testdir
 	dh_testroot
 	rm -rf dist build
 	find . -name '*\.py[co]' -delete
-	dh_clean build-docs $(PYVERS:%=install-python%) install-stamp
+	dh_clean build-docs $(PYVERS:%=install-python%) install-stamp PasteScript.egg-info/PKG-INFO
 
-build: patch build-docs
+build: build-docs
 
 build-docs:
 	dh_testdir
@@ -39,20 +38,17 @@
 		>> $(PKGDIR)/usr/share/lintian/overrides/python-pastescript
 	touch $@
 
-install-python%: patch
-	python$* setup.py install --root $(PKGDIR) --prefix=/usr/ \
-		--install-lib=/usr/lib/python$*/site-packages \
-		--single-version-externally-managed
+install-python%:
+	python$* setup.py install --root $(PKGDIR) \
+		--single-version-externally-managed $(py_setup_install_args)
 	# pth file is not needed since all paste* packages are installed in the same directory
-	rm -f $(PKGDIR)/usr/lib/python$*/site-packages/PasteScript-*-nspkg.pth
-	# python-support's namespace feature will handle this
-	rm -f $(PKGDIR)/usr/lib/python$*/site-packages/paste/__init__.py
+	rm -f $(PKGDIR)$(call py_libdir,$*)/PasteScript-*.pth
+	rm -f $(PKGDIR)$(call py_libdir,$*)/PasteScript-*/namespace_packages.txt
+	rm -rf $(PKGDIR)$(call py_libdir,$*)/paste/script/paster-templates
 	# create /usr/bin/pasterX.Y symlink
 	install -m 755 $(CURDIR)/scripts/paster $(PKGDIR)/usr/bin/paster$*
 	sed -i -e '1s,usr/bin/.*,usr/bin/python$*,' $(PKGDIR)/usr/bin/paster$*
 	dh_link /usr/share/man/man1/paster.1.gz /usr/share/man/man1/paster$*.1.gz
-	echo "python-pastescript: python-script-but-no-python-dep ./usr/bin/paster$*" \
-		>> $(PKGDIR)/usr/share/lintian/overrides/python-pastescript
 
 binary-indep: build install
 	dh_testdir -i
@@ -61,7 +57,7 @@
 	dh_installdocs -i
 	dh_installman -i
 	dh_install scripts/paster /usr/bin/
-	dh_pysupport -i -X/usr/bin/paster
+	dh_python2 -i
 	dh_compress -i -X.py -X.js
 	dh_fixperms -i
 	dh_installdeb -i

Modified: packages/pastescript/trunk/debian/source/format
===================================================================
--- packages/pastescript/trunk/debian/source/format	2011-05-28 16:28:49 UTC (rev 17210)
+++ packages/pastescript/trunk/debian/source/format	2011-05-28 16:33:49 UTC (rev 17211)
@@ -1 +1 @@
-1.0
+3.0 (quilt)




More information about the Python-modules-commits mailing list