[Python-modules-commits] r8822 - in packages/python-peak.rules/trunk (10 files)

zack at users.alioth.debian.org zack at users.alioth.debian.org
Sat Jun 20 12:34:06 UTC 2009


    Date: Saturday, June 20, 2009 @ 12:34:01
  Author: zack
Revision: 8822

ship prioritized_methods as a contrib

Added:
  packages/python-peak.rules/trunk/debian/README.source
    (from rev 8762, packages/python-repoze.who-plugins/trunk/debian/README.source)
  packages/python-peak.rules/trunk/debian/get-orig-source.mk
  packages/python-peak.rules/trunk/debian/peak.rules.watch
  packages/python-peak.rules/trunk/debian/prioritized_methods.watch
  packages/python-peak.rules/trunk/setup.py
    (from rev 8762, packages/python-repoze.who-plugins/trunk/setup.py)
Modified:
  packages/python-peak.rules/trunk/debian/changelog
  packages/python-peak.rules/trunk/debian/control
  packages/python-peak.rules/trunk/debian/copyright
  packages/python-peak.rules/trunk/debian/rules
  packages/python-peak.rules/trunk/debian/watch

Copied: packages/python-peak.rules/trunk/debian/README.source (from rev 8762, packages/python-repoze.who-plugins/trunk/debian/README.source)
===================================================================
--- packages/python-peak.rules/trunk/debian/README.source	                        (rev 0)
+++ packages/python-peak.rules/trunk/debian/README.source	2009-06-20 12:34:01 UTC (rev 8822)
@@ -0,0 +1,55 @@
+
+Upgrade to a new upstream
+=========================
+
+This package is a multi-upstream source package, i.e., its
+.orig.tar.gz is composed by several upstream tarballs, possibly
+released by independent authors.
+
+To obtain a new orig tarball you can invoke the get-orig-source target
+of debian/rules as follows:
+
+   $ debian/rules get-orig-source
+
+If all goes well, that should leave aroung a tarball called
+
+   PACKAGE-YYYYMMDD.orig.tar.gz
+
+where PACKAGE is the source package name and YYYYMMDD is today's date
+in year/month/day format.
+
+Note that the target does not check whether creating a new upstream
+version is needed: invoke it only if you know that some of the
+upstream parts of this package need updates. Otherwise, use "apt-get
+source PACKAGE" to work on the latest uploaded upstream release.
+
+
+Package version
+===============
+
+Note that, while the package has multiple upstream tarballs,
+PEAK-Rules is considered the "main" tarball. This means, in
+particular, that the package version comes from it.
+
+
+Adding a new contrib
+====================
+
+As this is package ship contribs for PEAK.rules, it is natural to
+expect that in the future new contribs will be added. To add one to
+the package follow a few simple rules:
+
+1) add the module name (usually the egg name) to the $(UPSTREAMS)
+   Makefile variable in debian/rules
+
+2) add the per-contrib watch file as debian/NAME.watch, where NAME is
+   the module name
+
+3) add license and copyright information about the new module to
+   debian/copyright
+
+4) run "debian/rules get-orig-source" to recreate the new tarball
+
+
+ -- Stefano Zacchiroli <zack at debian.org>, Sat, 20 Jun 2009 13:00:52 +0200
+

