[Python-modules-commits] r11681 - in packages/jinja2/trunk/debian (6 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Wed Feb 10 22:36:13 UTC 2010


    Date: Wednesday, February 10, 2010 @ 22:36:09
  Author: piotr
Revision: 11681

* New upstream release
* Hardcode __version__ at build time, no need to use pkg_resources
  (Closes: #548062)
* Standards-version bumped to 3.8.4 (no other changes needed)

Added:
  packages/jinja2/trunk/debian/patches/
  packages/jinja2/trunk/debian/patches/add_version_placeholder.patch
  packages/jinja2/trunk/debian/patches/series
Modified:
  packages/jinja2/trunk/debian/changelog
  packages/jinja2/trunk/debian/control
  packages/jinja2/trunk/debian/rules

Modified: packages/jinja2/trunk/debian/changelog
===================================================================
--- packages/jinja2/trunk/debian/changelog	2010-02-10 15:40:27 UTC (rev 11680)
+++ packages/jinja2/trunk/debian/changelog	2010-02-10 22:36:09 UTC (rev 11681)
@@ -1,3 +1,12 @@
+jinja2 (2.3-1) unstable; urgency=low
+
+  * New upstream release
+  * Hardcode __version__ at build time, no need to use pkg_resources
+    (Closes: #548062)
+  * Standards-version bumped to 3.8.4 (no other changes needed)
+
+ -- Piotr Ożarowski <piotr at debian.org>  Wed, 10 Feb 2010 22:06:28 +0100
+
 jinja2 (2.2.1-1) unstable; urgency=low
 
   * New upstream release

Modified: packages/jinja2/trunk/debian/control
===================================================================
--- packages/jinja2/trunk/debian/control	2010-02-10 15:40:27 UTC (rev 11680)
+++ packages/jinja2/trunk/debian/control	2010-02-10 22:36:09 UTC (rev 11681)
@@ -4,9 +4,9 @@
 Maintainer: Piotr Ożarowski <piotr at debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Build-Depends: debhelper (>= 5), python-support (>= 0.6.4),
- python-setuptools (>= 0.6b3-1~), python-all-dev (>= 2.3.5-11), python-all-dbg
+ python-setuptools (>= 0.6b3-1~), python-all-dev (>= 2.3.5-11), python-all-dbg, quilt
 Build-Depends-Indep: python-sphinx (>= 0.6), python-pygments
-Standards-Version: 3.8.3
+Standards-Version: 3.8.4
 Homepage: http://jinja.pocoo.org/2/
 XS-Python-Version: >= 2.4
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/jinja2/trunk
@@ -42,7 +42,7 @@
 Section: doc
 Architecture: all
 Priority: extra
-Depends: libjs-jquery
+Depends: libjs-jquery, ${misc:Depends}
 Recommends: python-jinja2
 Description: documentation for the Jinja2 Python library
  Jinja2 is a small but fast and easy to use stand-alone template engine
@@ -54,7 +54,7 @@
 Architecture: any
 Section: debug
 Priority: extra
-Depends: python-jinja2 (= ${binary:Version}), python-dbg, ${shlibs:Depends}
+Depends: python-jinja2 (= ${binary:Version}), python-dbg, ${shlibs:Depends}, ${misc:Depends}
 Provides: ${python:Provides}
 XB-Python-Version: ${python:Versions}
 Description: small but fast and easy to use stand-alone template engine

Added: packages/jinja2/trunk/debian/patches/add_version_placeholder.patch
===================================================================
--- packages/jinja2/trunk/debian/patches/add_version_placeholder.patch	                        (rev 0)
+++ packages/jinja2/trunk/debian/patches/add_version_placeholder.patch	2010-02-10 22:36:09 UTC (rev 11681)
@@ -0,0 +1,21 @@
+Index: jinja2-2.3/jinja2/__init__.py
+===================================================================
+--- jinja2-2.3.orig/jinja2/__init__.py
++++ jinja2-2.3/jinja2/__init__.py
+@@ -27,11 +27,11 @@
+     :license: BSD, see LICENSE for more details.
+ """
+ __docformat__ = 'restructuredtext en'
+-try:
+-    __version__ = __import__('pkg_resources') \
+-        .get_distribution('Jinja2').version
+-except:
+-    __version__ = 'unknown'
++#try:
++__version__ = 'REPLACE_ME_WITH_PROPER_VERSION'
++#        .get_distribution('Jinja2').version
++#except:
++#    __version__ = 'unknown'
+ 
+ # high level interface
+ from jinja2.environment import Environment, Template

Added: packages/jinja2/trunk/debian/patches/series
===================================================================
--- packages/jinja2/trunk/debian/patches/series	                        (rev 0)
+++ packages/jinja2/trunk/debian/patches/series	2010-02-10 22:36:09 UTC (rev 11681)
@@ -0,0 +1 @@
+add_version_placeholder.patch

Modified: packages/jinja2/trunk/debian/rules
===================================================================
--- packages/jinja2/trunk/debian/rules	2010-02-10 15:40:27 UTC (rev 11680)
+++ packages/jinja2/trunk/debian/rules	2010-02-10 22:36:09 UTC (rev 11681)
@@ -2,10 +2,12 @@
 
 #export DH_VERBOSE=1
 
+include /usr/share/quilt/quilt.make
+
 PYVERS=$(shell pyversions -vr)
 PKGDIR=$(CURDIR)/debian/python-jinja2
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -rf dist build Jinja2.egg-info
@@ -17,7 +19,7 @@
 		$(PYVERS:%=install-python%) $(PYVERS:%=build-python%) \
 		$(PYVERS:%=install-debug-python%) $(PYVERS:%=build-debug-python%)
 
-build: build-stamp
+build: patch build-stamp
 
 build-stamp: $(PYVERS:%=build-python%) $(PYVERS:%=build-debug-python%)
 	touch $@
@@ -33,7 +35,7 @@
 build-docs:
 	PYTHONPATH=$(CURDIR) make -C docs html
 
-install: install-stamp
+install: patch install-stamp
 install-stamp: $(PYVERS:%=install-python%) $(PYVERS:%=install-debug-python%)
 	dh_install
 	touch $@
@@ -50,12 +52,14 @@
 	find $(PKGDIR)-dbg/usr/ -depth -empty -delete
 	touch $@
 
+VERSION=$(shell sed -rn 's,^Version: (.*),\1,p' $(CURDIR)/PKG-INFO)
 binary-arch: build install
 	dh_testdir
 	dh_testroot
 	dh_installchangelogs -a CHANGES
 	dh_installdocs -a
 	dh_pysupport -a
+	sed -i -e 's,REPLACE_ME_WITH_PROPER_VERSION,$(VERSION),' $(PKGDIR)/usr/share/pyshared/jinja2/__init__.py
 	dh_makeshlibs -a
 	dh_strip -ppython-jinja2 --dbg-package=python-jinja2-dbg
 	rm -rf $(PKGDIR)-dbg/usr/share/doc/python-jinja2-dbg




More information about the Python-modules-commits mailing list