[Python-modules-commits] r14964 - in packages/stdeb/trunk/debian (14 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Sun Nov 28 23:06:11 UTC 2010


    Date: Sunday, November 28, 2010 @ 23:06:07
  Author: piotr
Revision: 14964

* New upstream snapshot
* New patches:
  - remove-pycentral-options (closes: #597137)
  - pass-buildsystem-to-the-sequencer-rather-than-to-DH_OPTIONS
    (closes: #597128)
  - do-not-reset-environment-options-in-debian-rules
  - replace-tabs-with-spaces
  - use-dh_python2-instead-of-dh_pysupport
  - change-default-source-package-format-to-3.0-quilt
  - adjust-debian-control-template-to-latest-changes-in-policy
* Convert from dh_pysupport to dh_python2
* Add python-all to Recommends and python-all-dev to Suggests
* Source format changed to 3.0 (quilt)
* Standards-Version bumped to 3.9.1 (no changes needed)
* Debian packaging license now matches upstream's

Added:
  packages/stdeb/trunk/debian/patches/
  packages/stdeb/trunk/debian/patches/0001-remove-pycentral-options.patch
  packages/stdeb/trunk/debian/patches/0002-pass-buildsystem-to-the-sequencer-rather-than-to-DH_OPTIONS.patch
  packages/stdeb/trunk/debian/patches/0003-do-not-reset-environment-options-in-debian-rules.patch
  packages/stdeb/trunk/debian/patches/0004-replace-tabs-with-spaces.patch
  packages/stdeb/trunk/debian/patches/0005-use-dh_python2-instead-of-dh_pysupport.patch
  packages/stdeb/trunk/debian/patches/0006-change-default-source-package-format-to-3.0-quilt.patch
  packages/stdeb/trunk/debian/patches/0007-adjust-debian-control-template-to-latest-changes-in-policy.patch
  packages/stdeb/trunk/debian/patches/series
Modified:
  packages/stdeb/trunk/debian/changelog
  packages/stdeb/trunk/debian/control
  packages/stdeb/trunk/debian/copyright
  packages/stdeb/trunk/debian/rules
  packages/stdeb/trunk/debian/source/format

Modified: packages/stdeb/trunk/debian/changelog
===================================================================
--- packages/stdeb/trunk/debian/changelog	2010-11-28 17:38:11 UTC (rev 14963)
+++ packages/stdeb/trunk/debian/changelog	2010-11-28 23:06:07 UTC (rev 14964)
@@ -1,3 +1,23 @@
+stdeb (0.6.0+20100620-1) unstable; urgency=low
+
+  * New upstream snapshot
+  * New patches:
+    - remove-pycentral-options (closes: #597137)
+    - pass-buildsystem-to-the-sequencer-rather-than-to-DH_OPTIONS
+      (closes: #597128)
+    - do-not-reset-environment-options-in-debian-rules
+    - replace-tabs-with-spaces
+    - use-dh_python2-instead-of-dh_pysupport
+    - change-default-source-package-format-to-3.0-quilt
+    - adjust-debian-control-template-to-latest-changes-in-policy
+  * Convert from dh_pysupport to dh_python2
+  * Add python-all to Recommends and python-all-dev to Suggests
+  * Source format changed to 3.0 (quilt)
+  * Standards-Version bumped to 3.9.1 (no changes needed)
+  * Debian packaging license now matches upstream's
+
+ -- Piotr Ożarowski <piotr at debian.org>  Sun, 28 Nov 2010 23:49:51 +0100
+
 stdeb (0.6.0-1) unstable; urgency=low
 
   * New upstream release

Modified: packages/stdeb/trunk/debian/control
===================================================================
--- packages/stdeb/trunk/debian/control	2010-11-28 17:38:11 UTC (rev 14963)
+++ packages/stdeb/trunk/debian/control	2010-11-28 23:06:07 UTC (rev 14964)
@@ -4,9 +4,9 @@
 Maintainer: Andrew Straw <strawman at astraw.com>
 Uploaders: Piotr Ożarowski <piotr at debian.org>,
  Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 7.0.50~), python
-Build-Depends-Indep: python-support (>= 0.6.4), python-setuptools, help2man
-Standards-Version: 3.8.4
+Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3)
+Build-Depends-Indep: python-setuptools, help2man
+Standards-Version: 3.9.1
 Homepage: http://github.com/astraw/stdeb
 XS-Python-Version: all
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/stdeb/trunk
@@ -15,7 +15,9 @@
 Package: python-stdeb
 Architecture: all
 Depends: ${misc:Depends}, ${python:Depends}, debhelper (>= 7), python-setuptools
-Recommends: apt-file, dpkg-dev
+Breaks: ${python:Breaks}
+Recommends: apt-file, dpkg-dev, python-all
+Suggests: python-all-dev
 Description: Python to Debian source package conversion utility
  This package provides some tools to produce Debian packages from Python
  packages via a new distutils command, sdist_dsc. Automatic defaults are

Modified: packages/stdeb/trunk/debian/copyright
===================================================================
--- packages/stdeb/trunk/debian/copyright	2010-11-28 17:38:11 UTC (rev 14963)
+++ packages/stdeb/trunk/debian/copyright	2010-11-28 23:06:07 UTC (rev 14964)
@@ -28,8 +28,5 @@
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-The Debian packaging is © 2009, Piotr Ożarowski <piotr at debian.org> and
-is licensed under the BSD.
-
-On Debian systems, the complete text of the BSD License can be found in
-`/usr/share/common-licenses/BSD'
+The Debian packaging is © 2009-2010, Piotr Ożarowski <piotr at debian.org> and
+is licensed under the same license

Added: packages/stdeb/trunk/debian/patches/0001-remove-pycentral-options.patch
===================================================================
--- packages/stdeb/trunk/debian/patches/0001-remove-pycentral-options.patch	                        (rev 0)
+++ packages/stdeb/trunk/debian/patches/0001-remove-pycentral-options.patch	2010-11-28 23:06:07 UTC (rev 14964)
@@ -0,0 +1,202 @@
+From 57662e9870324576e83880d52ecb9f50b5470953 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <ozarow at gmail.com>
+Date: Sat, 27 Nov 2010 20:21:14 +0100
+Subject: [PATCH 1/7] Remove workaround-548392 and pycentral-backwards-compatibility options
+
+closes: #597137
+---
+ stdeb/command/common.py |   16 ---------
+ stdeb/util.py           |   86 +++--------------------------------------------
+ 2 files changed, 5 insertions(+), 97 deletions(-)
+
+diff --git a/stdeb/command/common.py b/stdeb/command/common.py
+index a0e5655..0cfc770 100644
+--- a/stdeb/command/common.py
++++ b/stdeb/command/common.py
+@@ -18,8 +18,6 @@ class common_debian_package_command(Command):
+         self.patch_level = None
+         self.ignore_install_requires = None
+         self.debian_version = None
+-        self.pycentral_backwards_compatibility = None
+-        self.workaround_548392 = None
+         self.force_buildsystem = None
+         self.no_backwards_compatibility = None
+         self.guess_conflicts_provides_replaces = None
+@@ -48,24 +46,12 @@ class common_debian_package_command(Command):
+         if self.patch_level is not None:
+             self.patch_level = int(self.patch_level)
+ 
+-        if self.pycentral_backwards_compatibility is not None:
+-            self.pycentral_backwards_compatibility = str_to_bool(
+-                self.pycentral_backwards_compatibility)
+-        if self.workaround_548392 is not None:
+-            self.workaround_548392 = str_to_bool(self.workaround_548392)
+-
+         if self.force_buildsystem is not None:
+             self.force_buildsystem = str_to_bool(self.force_buildsystem)
+ 
+-        if self.workaround_548392 is None:
+-            self.workaround_548392=False
+-
+         if self.force_buildsystem is None:
+             self.force_buildsystem = True
+ 
+-        if self.pycentral_backwards_compatibility is None:
+-            self.pycentral_backwards_compatibility=False
+-
+         if self.guess_conflicts_provides_replaces is None:
+             # the default
+             self.guess_conflicts_provides_replaces = False
+@@ -183,10 +169,8 @@ class common_debian_package_command(Command):
+             patch_level = self.patch_level,
+             install_requires = install_requires,
+             debian_version = self.debian_version,
+-            workaround_548392=self.workaround_548392,
+             force_buildsystem=self.force_buildsystem,
+             have_script_entry_points = have_script_entry_points,
+-            pycentral_backwards_compatibility=self.pycentral_backwards_compatibility,
+             setup_requires = (), # XXX How do we get the setup_requires?
+             use_setuptools = use_setuptools,
+             guess_conflicts_provides_replaces=self.guess_conflicts_provides_replaces,
+diff --git a/stdeb/util.py b/stdeb/util.py
+index 32e2393..60a3ecc 100644
+--- a/stdeb/util.py
++++ b/stdeb/util.py
+@@ -66,10 +66,11 @@ stdeb_cmdline_opts = [
+     ('ignore-install-requires', 'i',
+      'ignore the requirements from requires.txt in the egg-info directory'),
+     ('pycentral-backwards-compatibility=',None,
+-     'If True, enable migration from old stdeb that used pycentral. (Default=False).'),
++     'This option has no effect, is here for backwards compatibility, and may '
++     'be removed someday.'),
+     ('workaround-548392=',None,
+-     'If True, limit binary package to single Python version, '
+-     'working around Debian bug 548392 of debhelper. (Default=False).'),
++     'This option has no effect, is here for backwards compatibility, and may '
++     'be removed someday.'),
+     ('force-buildsystem=',None,
+      "If True (the default), set 'DH_OPTIONS=--buildsystem=python_distutils'"),
+     ('no-backwards-compatibility',None,
+@@ -638,10 +639,8 @@ class DebianInfo:
+                  install_requires=None,
+                  setup_requires=None,
+                  debian_version=None,
+-                 workaround_548392=None,
+                  force_buildsystem=None,
+                  have_script_entry_points = None,
+-                 pycentral_backwards_compatibility=None,
+                  use_setuptools = False,
+                  guess_conflicts_provides_replaces = False,
+                  sdist_dsc_command = None,
+@@ -737,8 +736,6 @@ class DebianInfo:
+         depends = ['${misc:Depends}', '${python:Depends}']
+         need_custom_binary_target = False
+ 
+-        self.do_pycentral_removal_preinst = pycentral_backwards_compatibility
+-
+         if has_ext_modules:
+             self.architecture = 'any'
+             depends.append('${shlibs:Depends}')
+@@ -793,10 +790,7 @@ class DebianInfo:
+             self.long_description = ''
+ 
+         if have_script_entry_points:
+-            if workaround_548392:
+-                build_deps.append( 'debhelper (>= %s)'%DH_MIN_VERS)
+-            else:
+-                build_deps.append( 'debhelper (>= %s)'%DH_IDEAL_VERS )
++            build_deps.append( 'debhelper (>= %s)'%DH_IDEAL_VERS )
+         else:
+             build_deps.append( 'debhelper (>= %s)'%DH_MIN_VERS )
+ 
+@@ -838,53 +832,6 @@ class DebianInfo:
+                 self.patch_level = 0
+ 
+         xs_python_version = parse_vals(cfg,module_name,'XS-Python-Version')
+-        if have_script_entry_points and workaround_548392:
+-
+-            # Trap cases that might trigger Debian bug #548392 and
+-            # workaround. Disable this block once the bugfix has
+-            # become widespread and change Build-Depends: to include
+-            # sufficiently recent debhelper.
+-
+-            if len(xs_python_version)==0:
+-                # No Python version specified. For now, just use default Python
+-                log.warn('working around Debian #548392, changing '
+-                         'XS-Python-Version: to \'current\'')
+-                xs_python_version = ['current']
+-            else:
+-
+-                # The user specified a Python version. Check if s/he
+-                # specified more than one. (Specifying a single
+-                # version won't trigger the bug.)
+-
+-                pyversions_fname = '/usr/bin/pyversions'
+-                assert os.path.exists(pyversions_fname)
+-                pyversions = load_module('pyversions',pyversions_fname)
+-                vstring = ', '.join(xs_python_version)
+-                pyversions_result = pyversions.parse_versions(vstring)
+-                if ('versions' in pyversions_result and
+-                    len(pyversions_result['versions'])>1):
+-
+-                    vers = list(pyversions_result['versions'])
+-                    # More than one Python version specified.
+-
+-                    # This is dubious as the following comparison
+-                    # happens at source build time, but what matters
+-                    # is what runs when building the binary package.
+-
+-                    default_vers = pyversions.default_version(version_only=True)
+-                    if default_vers in vers:
+-                        log.warn('working around Debian #548392, changing '
+-                                 'XS-Python-Version: to \'current\'')
+-                        xs_python_version = ['current']
+-                    else:
+-                        vers.sort()
+-                        log.warn('working around Debian #548392, changing '
+-                                 'XS-Python-Version: to \'%s\''%vers[-1])
+-                        xs_python_version = [vers[-1]]
+-                elif 'all' in pyversions_result:
+-                    log.warn('working around Debian #548392, changing '
+-                             'XS-Python-Version: to \'current\'')
+-                    xs_python_version = ['current']
+ 
+         if len(xs_python_version)!=0:
+             self.source_stanza_extras += ('XS-Python-Version: '+
+@@ -1167,13 +1114,6 @@ def build_dsc(debinfo,
+         link_func( debinfo.copyright_file,
+                  os.path.join(debian_dir,'copyright'))
+ 
+-    #    G. debian/<package>.preinst
+-    if debinfo.do_pycentral_removal_preinst:
+-        preinst = PREINST%debinfo.__dict__
+-        fd = open( os.path.join(debian_dir,'%s.preinst'%debinfo.package), mode='w')
+-        fd.write(preinst)
+-        fd.close()
+-
+     #    H. debian/<package>.install
+     if len(debinfo.install_file_lines):
+         fd = open( os.path.join(debian_dir,'%s.install'%debinfo.package), mode='w')
+@@ -1338,19 +1278,3 @@ binary-indep: build
+ %(dh_installmime_indep_line)s
+ %(dh_desktop_indep_line)s
+ """
+-
+-PREINST = """#! /bin/sh
+-
+-set -e
+-
+-# This was added by stdeb to workaround Debian #479852. In a nutshell,
+-# pycentral does not remove normally remove its symlinks on an
+-# upgrade. Since we're using python-support, however, those symlinks
+-# will be broken. This tells python-central to clean up any symlinks.
+-if [ -e /var/lib/dpkg/info/%(package)s.list ] && which pycentral >/dev/null 2>&1
+-then
+-    pycentral pkgremove %(package)s
+-fi
+-
+-#DEBHELPER#
+-"""
+-- 
+1.7.2.3
+

Added: packages/stdeb/trunk/debian/patches/0002-pass-buildsystem-to-the-sequencer-rather-than-to-DH_OPTIONS.patch
===================================================================
--- packages/stdeb/trunk/debian/patches/0002-pass-buildsystem-to-the-sequencer-rather-than-to-DH_OPTIONS.patch	                        (rev 0)
+++ packages/stdeb/trunk/debian/patches/0002-pass-buildsystem-to-the-sequencer-rather-than-to-DH_OPTIONS.patch	2010-11-28 23:06:07 UTC (rev 14964)
@@ -0,0 +1,50 @@
+From 4e1b9ae994d7d237dcc09f59eb0c5adf8ff58b8d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr at debian.org>
+Date: Sat, 27 Nov 2010 20:54:45 +0100
+Subject: [PATCH 2/7] pass buildsystem to the sequencer rather than to DH_OPTIONS
+
+closes: #597128
+---
+ stdeb/util.py |   11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/stdeb/util.py b/stdeb/util.py
+index 60a3ecc..f422e09 100644
+--- a/stdeb/util.py
++++ b/stdeb/util.py
+@@ -72,7 +72,7 @@ stdeb_cmdline_opts = [
+      'This option has no effect, is here for backwards compatibility, and may '
+      'be removed someday.'),
+     ('force-buildsystem=',None,
+-     "If True (the default), set 'DH_OPTIONS=--buildsystem=python_distutils'"),
++     "If True, pass '--buildsystem=python_distutils' to dh sequencer"),
+     ('no-backwards-compatibility',None,
+      'This option has no effect, is here for backwards compatibility, and may '
+      'be removed someday.'),
+@@ -911,9 +911,12 @@ XB-Python-Version: ${python:Versions}
+ 
+         self.dirlist = ""
+ 
+-        setup_env_vars = parse_vals(cfg,module_name,'Setup-Env-Vars')
++        sequencer_options = []
+         if force_buildsystem:
+-            setup_env_vars.append('DH_OPTIONS=--buildsystem=python_distutils')
++            sequencer_options.append('--buildsystem=python_distutils')
++        self.sequencer_options = ' '.join(sequencer_options)
++
++        setup_env_vars = parse_vals(cfg,module_name,'Setup-Env-Vars')
+         self.force_buildsystem = force_buildsystem
+         self.exports = ""
+         if len(setup_env_vars):
+@@ -1254,7 +1257,7 @@ unexport LDFLAGS
+ %(exports)s
+ 
+ %(percent_symbol)s:
+-        dh $@
++        dh $@ %(sequencer_options)s
+ 
+ %(binary_target_lines)s
+ """
+-- 
+1.7.2.3
+

Added: packages/stdeb/trunk/debian/patches/0003-do-not-reset-environment-options-in-debian-rules.patch
===================================================================
--- packages/stdeb/trunk/debian/patches/0003-do-not-reset-environment-options-in-debian-rules.patch	                        (rev 0)
+++ packages/stdeb/trunk/debian/patches/0003-do-not-reset-environment-options-in-debian-rules.patch	2010-11-28 23:06:07 UTC (rev 14964)
@@ -0,0 +1,31 @@
+From 549b1726c42a214b1ba9b9569265328d094e64a4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr at debian.org>
+Date: Sat, 27 Nov 2010 21:04:58 +0100
+Subject: [PATCH 3/7] do not reset environment options in debian/rules
+
+---
+ stdeb/util.py |    8 --------
+ 1 files changed, 0 insertions(+), 8 deletions(-)
+
+diff --git a/stdeb/util.py b/stdeb/util.py
+index f422e09..5f4a58d 100644
+--- a/stdeb/util.py
++++ b/stdeb/util.py
+@@ -1246,14 +1246,6 @@ RULES_MAIN = """\
+ # This file was automatically generated by stdeb %(stdeb_version)s at
+ # %(date822)s
+ 
+-# Unset the environment variables set by dpkg-buildpackage. (This is
+-# necessary because distutils is brittle with compiler/linker flags
+-# set. Specifically, packages using f2py will break without this.)
+-unexport CPPFLAGS
+-unexport CFLAGS
+-unexport CXXFLAGS
+-unexport FFLAGS
+-unexport LDFLAGS
+ %(exports)s
+ 
+ %(percent_symbol)s:
+-- 
+1.7.2.3
+

Added: packages/stdeb/trunk/debian/patches/0004-replace-tabs-with-spaces.patch
===================================================================
--- packages/stdeb/trunk/debian/patches/0004-replace-tabs-with-spaces.patch	                        (rev 0)
+++ packages/stdeb/trunk/debian/patches/0004-replace-tabs-with-spaces.patch	2010-11-28 23:06:07 UTC (rev 14964)
@@ -0,0 +1,34 @@
+From 9e0f58b839d1b6f11e44d691f8a4e6df3f309c2a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr at debian.org>
+Date: Sat, 27 Nov 2010 21:16:36 +0100
+Subject: [PATCH 4/7] replace tabs with spaces
+
+---
+ stdeb/util.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/stdeb/util.py b/stdeb/util.py
+index 5f4a58d..27a2941 100644
+--- a/stdeb/util.py
++++ b/stdeb/util.py
+@@ -729,7 +729,7 @@ class DebianInfo:
+         build_deps = []
+         if use_setuptools:
+             build_deps.append('python-setuptools (>= 0.6b3)')
+-	if setup_requires is not None and len(setup_requires):
++        if setup_requires is not None and len(setup_requires):
+             build_deps.extend(
+                 get_deb_depends_from_setuptools_requires(setup_requires))
+ 
+@@ -768,7 +768,7 @@ class DebianInfo:
+                 '%s usr/share/applications'%mime_desktop_file)
+ 
+         depends.extend(parse_vals(cfg,module_name,'Depends') )
+-	if install_requires is not None and len(install_requires):
++        if install_requires is not None and len(install_requires):
+             depends.extend(get_deb_depends_from_setuptools_requires(
+                 install_requires))
+         self.depends = ', '.join(depends)
+-- 
+1.7.2.3
+

Added: packages/stdeb/trunk/debian/patches/0005-use-dh_python2-instead-of-dh_pysupport.patch
===================================================================
--- packages/stdeb/trunk/debian/patches/0005-use-dh_python2-instead-of-dh_pysupport.patch	                        (rev 0)
+++ packages/stdeb/trunk/debian/patches/0005-use-dh_python2-instead-of-dh_pysupport.patch	2010-11-28 23:06:07 UTC (rev 14964)
@@ -0,0 +1,157 @@
+From e00841cdc04c0d74cb45e8b6d8b009f761fa354c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr at debian.org>
+Date: Sat, 27 Nov 2010 21:25:58 +0100
+Subject: [PATCH 5/7] use dh_python2 instead of dh_pysupport
+
+---
+ stdeb/command/common.py |    8 --------
+ stdeb/util.py           |   39 +++++++++++++++------------------------
+ 2 files changed, 15 insertions(+), 32 deletions(-)
+
+diff --git a/stdeb/command/common.py b/stdeb/command/common.py
+index 0cfc770..e212104 100644
+--- a/stdeb/command/common.py
++++ b/stdeb/command/common.py
+@@ -96,7 +96,6 @@ class common_debian_package_command(Command):
+         except DistutilsModuleError, err:
+             use_setuptools = False
+ 
+-        install_requires = ()
+         have_script_entry_points = None
+ 
+         config_fname = 'stdeb.cfg'
+@@ -119,12 +118,6 @@ class common_debian_package_command(Command):
+             egg_module_name = egg_info_dirname[:egg_info_dirname.index('.egg-info')]
+             egg_module_name = egg_module_name.split(os.sep)[-1]
+ 
+-            try:
+-                if not self.ignore_install_requires:
+-                    install_requires = open(os.path.join(egg_info_dirname,'requires.txt'),'rU').read()
+-            except EnvironmentError:
+-                pass
+-
+             if 1:
+                 # determine whether script specifies setuptools entry_points
+                 ep_fname = os.path.join(egg_info_dirname,'entry_points.txt')
+@@ -167,7 +160,6 @@ class common_debian_package_command(Command):
+             long_description = self.distribution.get_long_description(),
+             patch_file = self.patch_file,
+             patch_level = self.patch_level,
+-            install_requires = install_requires,
+             debian_version = self.debian_version,
+             force_buildsystem=self.force_buildsystem,
+             have_script_entry_points = have_script_entry_points,
+diff --git a/stdeb/util.py b/stdeb/util.py
+index 27a2941..e036f8b 100644
+--- a/stdeb/util.py
++++ b/stdeb/util.py
+@@ -22,10 +22,7 @@ __all__ = ['DebianInfo','build_dsc','expand_tarball','expand_zip',
+ DH_MIN_VERS = '7'       # Fundamental to stdeb >= 0.4
+ DH_IDEAL_VERS = '7.4.3' # fixes Debian bug 548392
+ 
+-PYSUPPORT_MIN_VERS = '0.8.4' # Namespace package support was added
+-                             # sometime between 0.7.5ubuntu1 and
+-                             # 0.8.4lenny1 (Lenny). Might be able to
+-                             # back this down.
++PYTHON_ALL_MIN_VERS = '2.6.6-3'
+ 
+ import exceptions
+ class CalledProcessError(exceptions.Exception): pass
+@@ -636,7 +633,6 @@ class DebianInfo:
+                  long_description=NotGiven,
+                  patch_file=None,
+                  patch_level=None,
+-                 install_requires=None,
+                  setup_requires=None,
+                  debian_version=None,
+                  force_buildsystem=None,
+@@ -738,10 +734,11 @@ class DebianInfo:
+ 
+         if has_ext_modules:
+             self.architecture = 'any'
++            build_deps.append('python-all-dev (>= %s)'%PYTHON_ALL_MIN_VERS)
+             depends.append('${shlibs:Depends}')
+-            build_deps.append('python-all-dev')
+         else:
+             self.architecture = 'all'
++            build_deps.append('python-all (>= %s)'%PYTHON_ALL_MIN_VERS)
+ 
+         self.copyright_file = parse_val(cfg,module_name,'Copyright-File')
+         self.mime_file = parse_val(cfg,module_name,'MIME-File')
+@@ -768,9 +765,6 @@ class DebianInfo:
+                 '%s usr/share/applications'%mime_desktop_file)
+ 
+         depends.extend(parse_vals(cfg,module_name,'Depends') )
+-        if install_requires is not None and len(install_requires):
+-            depends.extend(get_deb_depends_from_setuptools_requires(
+-                install_requires))
+         self.depends = ', '.join(depends)
+ 
+         self.debian_section = parse_val(cfg,module_name,'Section')
+@@ -794,8 +788,6 @@ class DebianInfo:
+         else:
+             build_deps.append( 'debhelper (>= %s)'%DH_MIN_VERS )
+ 
+-        build_deps.append('python-support (>= %s)'%PYSUPPORT_MIN_VERS)
+-
+         build_deps.extend( parse_vals(cfg,module_name,'Build-Depends') )
+         self.build_depends = ', '.join(build_deps)
+ 
+@@ -911,7 +903,7 @@ XB-Python-Version: ${python:Versions}
+ 
+         self.dirlist = ""
+ 
+-        sequencer_options = []
++        sequencer_options = ['--with python2']
+         if force_buildsystem:
+             sequencer_options.append('--buildsystem=python_distutils')
+         self.sequencer_options = ' '.join(sequencer_options)
+@@ -1173,7 +1165,7 @@ def build_dsc(debinfo,
+             shutil.rmtree(tmp_dir)
+ 
+     if 1:
+-        # check versions of debhelper and python-support
++        # check versions of debhelper and python-all
+         debhelper_version_str = get_version_str('debhelper')
+         if len(debhelper_version_str)==0:
+             log.warn('This version of stdeb requires debhelper >= %s, but you '
+@@ -1187,18 +1179,18 @@ def build_dsc(debinfo,
+                          'compatible with older versions of debhelper.'%(
+                     DH_MIN_VERS,))
+ 
+-        pysupport_version_str = get_version_str('python-support')
+-        if len(pysupport_version_str)==0:
+-            log.warn('This version of stdeb requires python-support >= %s, '
+-                     'but you do not have python-support installed. '
+-                     'Could not check compatibility.'%PYSUPPORT_MIN_VERS)
++        python_defaults_version_str = get_version_str('python-all')
++        if len(python_defaults_version_str)==0:
++            log.warn('This version of stdeb requires python-all >= %s, '
++                     'but you do not have this package installed. '
++                     'Could not check compatibility.'%PYTHON_ALL_MIN_VERS)
+         else:
+             if not dpkg_compare_versions(
+-                pysupport_version_str, 'ge', PYSUPPORT_MIN_VERS ):
+-                log.warn('This version of stdeb requires python-support >= %s. '
+-                         'Use stdeb 0.3.x to generate source packages '
+-                         'compatible with older versions of python-support.'%(
+-                    PYSUPPORT_MIN_VERS,))
++                python_defaults_version_str, 'ge', PYTHON_ALL_MIN_VERS):
++                log.warn('This version of stdeb requires python-all >= %s. '
++                         'Use stdeb 0.6.0 or older to generate source packages '
++                         'that use python-support.'%(
++                    PYTHON_ALL_MIN_VERS,))
+ 
+     #    D. restore debianized tree
+     os.rename(fullpath_repackaged_dirname+'.debianized',
+@@ -1245,7 +1237,6 @@ RULES_MAIN = """\
+ 
+ # This file was automatically generated by stdeb %(stdeb_version)s at
+ # %(date822)s
+-
+ %(exports)s
+ 
+ %(percent_symbol)s:
+-- 
+1.7.2.3
+

Added: packages/stdeb/trunk/debian/patches/0006-change-default-source-package-format-to-3.0-quilt.patch
===================================================================
--- packages/stdeb/trunk/debian/patches/0006-change-default-source-package-format-to-3.0-quilt.patch	                        (rev 0)
+++ packages/stdeb/trunk/debian/patches/0006-change-default-source-package-format-to-3.0-quilt.patch	2010-11-28 23:06:07 UTC (rev 14964)
@@ -0,0 +1,55 @@
+From 534bef7e9cedc347fcb5209fbf3f7b720a466cd0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr at gdebian.org>
+Date: Sat, 27 Nov 2010 22:10:43 +0100
+Subject: [PATCH 6/7] change default source package format to 3.0 (quilt)
+
+---
+ stdeb/command/sdist_dsc.py |    3 ++-
+ stdeb/util.py              |    6 ++----
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/stdeb/command/sdist_dsc.py b/stdeb/command/sdist_dsc.py
+index 852092b..7e86e99 100644
+--- a/stdeb/command/sdist_dsc.py
++++ b/stdeb/command/sdist_dsc.py
+@@ -76,7 +76,8 @@ class sdist_dsc(common_debian_package_command):
+             expand_sdist_file(self.use_premade_distfile,cwd=expand_dir)
+ 
+             is_tgz=False
+-            if self.use_premade_distfile.lower().endswith('.tar.gz'):
++            fext = '.'.join(self.use_premade_distfile.rsplit('.', 2)[-2:])
++            if fext.lower() in ('tar.gz', 'tar.bz2', 'tar.xz'):
+                 is_tgz=True
+ 
+             # now the sdist package is expanded in expand_dir
+diff --git a/stdeb/util.py b/stdeb/util.py
+index e036f8b..8bdb7a5 100644
+--- a/stdeb/util.py
++++ b/stdeb/util.py
+@@ -1126,7 +1126,7 @@ def build_dsc(debinfo,
+     #    J. debian/source/format
+     os.mkdir(os.path.join(debian_dir,'source'))
+     fd = open( os.path.join(debian_dir,'source','format'), mode='w')
+-    fd.write('1.0\n')
++    fd.write('3.0 (quilt)\n')
+     fd.close()
+ 
+     if debian_dir_only:
+@@ -1199,13 +1199,11 @@ def build_dsc(debinfo,
+     #    Re-generate tarball using best practices see
+     #    http://www.debian.org/doc/developers-reference/ch-best-pkging-practices.en.html
+     #    call "dpkg-source -b new_dirname orig_dirname"
+-    log.info('CALLING dpkg-source -b %s %s (in dir %s)'%(
++    log.info('CALLING dpkg-source -b %s (in dir %s)'%(
+         repackaged_dirname,
+-        repackaged_orig_tarball,
+         dist_dir))
+ 
+     dpkg_source('-b',repackaged_dirname,
+-                repackaged_orig_tarball,
+                 cwd=dist_dir)
+ 
+     if 1:
+-- 
+1.7.2.3
+

Added: packages/stdeb/trunk/debian/patches/0007-adjust-debian-control-template-to-latest-changes-in-policy.patch
===================================================================
--- packages/stdeb/trunk/debian/patches/0007-adjust-debian-control-template-to-latest-changes-in-policy.patch	                        (rev 0)
+++ packages/stdeb/trunk/debian/patches/0007-adjust-debian-control-template-to-latest-changes-in-policy.patch	2010-11-28 23:06:07 UTC (rev 14964)
@@ -0,0 +1,69 @@
+From 6920b4a06f7c6b5975114ff8368eef78c7ed5c84 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= <piotr at gdebian.org>
+Date: Sun, 28 Nov 2010 23:44:39 +0100
+Subject: [PATCH 7/7] adjust debian/control template to latest changes in policy
+
+---
+ stdeb/util.py |   16 ++++++++--------
+ 1 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/stdeb/util.py b/stdeb/util.py
+index 8bdb7a5..b447a93 100644
+--- a/stdeb/util.py
++++ b/stdeb/util.py
+@@ -826,11 +826,8 @@ class DebianInfo:
+         xs_python_version = parse_vals(cfg,module_name,'XS-Python-Version')
+ 
+         if len(xs_python_version)!=0:
+-            self.source_stanza_extras += ('XS-Python-Version: '+
++            self.source_stanza_extras += ('X-Python-Version: '+
+                                           ', '.join(xs_python_version)+'\n')
+-        self.package_stanza_extras = """\
+-XB-Python-Version: ${python:Versions}
+-"""
+ 
+         dpkg_shlibdeps_params = parse_val(
+             cfg,module_name,'dpkg-shlibdeps-params')
+@@ -885,12 +882,15 @@ XB-Python-Version: ${python:Versions}
+             provides = list(set(provides))
+             replaces = list(set(replaces))
+ 
++        self.package_stanza_extras = ''
++
+         if len(conflicts):
+             self.package_stanza_extras += ('Conflicts: '+
+                                               ', '.join( conflicts )+'\n')
+ 
+-        provides.insert(0, 'Provides: ${python:Provides}')
+-        self.package_stanza_extras += ', '.join( provides  )+'\n'
++        if len(provides):
++            self.package_stanza_extras += ('Provides: '+
++                                             ', '.join( provides  )+'\n')
+ 
+         if len(replaces):
+             self.package_stanza_extras += ('Replaces: ' +
+@@ -1221,11 +1221,12 @@ Maintainer: %(maintainer)s
+ %(uploaders)sSection: %(debian_section)s
+ Priority: optional
+ Build-Depends: %(build_depends)s
+-Standards-Version: 3.8.4
++Standards-Version: 3.9.1
+ %(source_stanza_extras)s
+ Package: %(package)s
+ Architecture: %(architecture)s
+ Depends: %(depends)s
++Breaks: ${python:Breaks}
+ %(package_stanza_extras)sDescription: %(description)s
+ %(long_description)s
+ """
+@@ -1236,7 +1237,6 @@ RULES_MAIN = """\
+ # This file was automatically generated by stdeb %(stdeb_version)s at
+ # %(date822)s
+ %(exports)s
+-
+ %(percent_symbol)s:
+         dh $@ %(sequencer_options)s
+ 
+-- 
+1.7.2.3
+

Added: packages/stdeb/trunk/debian/patches/series
===================================================================
--- packages/stdeb/trunk/debian/patches/series	                        (rev 0)
+++ packages/stdeb/trunk/debian/patches/series	2010-11-28 23:06:07 UTC (rev 14964)
@@ -0,0 +1,7 @@
+0001-remove-pycentral-options.patch
+0002-pass-buildsystem-to-the-sequencer-rather-than-to-DH_OPTIONS.patch
+0003-do-not-reset-environment-options-in-debian-rules.patch
+0004-replace-tabs-with-spaces.patch
+0005-use-dh_python2-instead-of-dh_pysupport.patch
+0006-change-default-source-package-format-to-3.0-quilt.patch
+0007-adjust-debian-control-template-to-latest-changes-in-policy.patch

Modified: packages/stdeb/trunk/debian/rules
===================================================================
--- packages/stdeb/trunk/debian/rules	2010-11-28 17:38:11 UTC (rev 14963)
+++ packages/stdeb/trunk/debian/rules	2010-11-28 23:06:07 UTC (rev 14964)
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 %:
-	dh $@
+	dh $@ --with python2
 
 PYPI_DESC = downloads Python package from PyPI, creates Debian package and then installs it
 DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')

Modified: packages/stdeb/trunk/debian/source/format
===================================================================
--- packages/stdeb/trunk/debian/source/format	2010-11-28 17:38:11 UTC (rev 14963)
+++ packages/stdeb/trunk/debian/source/format	2010-11-28 23:06:07 UTC (rev 14964)
@@ -1 +1 @@
-1.0
+3.0 (quilt)




More information about the Python-modules-commits mailing list