--- van.pydeb-1.3.1.orig/debian/rules +++ van.pydeb-1.3.1/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# van-pydeb may not be available yet, so we do what it would otherwise do + +py_package=van.pydeb +package=python-van.pydeb + +include debian/rules_templates/rules.1.mk + +dependencies-python%: + # we do our own dependency management + echo + +post-install-python%: + install -D -m 644 van/__init__.py \ + debian/$(package)$(call py_libdir,$*)/van/__init__.py --- van.pydeb-1.3.1.orig/debian/dh_pydeb +++ van.pydeb-1.3.1/debian/dh_pydeb @@ -0,0 +1,81 @@ +#!/bin/bash + +set -e + +# XXX: This should be written in perl, but the original author only knows python well. Volunteers? + +# Figure out what packages to operate on +echo pydeb: Working on source package ${PYDEB_SRC_PACKAGE:=`dpkg-parsechangelog -c1 -ldebian/changelog | grep 'Source: ' | sed 's/Source: //'`} +echo pydeb: Working on python distribution ${PYDEB_PY_PACKAGE:=`van-pydeb src_to_py $PYDEB_SRC_PACKAGE`} +echo pydeb: Working on binary package ${PYDEB_BIN_PACKAGE:=`van-pydeb py_to_bin $PYDEB_PY_PACKAGE`} + +# Sanity checks +if [ `cat debian/control | grep -c "^Package: ${PYDEB_BIN_PACKAGE}$"` == 0 ]; then + echo ERROR: Expected binary package ${PYDEB_BIN_PACKAGE} in debian/changelog but did not find it. + exit 1 +fi + +# Parse environment variables that affect us +# Extras totally excluded: PYDEB_EXCLUDED_EXTRAS +for extra in $PYDEB_EXCLUDED_EXTRAS; do + excluded_extras="--exclude-extra ${extra} ${excluded_extras}" +done + +# Extras to be made into metapackages: PYDEB_METAPACKAGE_EXTRAS +for extra in $PYDEB_METAPACKAGE_EXTRAS; do + # Don't put dependencies of metapackages on the main package + excluded_extras="--exclude-extra ${extra} ${excluded_extras}" +done + +# Extras to be assigned to Recommends: PYDEB_RECOMMENDS_EXTRAS +for extra in $PYDEB_RECOMMENDS_EXTRAS; do + recomends_extras="--extra ${extra} ${recomends_extras}" + # exclude recommends dependencies from the main package dependencies + excluded_extras="--exclude-extra ${extra} ${excluded_extras}" +done + +# Extras to be assigned to Suggests: PYDEB_SUGGESTS_EXTRAS +for extra in $PYDEB_SUGGESTS_EXTRAS; do + suggests_extras="--extra ${extra} ${suggests_extras}" + # exclude recommends dependencies from the main package dependencies + excluded_extras="--exclude-extra ${extra} ${excluded_extras}" +done + +# TODO: We need a a way to assign multiple extras to a arbitrarily named metapackage. But a good format for the environment variable to do this escapes me. +# something like: +# mymetapackage1: extra1 extra2 mymetapackage2: extra3 extra4 +# mymetapackage1 (extra1 extra2) mymetapackage2 (extra3 extra4) +# or using one metapackage per line: +# mymetapackage1: extra1 extra2 +# mymetapackage2: extra3 extra4 +# Not sure... + +# Now for the real work +# XXX - do we really have to run this multiple times? can dependencies ever differ for different python versions? +# Yes, they can. setup.py is a program and can generate any dependencies depending on the python used to run it. +# We should make sure we depend on all them, if there's a case that doesn't work like that, probably best would be to manage dependencies by hand +# rather than modify dh_pydeb +for pyvers in `pyversions -vr debian/control`; do + py_libdir=$(python${pyvers} -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())') + egg_info=debian/*${py_libdir}/${PYDEB_PY_PACKAGE}*.egg-info + if [ ! -x ${egg_info} ]; then + echo ERROR: could not find package metadata file to work on that matches the pattern ${egg_info}. + fi + # set dependencies of main package + (echo -n 'pydeb:Depends=' && van-pydeb depends --egg-info ${egg_info} ${excluded_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars + # set provides for the extras included in the main package + (echo -n 'pydeb:Provides=' && van-pydeb provides --egg-info ${egg_info} ${excluded_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars + # if some extras were moved to recomends, include them + if [ -n "${recomends_extras}" ]; then + (echo -n 'pydeb:Recommends=' && van-pydeb depends --egg-info ${egg_info} ${recomends_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars + fi + # if some extras were moved to suggests, include them + if [ -n "${suggests_extras}" ]; then + (echo -n 'pydeb:Suggests=' && van-pydeb depends --egg-info ${egg_info} ${suggests_extras}) >> debian/${PYDEB_BIN_PACKAGE}.substvars + fi + # setup the dependencies/provides of dependencies moved to metapcakages + for extra in $PYDEB_METAPACKAGE_EXTRAS; do + (echo -n 'pydeb:Provides=' && van-pydeb provides --egg-info ${egg_info} --extra ${extra}) >> debian/${PYDEB_BIN_PACKAGE}-${extra}.substvars + (echo -n 'pydeb:Depends=' && van-pydeb depends --egg-info ${egg_info} --extra ${extra}) >> debian/${PYDEB_BIN_PACKAGE}-${extra}.substvars + done +done --- van.pydeb-1.3.1.orig/debian/control +++ van.pydeb-1.3.1/debian/control @@ -0,0 +1,22 @@ +Source: van.pydeb +Section: python +Priority: extra +Maintainer: Debian/Ubuntu Zope Team +Uploaders: Brian Sutherland , Fabio Tranchitella +Build-Depends: debhelper (>= 5.0.38), python-all-dev (>= 2.3.5-11), python-central (>= 0.5.6), python-setuptools (>= 0.6b3) +Standards-Version: 3.8.3 +XS-Python-Version: all +XS-Vcs-Svn: svn://svn.debian.org/pkg-zope/van.pydeb/trunk + +Package: python-van.pydeb +Architecture: all +Depends: python-pkg-resources, ${python:Depends} +Provides: python-van +Conflicts: python-van +Replaces: python-van +XB-Python-Version: ${python:Versions} +Description: introspection of Python metadata and conversion to Debian package metadata + Provides a Python API for accessing Python package metadata and trandslating + that to Debian packaging metadata. + . + A binary useful in building Debian packages is also provided. --- van.pydeb-1.3.1.orig/debian/copyright +++ van.pydeb-1.3.1/debian/copyright @@ -0,0 +1,66 @@ +Upstream download: + + http://pypi.python.org/pypi/van.pydeb + +Copyright: + + (C) 2009 Brian Sutherland + +License: + + ZPL 2.1 + +Zope Public License (ZPL) Version 2.1 +------------------------------------- + +A copyright notice accompanies this license document that +identifies the copyright holders. + +This license has been certified as open source. It has also +been designated as GPL compatible by the Free Software +Foundation (FSF). + +Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the +following conditions are met: + +1. Redistributions in source code must retain the + accompanying copyright notice, this list of conditions, + and the following disclaimer. + +2. Redistributions in binary form must reproduce the accompanying + copyright notice, this list of conditions, and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +3. Names of the copyright holders must not be used to + endorse or promote products derived from this software + without prior written permission from the copyright + holders. + +4. The right to distribute this software or to use it for + any purpose does not give you the right to use + Servicemarks (sm) or Trademarks (tm) of the copyright + holders. Use of them is covered by separate agreement + with the copyright holders. + +5. If any files are modified, you must cause the modified + files to carry prominent notices stating that you changed + the files and the date of any change. + +Disclaimer + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' + AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + NO EVENT SHALL THE COPYRIGHT HOLDERS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. --- van.pydeb-1.3.1.orig/debian/python-van.pydeb.install +++ van.pydeb-1.3.1/debian/python-van.pydeb.install @@ -0,0 +1,3 @@ +debian/rules_templates usr/share/python-van.pydeb +debian/pydeb.pm usr/share/perl5/Debian/Debhelper/Sequence +debian/dh_pydeb usr/bin --- van.pydeb-1.3.1.orig/debian/pydeb.pm +++ van.pydeb-1.3.1/debian/pydeb.pm @@ -0,0 +1,8 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Debian::Debhelper::Dh_Lib; + +insert_after("dh_auto_install", "dh_pydeb"); + +1 --- van.pydeb-1.3.1.orig/debian/compat +++ van.pydeb-1.3.1/debian/compat @@ -0,0 +1 @@ +5 --- van.pydeb-1.3.1.orig/debian/changelog +++ van.pydeb-1.3.1/debian/changelog @@ -0,0 +1,78 @@ +van.pydeb (1.3.1-1) unstable; urgency=low + + * New upstream release. + + -- Fabio Tranchitella Wed, 27 Jan 2010 21:27:42 +0100 + +van.pydeb (1.3.0-4) unstable; urgency=low + + * debian/dh_pydeb: fixed a bug which prevented successful builds for source + packages building a single binary package. + + -- Fabio Tranchitella Tue, 22 Dec 2009 12:50:03 +0100 + +van.pydeb (1.3.0-3) unstable; urgency=low + + * Integrate with debhelper 7 providing a --with pydeb extension. Behaviour + by default is conservative depending on all dependencies of all extras. + Setuptools extras can be ignored, placed into metapackages or diverted to + the suggests or recommends fields using environment variables. + + -- Brian Sutherland Tue, 24 Nov 2009 18:03:21 +0100 + +van.pydeb (1.3.0-2) unstable; urgency=low + + * Accomodate differences in the .egg-info directory naming between + distribute and setuptools by also moving .egg-info files without + -py$*. (Closes: #552945) + + -- Brian Sutherland Thu, 29 Oct 2009 11:11:05 +0100 + +van.pydeb (1.3.0-1) unstable; urgency=low + + * New upstream release. + * Bumped Standard-Versions to 3.8.3: no changes needed. + + -- Fabio Tranchitella Mon, 07 Sep 2009 18:36:46 +0200 + +van.pydeb (1.2.1-1) unstable; urgency=low + + * New upstream release + + -- Brian Sutherland Sun, 14 Jun 2009 21:28:43 +0200 + +van.pydeb (1.2.0-3) unstable; urgency=low + + * Fix for bootstrap problem, we don't want to build depend on ourselves. + + -- Brian Sutherland Wed, 03 Jun 2009 19:14:23 +0200 + +van.pydeb (1.2.0-2) unstable; urgency=low + + * Add a default rules template to + /usr/share/python-van.pydeb/rules_templates/rules.1.mk This template can + be included in debian/rules for simple python packages making the rules file + a oneliner. Makefile targets post-install-python% and + dependencies-python% can be overridden for slightly more complex + situations. + * Use riles template to simplify our own rules file. + + -- Brian Sutherland Wed, 03 Jun 2009 09:02:06 +0200 + +van.pydeb (1.2.0-1) unstable; urgency=low + + * New upstream release + + -- Brian Sutherland Tue, 02 Jun 2009 11:38:58 +0200 + +van.pydeb (1.1.0-1) unstable; urgency=low + + * New upstream release + + -- Tue, 26 May 2009 19:33:09 +0000 + +van.pydeb (1.0.0-1) unstable; urgency=low + + * Intial Upload + + -- Tue, 26 May 2009 13:40:44 +0000 --- van.pydeb-1.3.1.orig/debian/watch +++ van.pydeb-1.3.1/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://pypi.python.org/packages/source/v/van.pydeb/van.pydeb-(.*)\.tar.gz --- van.pydeb-1.3.1.orig/debian/rules_templates/rules.1.mk +++ van.pydeb-1.3.1/debian/rules_templates/rules.1.mk @@ -0,0 +1,98 @@ +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# Values lifted from setup.py and control file +PYVERS=$(shell pyversions -vr debian/control) + +ifeq ($(origin py_package), undefined) + py_package=$(shell van-pydeb src_to_py `dpkg-parsechangelog -c1 -ldebian/changelog | grep 'Source: ' | sed 's/Source: //'`) +endif + +ifeq ($(origin package), undefined) + package=$(shell van-pydeb py_to_bin $(py_package)) +endif + +-include /usr/share/python/python.mk +ifeq (,$(py_sitename)) + py_sitename = site-packages + py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages + py_sitename_sh = $(py_sitename) + py_libdir_sh = $(py_libdir) +endif + +build: $(PYVERS:%=build-python%) + touch $@ +build-python%: + dh_testdir + python$* setup.py build + touch $@ + +.PHONY: clean +clean: + dh_testdir + dh_testroot + $(MAKE) -f debian/rules $(PYVERS:%=clean-python%) + rm -f build-python?.? + rm -rf build + rm -rf dist + find -iname '*.pyc' -exec rm -f {} \; + dh_clean + +clean-python%: + python$* setup.py clean + +.PHONY: install +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) -f debian/rules $(PYVERS:%=install-python%) + +install-python%: + python$* setup.py install --no-compile --single-version-externally-managed $(py_setup_install_args) --root=debian/$(package) --install-data=usr/lib/$(package) + mv debian/$(package)$(call py_libdir,$*)/$(py_package)-*.egg-info \ + debian/$(package)$(call py_libdir,$*)/$(py_package).egg-info + find debian/$(package)$(call py_libdir,$*) -name "$(py_package)-*-nspkg.pth" -exec \ + mv {} debian/$(package)$(call py_libdir,$*)/$(py_package)-nspkg.pth \; + $(MAKE) -f debian/rules dependencies-python$* + $(MAKE) -f debian/rules post-install-python$* + +post-install-python%: + echo + +dependencies-python%: + (echo -n 'setuptools:Depends=' && van-pydeb depends --egg-info debian/$(package)$(call py_libdir,$*)/$(py_package).egg-info) >> debian/$(package).substvars + (echo -n 'setuptools:Provides=' && van-pydeb provides --egg-info debian/$(package)$(call py_libdir,$*)/$(py_package).egg-info) >> debian/$(package).substvars + +.PHONY: binary-common +binary-common: + dh_testdir + dh_testroot + dh_install + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_pycentral + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: binary-indep +binary-indep: install + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +.PHONY: binary-arch +binary-arch: install + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +.PHONY: binary +binary: binary-indep binary-arch