Modified: packages/python-peak.rules/trunk/debian/changelog
===================================================================
--- packages/python-peak.rules/trunk/debian/changelog	2009-06-18 21:59:21 UTC (rev 8821)
+++ packages/python-peak.rules/trunk/debian/changelog	2009-06-20 12:34:01 UTC (rev 8822)
@@ -1,3 +1,18 @@
+python-peak.rules (0.5a1+r2582-2) UNRELEASED; urgency=low
+
+  * add support for shipping PEAK-Rules contribs
+  * ship as the sole contrib prioritized_methods
+  * add debian/get-orig-source.mk and setup.py to support the change to
+    multi-upstream source package
+  * add debian/README.source to describe how to rebuild new orig tarballs
+  * debian/copyright: add copyright info regarding prioritized_methods
+  * debian/control: updated long description to mention
+    prioritized_methods
+  * debian/prioritized_methods.watch: new watch file for
+    prioritized_methods
+
+ -- Stefano Zacchiroli <zack at debian.org>  Thu, 11 Jun 2009 09:20:35 +0200
+
 python-peak.rules (0.5a1+r2582-1) experimental; urgency=low
 
   * First release (Closes: #531871)

Modified: packages/python-peak.rules/trunk/debian/control
===================================================================
--- packages/python-peak.rules/trunk/debian/control	2009-06-18 21:59:21 UTC (rev 8821)
+++ packages/python-peak.rules/trunk/debian/control	2009-06-20 12:34:01 UTC (rev 8822)
@@ -24,6 +24,7 @@
  ${python:Depends},
  python-decoratortools,
  python-peak.util
+Provides: python-prioritized-methods
 Description: generic functions support for Python
  PEAK-Rules is a highly-extensible framework for creating and using
  generic functions in Python.
@@ -33,3 +34,8 @@
  strings containing Python expressions, and CLOS-like method
  combining.  Additionally, PEAK-Rules allows to mix and match dispatch
  engines and custom method combinations.
+ .
+ This package also provides some third party contribution over
+ PEAK-Rules, in particular:
+ .
+  * prioritized_methods - prioritize methods to resolve dispatch ambiguities

Modified: packages/python-peak.rules/trunk/debian/copyright
===================================================================
--- packages/python-peak.rules/trunk/debian/copyright	2009-06-18 21:59:21 UTC (rev 8821)
+++ packages/python-peak.rules/trunk/debian/copyright	2009-06-20 12:34:01 UTC (rev 8822)
@@ -1,18 +1,25 @@
 This package was debianized by Stefano Zacchiroli <zack at debian.org> on
 Wed, 10 Jun 2009 18:51:14 +0200.
 
-Files: *
-Copyright: Copyright © 2006-2009 Phillipp J .Eby <peak at eby-sarna.com>
+Files: PEAK-Rules*
+Copyright: © 2006-2009 Phillipp J .Eby <peak at eby-sarna.com>
 License: PSF or ZPL
  Dual-licensing under both the Python Software Foundation (PSF)
- license and the Zope Public License (ZPL).
+ license and the Zope Public License (ZPL). Both licenses are reported
+ below.
 
+Files: prioritized_methods*
+Copyright: © 2008 Alberto Valverde Gonzalez <alberto at toscat.net>
+License: MIT
+ MIT license is reported below.
+
 Files: debian/*
-Copyright: Copyright © 2009 Stefano Zacchiroli <zack at debian.org>
+Copyright: © 2009 Stefano Zacchiroli <zack at debian.org>
 License: GPL-3+
  On Debian systems the full text of the GNU General Public License can
  be found in the `/usr/share/common-licenses/GPL-3' file.
 
+
 License: PSF
  PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
  --------------------------------------------
@@ -261,4 +268,23 @@
  many individuals on behalf of Zope Corporation.  Specific
  attributions are listed in the accompanying credits file.
 
-
+License: MIT
+ 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.

Added: packages/python-peak.rules/trunk/debian/get-orig-source.mk
===================================================================
--- packages/python-peak.rules/trunk/debian/get-orig-source.mk	                        (rev 0)
+++ packages/python-peak.rules/trunk/debian/get-orig-source.mk	2009-06-20 12:34:01 UTC (rev 8822)
@@ -0,0 +1,40 @@
+# debian/rules snippet for creating multi-upstream tarball relying on
+# several debian/*.watch files
+
+# XXX: adapted to use as version number those returned by the "main"
+# debian/watch
+
+# Copyright © 2009 Stefano Zacchiroli <zack at debian.org>
+# License: GNU GPL version 3 or above
+# Created: Sat, 30 May 2009 11:58:16 +0200
+# Last-Modified: Sat, 20 Jun 2009 12:59:10 +0200
+
+# TODO: does not yet fully implement policy wrt get-orig-source:
+#       - the target cannot be invoked from any dir (rely on "debian/")
+#       - tmpdir handling is not fully safe (e.g., no "mktemp -d")
+
+GOSTMP = get-orig-source.tmp
+ORIGVERSION := $(shell uscan --report --dehs | grep '<upstream-version>' | sed 's/<[^>]\+>//g')
+ORIGNAME = $(PKG)-$(ORIGVERSION)
+ORIGTARBALL = $(PKG)_$(ORIGVERSION).orig.tar.gz
+
+get-orig-source: $(patsubst %,%/get-orig-source,$(UPSTREAMS))
+	cd $(GOSTMP) && \
+	mkdir $(ORIGNAME) && \
+	for p in $(UPSTREAMS) ; do \
+		mv `readlink $$p` $(ORIGNAME) ; \
+		mv $$p $(ORIGNAME) ; \
+	done && \
+	tar cvzf $(ORIGTARBALL) $(ORIGNAME) && \
+	mv $(ORIGTARBALL) ../ && \
+	cd .. && \
+	rm -rf $(GOSTMP)/
+$(GOSTMP):
+	-mkdir $@
+%/get-orig-source: $(GOSTMP)
+	uscan --watchfile debian/$*.watch \
+		--upstream-version 0 --package $* \
+		--download --destdir $(GOSTMP)/
+	cd $(GOSTMP) && \
+	tar xzf $**.orig.tar.gz && \
+	ln -s `tar tzf $**.orig.tar.gz | head -n1` $*

Added: packages/python-peak.rules/trunk/debian/peak.rules.watch
===================================================================
--- packages/python-peak.rules/trunk/debian/peak.rules.watch	                        (rev 0)
+++ packages/python-peak.rules/trunk/debian/peak.rules.watch	2009-06-20 12:34:01 UTC (rev 8822)
@@ -0,0 +1,5 @@
+# this file comes with two copies: debian/watch and debian/peak.rules.watch
+# will go away with symlink support in dpkg-* soon; in the meantime update both
+version=3
+opts="uversionmangle=s/\.dev-(r\d+)/+$1/" \
+http://peak.telecommunity.com/snapshots/PEAK-Rules-([0-9a-z.-]+)\.tar\.gz

Added: packages/python-peak.rules/trunk/debian/prioritized_methods.watch
===================================================================
--- packages/python-peak.rules/trunk/debian/prioritized_methods.watch	                        (rev 0)
+++ packages/python-peak.rules/trunk/debian/prioritized_methods.watch	2009-06-20 12:34:01 UTC (rev 8822)
@@ -0,0 +1,2 @@
+version=3
+http://pypi.python.org/packages/source/p/prioritized_methods/prioritized_methods-([0-9a-z.-]+)\.tar\.gz

Modified: packages/python-peak.rules/trunk/debian/rules
===================================================================
--- packages/python-peak.rules/trunk/debian/rules	2009-06-18 21:59:21 UTC (rev 8821)
+++ packages/python-peak.rules/trunk/debian/rules	2009-06-20 12:34:01 UTC (rev 8822)
@@ -4,8 +4,16 @@
 include /usr/share/cdbs/1/class/python-distutils.mk
 
 PKG = python-peak.rules
+UPSTREAMS = \
+	peak.rules \
+	prioritized_methods \
+	$(NULL)
+export SUBDIRS = $(UPSTREAMS)
+
 DEB_PYTHON_INSTALL_ARGS_ALL += --single-version-externally-managed
 
 # avoid installing useless *.pth files
 install/$(PKG)::
 	rm -f debian/$(PKG)/usr/lib/python*/site-packages/*.pth
+
+-include debian/get-orig-source.mk

Modified: packages/python-peak.rules/trunk/debian/watch
===================================================================
--- packages/python-peak.rules/trunk/debian/watch	2009-06-18 21:59:21 UTC (rev 8821)
+++ packages/python-peak.rules/trunk/debian/watch	2009-06-20 12:34:01 UTC (rev 8822)
@@ -1,3 +1,5 @@
+# this file comes with two copies: debian/watch and debian/peak.rules.watch
+# will go away with symlink support in dpkg-* soon; in the meantime update both
 version=3
 opts="uversionmangle=s/\.dev-(r\d+)/+$1/" \
 http://peak.telecommunity.com/snapshots/PEAK-Rules-([0-9a-z.-]+)\.tar\.gz

Copied: packages/python-peak.rules/trunk/setup.py (from rev 8762, packages/python-repoze.who-plugins/trunk/setup.py)
===================================================================
--- packages/python-peak.rules/trunk/setup.py	                        (rev 0)
+++ packages/python-peak.rules/trunk/setup.py	2009-06-20 12:34:01 UTC (rev 8822)
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+# Multiplexer for invoking multiple setup.py in subdir
+# Copyright (C) 2009 Stefano Zacchiroli <zack at debian.org>
+# License: GNU GPL version 3 or above
+
+# Created: Sat, 30 May 2009 14:47:04 +0200
+# Last-Modified: Sat, 30 May 2009 14:47:04 +0200
+
+import os, string, sys
+
+if not os.environ.has_key('SUBDIRS') or not os.environ['SUBDIRS']:
+    print >> sys.stderr, "Can't find subdirs, please set SUBDIRS envvar"
+    sys.exit(3)
+else:
+    subdirs = os.environ['SUBDIRS'].split()
+setup_cmd = "python setup.py %s" % string.join(sys.argv[1:])
+
+topdir = os.getcwd()
+for d in subdirs:
+    if not os.path.isdir(d):
+        print >> sys.stderr, "WARNING: can't find subdir %s" % d
+        continue
+    os.chdir(d)
+    retcode = os.system(setup_cmd)
+    if retcode:
+        print >> sys.stderr, "ERROR: setup.py in subdir %s failed" % d
+        sys.exit(retcode >> 8)
+    os.chdir(topdir)




More information about the Python-modules-commits mailing list