debian/0000755000000000000000000000000011656235650007177 5ustar debian/python-van.pydeb.install0000644000000000000000000000023311650201023013747 0ustar debian/rules_templates/*.mk usr/share/python-van.pydeb/rules_templates debian/pydeb.pm usr/share/perl5/Debian/Debhelper/Sequence debian/dh_pydeb usr/bin debian/python-van.pydeb.pyinstall0000644000000000000000000000002411651657337014346 0ustar van/__init__.py van debian/control0000644000000000000000000000200511651657337010604 0ustar Source: van.pydeb Section: python Priority: extra Maintainer: Debian/Ubuntu Zope Team Uploaders: Brian Sutherland , Fabio Tranchitella Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), python-setuptools Standards-Version: 3.9.2 X-Python-Version: >= 2.4 Homepage: http://pypi.python.org/pypi/van.pydeb Vcs-Svn: svn://svn.debian.org/pkg-zope/van.pydeb/trunk Vcs-Browser: http://svn.debian.org/viewsvn/pkg-zope/van.pydeb/trunk/ Package: python-van.pydeb Architecture: all Depends: python-setuptools, ${python:Depends}, ${misc:Depends}, ${perl:Depends} Provides: python-van Conflicts: python-van Replaces: python-van 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. debian/source/0000755000000000000000000000000011656235650010477 5ustar debian/source/format0000644000000000000000000000001411650201023011662 0ustar 3.0 (quilt) debian/source/options0000644000000000000000000000004211656234171012106 0ustar extend-diff-ignore = "\.egg-info" debian/watch0000644000000000000000000000012411650201023010202 0ustar version=3 http://pypi.python.org/packages/source/v/van.pydeb/van.pydeb-(.*)\.tar.gz debian/compat0000644000000000000000000000000211651657337010402 0ustar 7 debian/copyright0000644000000000000000000000453711650201023011120 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174 Upstream-Name: van.pydeb Upstream-Contact: Brian Sutherland Source: http://pypi.python.org/pypi/van.pydeb Files: * Copyright: (C) 2009 Brian Sutherland License: Zope-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. debian/pydeb.pm0000644000000000000000000000017211650201023010615 0ustar #!/usr/bin/perl use warnings; use strict; use Debian::Debhelper::Dh_Lib; insert_after("dh_auto_install", "dh_pydeb"); 1 debian/changelog0000644000000000000000000001004611656234171011047 0ustar van.pydeb (1.3.3-1) unstable; urgency=low * Team upload. * New upstream release. * Switch to "3.0 (quilt)" source format. * rules_templates/rules.1.mk, debian/dh_pydeb: do not guess py_package, use setup.py --name * debian/copyright: convert to dep5 format. * debian/rules: rewrite to use dh. Fixes van-pydeb script to use default python (LP: #881041) * debian/python-van.pydeb.pyinstall: add to install van/__init__.py * debian/source/options: ignore .egg-info directory. -- Gediminas Paulauskas Tue, 08 Nov 2011 16:05:47 +0200 van.pydeb (1.3.2-1) unstable; urgency=low [ Gediminas Paulauskas ] * New upstream release. * Do not add provides for metapackages, because it contains only itself. [ Matthias Klose ] * Build using dh_python2 instead of dh_pycentral. (Closes: #617139) [ Brian Sutherland ] * require python-setuptools, our command line scripts don't work without it. [ Arnaud Fontaine ] * debian/control: + Add Vcs-Browser and rename XS-Vcs-Svn to Vcs-Svn (now supported by dpkg). + Bump Standards-Version to 3.9.2. No changes needed. + Build-Depends on python-all rather than python-all-dev as there is no extension to build. + Remove deprecated XB-Python-Version. + Rename deprecated XS-Python-Version to X-Python-Version and specify the minimum Python version supported as "all" is deprecated. + Add Homepage field. -- Arnaud Fontaine Sun, 01 May 2011 17:06:31 +0900 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 * Accommodate 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 rules 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 -- Brian Sutherland Tue, 26 May 2009 19:33:09 +0000 van.pydeb (1.0.0-1) unstable; urgency=low * Initial Upload -- Brian Sutherland Tue, 26 May 2009 13:40:44 +0000 debian/rules_templates/0000755000000000000000000000000011656235650012407 5ustar debian/rules_templates/rules.1.mk0000644000000000000000000000445111650201023014212 0ustar # 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 python setup.py --name) endif ifeq ($(origin package), undefined) package=$(shell van-pydeb py_to_bin $(py_package)) endif include /usr/share/python/python.mk 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_prep 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_python2 --no-guessing-deps 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 debian/dh_pydeb0000644000000000000000000000761311650201023010664 0ustar #!/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:=`grep -m1 '^Source: ' debian/control | sed 's/Source: //'`} echo pydeb: Working on python distribution ${PYDEB_PY_PACKAGE:=`python setup.py --name`} echo pydeb: Working on binary package ${PYDEB_BIN_PACKAGE:=`van-pydeb py_to_bin $PYDEB_PY_PACKAGE`} # Sanity checks if [ `grep -c "^Package: ${PYDEB_BIN_PACKAGE}$" debian/control` == 0 ]; then echo ERROR: Expected binary package ${PYDEB_BIN_PACKAGE} in debian/control 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 recommends_extras="--extra ${extra} ${recommends_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 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 recommends, include them if [ -n "${recommends_extras}" ]; then (echo -n 'pydeb:Recommends=' && van-pydeb depends --egg-info ${egg_info} ${recommends_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 of metapackages for extra in $PYDEB_METAPACKAGE_EXTRAS; do (echo -n 'pydeb:Depends=' && van-pydeb depends --egg-info ${egg_info} --extra ${extra}) >> debian/${PYDEB_BIN_PACKAGE}-${extra}.substvars done done debian/rules0000755000000000000000000000014211651657337010261 0ustar #!/usr/bin/make -f %: dh --with python2 $@ override_dh_python2: dh_python2 --no-guessing-deps