debian/0000755000000000000000000000000012252370025007164 5ustar debian/docs0000644000000000000000000000001311322413450010026 0ustar README.rst debian/copyright0000644000000000000000000000262311474560137011134 0ustar This package was debianized by Piotr Ożarowski on Fri, 09 Oct 2009 21:01:00 +0200. It was downloaded from http://pypi.python.org/packages/source/s/stdeb/ Author: Andrew Straw License: Copyright (c) 2006-2008 stdeb authors. 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. The Debian packaging is © 2009-2010, Piotr Ożarowski and is licensed under the same license debian/control0000644000000000000000000000251712251721506010577 0ustar Source: stdeb Section: python Priority: optional Maintainer: Andrew Straw Uploaders: Piotr Ożarowski , Debian Python Modules Team Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3) Build-Depends-Indep: python-setuptools, help2man Standards-Version: 3.9.5 Homepage: http://github.com/astraw/stdeb XS-Python-Version: all Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/stdeb/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/stdeb/trunk/ Package: python-stdeb Architecture: all Depends: ${misc:Depends}, ${python:Depends}, debhelper (>= 7), python-setuptools 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 provided for the Debian package, but many aspects of the resulting package can be customized via a configuration file. . * pypi-install will query the Python Package Index (PyPI) for a package, download it, create a .deb from it, and then install the .deb. * py2dsc will convert a distutils-built source tarball into a Debian source package. debian/source/0000755000000000000000000000000012252370025010464 5ustar debian/source/format0000644000000000000000000000001411474560137011704 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000211263707635010376 0ustar 7 debian/rules0000755000000000000000000000121511474560137010255 0ustar #!/usr/bin/make -f %: 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') help2man = PYTHONPATH=${CURDIR} help2man -N --version-string=${DEB_UPSTREAM_VERSION} \ -o $1 -n '$2' $(CURDIR)/debian/python-stdeb/usr/bin/$(subst .1,,$1) py2dsc.1: $(call help2man,$@,creates Debian source package from Python package) pypi-install.1: $(call help2man,$@,${PYPI_DESC}) override_dh_installman: py2dsc.1 pypi-install.1 dh_installman py2dsc.1 pypi-install.1 clean: rm -f py2dsc.1 pypi-install.1 dh $@ debian/watch0000644000000000000000000000013411263707635010227 0ustar version=3 http://pypi.python.org/packages/source/s/stdeb/stdeb-(.*)\.tar\.gz debian uupdate debian/changelog0000644000000000000000000000576212252370000011041 0ustar stdeb (0.6.0+20100620-4) unstable; urgency=low * Team upload. [ Jakub Wilk ] * Use canonical URIs for Vcs-* fields. [ Luke Faraone ] * Ignore .egg-info files when building debian packages. Thanks to Arnaud Fontaine and Diane Trout for the fix. (closes: #657611, LP: #1098366) * Standards-Version bumped to 3.9.5 (no changes needed) -- Luke Faraone Thu, 12 Dec 2013 12:18:55 -0500 stdeb (0.6.0+20100620-2) unstable; urgency=low * Do not add "Breaks: ${python:Breaks}" to generated debian/control anymore * Add replace_underscore_with_a_dash_in_package_names patch (binary package name for vim_bridge should be python-vim-bridge, not python-vimbridge) -- Piotr Ożarowski Sat, 07 May 2011 21:56:33 +0200 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 Sun, 28 Nov 2010 23:49:51 +0100 stdeb (0.6.0-1) unstable; urgency=low * New upstream release - do not die if sources.list does not contain deb-src lines (closes: #580376) - document need to call "apt-file update". Emit nicer error when user needs to call "apt-file update" (closes: #568122) - added {$misc:Depends} to generated depends (closes: #568692) * Add debhelper to Depends * Set Andrew Straw as Maintainer, move myself to Uploaders * Standards-Version bumped to 3.8.4 (no changes needed) -- Piotr Ożarowski Sat, 19 Jun 2010 10:30:33 +0200 stdeb (0.5.1-1) unstable; urgency=low * New upstream release * Package's long description updated, now mentions pypi-install (closes: #564562) * Add README.rst to docs * Add apt-file and dpkg-dev to Recommends -- Piotr Ożarowski Sun, 10 Jan 2010 12:45:52 +0100 stdeb (0.5.0-1) unstable; urgency=low * New upstream release - new command line tool: pypi-install - stdeb_run_setup no longer available -- Piotr Ożarowski Thu, 31 Dec 2009 20:29:48 +0100 stdeb (0.4.2-1) unstable; urgency=low * New upstream release * quilt removed from build dependencies (both patches applied upstream) -- Piotr Ożarowski Mon, 02 Nov 2009 23:12:10 +0100 stdeb (0.4.1-1) unstable; urgency=low * Initial release (closes: #550353) -- Piotr Ożarowski Sun, 11 Oct 2009 18:13:02 +0200 debian/patches/0000755000000000000000000000000012252370025010613 5ustar debian/patches/0004-replace-tabs-with-spaces.patch0000644000000000000000000000234611474560137017023 0ustar From 9e0f58b839d1b6f11e44d691f8a4e6df3f309c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= 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 debian/patches/0006-change-default-source-package-format-to-3.0-quilt.patch0000644000000000000000000000374011474560137023333 0ustar From 534bef7e9cedc347fcb5209fbf3f7b720a466cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= 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 debian/patches/series0000644000000000000000000000074612251721506012042 0ustar 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 replace_underscore_with_a_dash_in_package_names.patch 0008-ignore-egg-info-debian-sorce-options.patch debian/patches/0005-use-dh_python2-instead-of-dh_pysupport.patch0000644000000000000000000001516711474560137021677 0ustar From e00841cdc04c0d74cb45e8b6d8b009f761fa354c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= 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 debian/patches/0003-do-not-reset-environment-options-in-debian-rules.patch0000644000000000000000000000162211474560137023556 0ustar From 549b1726c42a214b1ba9b9569265328d094e64a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= 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 debian/patches/0008-ignore-egg-info-debian-sorce-options.patch0000644000000000000000000000234512251721506021226 0ustar Description: Ignore .egg-info files when building debian packages. Previously, users reported py2dsc was dying because it was trying to generate a diff that was including the .egg-info directory setup.py was creating. . A reasonably safe solution to this problem is to ignore the .egg-info paths by adding an entry in debian/source/options. Author: Diane Trout --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: other, http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;bug=657611 Bug-Debian: http://bugs.debian.org/657611 Bug-Ubuntu: https://launchpad.net/bugs/1098366 Forwarded: https://github.com/astraw/stdeb/pull/57 Reviewed-By: Luke Faraone Last-Update: 2013-12-10 --- stdeb-0.6.0+20100620.orig/stdeb/util.py +++ stdeb-0.6.0+20100620/stdeb/util.py @@ -1129,6 +1129,10 @@ def build_dsc(debinfo, fd.write('3.0 (quilt)\n') fd.close() + fd = open( os.path.join(debian_dir,'source','options'), mode='w') + fd.write('extend-diff-ignore="\.egg-info"') + fd.close() + if debian_dir_only: return debian/patches/0002-pass-buildsystem-to-the-sequencer-rather-than-to-DH_OPTIONS.patch0000644000000000000000000000333311474560137025264 0ustar From 4e1b9ae994d7d237dcc09f59eb0c5adf8ff58b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= 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 debian/patches/0001-remove-pycentral-options.patch0000644000000000000000000002126311474560137017215 0ustar From 57662e9870324576e83880d52ecb9f50b5470953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= 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/.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/.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 debian/patches/0007-adjust-debian-control-template-to-latest-changes-in-policy.patch0000644000000000000000000000437611561323575025466 0ustar From 6920b4a06f7c6b5975114ff8368eef78c7ed5c84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20O=C5=BCarowski?= 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(-) Index: stdeb-0.6.0+20100620/stdeb/util.py =================================================================== --- stdeb-0.6.0+20100620.orig/stdeb/util.py +++ stdeb-0.6.0+20100620/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,7 +1221,7 @@ 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 @@ -1236,7 +1236,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 debian/patches/replace_underscore_with_a_dash_in_package_names.patch0000644000000000000000000000125711561323575023375 0ustar Index: stdeb-0.6.0+20100620/stdeb/util.py =================================================================== --- stdeb-0.6.0+20100620.orig/stdeb/util.py +++ stdeb-0.6.0+20100620/stdeb/util.py @@ -166,13 +166,13 @@ def recursive_hardlink(src,dst): def debianize_name(name): "make name acceptable as a Debian (binary) package name" - name = name.replace('_','') + name = name.replace('_','-') name = name.lower() return name def source_debianize_name(name): "make name acceptable as a Debian source package name" - name = name.replace('_','') + name = name.replace('_','-') name = name.replace('.','-') name = name.lower() return name