[Python-modules-commits] r5472 - in packages/pastescript/trunk/debian (5 files)
piotr at users.alioth.debian.org
piotr at users.alioth.debian.org
Sat May 24 20:02:48 UTC 2008
Date: Saturday, May 24, 2008 @ 20:02:46
Author: piotr
Revision: 5472
* Remove paste-common dependency, python-support will provide all needed
namespace
* Move templates to /usr/share/paster_templates
+ patches/02_rename_templates_dir path updated
* New debian/paster shell script will invoke paster after detecting desired
Python version from file name
+ original paster scipt no longer installed
+ package depends only on default Python version again
(unnecessary dependency introduced in previous upload)
Added:
packages/pastescript/trunk/debian/paster
Modified:
packages/pastescript/trunk/debian/changelog
packages/pastescript/trunk/debian/dirs
packages/pastescript/trunk/debian/patches/02_rename_templates_dir.dpatch
packages/pastescript/trunk/debian/rules
Modified: packages/pastescript/trunk/debian/changelog
===================================================================
--- packages/pastescript/trunk/debian/changelog 2008-05-24 19:58:29 UTC (rev 5471)
+++ packages/pastescript/trunk/debian/changelog 2008-05-24 20:02:46 UTC (rev 5472)
@@ -1,11 +1,18 @@
-pastescript (1.6.2-3) UNRELEASED; urgency=low
+pastescript (1.6.2-3) unstable; urgency=low
* Replace python-setuptools with python-pkg-resources in Depends
(closes: #468714)
- * Remove paste-common dependency, python-paste (>= 1.6-1) is enough since
- python-support will provide needed namespace
+ * Remove paste-common dependency, python-support will provide all needed
+ namespace
+ * Move templates to /usr/share/paster_templates
+ + patches/02_rename_templates_dir path updated
+ * New debian/paster shell script will invoke paster after detecting desired
+ Python version from file name
+ + original paster scipt no longer installed
+ + package depends only on default Python version again
+ (unnecessary dependency introduced in previous upload)
- -- Piotr Ożarowski <piotr at debian.org> Sat, 26 Apr 2008 17:54:04 +0200
+ -- Piotr Ożarowski <piotr at debian.org> Sat, 24 May 2008 20:05:12 +0200
pastescript (1.6.2-2) unstable; urgency=low
Modified: packages/pastescript/trunk/debian/dirs
===================================================================
--- packages/pastescript/trunk/debian/dirs 2008-05-24 19:58:29 UTC (rev 5471)
+++ packages/pastescript/trunk/debian/dirs 2008-05-24 20:02:46 UTC (rev 5472)
@@ -1,2 +1,3 @@
/usr/bin
+/usr/share/paster_templates
/usr/share/doc/python-pastescript/docs
Added: packages/pastescript/trunk/debian/paster
===================================================================
--- packages/pastescript/trunk/debian/paster (rev 0)
+++ packages/pastescript/trunk/debian/paster 2008-05-24 20:02:46 UTC (rev 5472)
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+# determine desired Python version from filename
+VERSION="${0##*paster}"
+
+if [ ! -f /usr/bin/python$VERSION ]
+then
+ echo "Please install python$VERSION package" >&2
+ exit 1
+else
+ exec python$VERSION -c "import sys; sys.argv[0] = 'paster$VERSION'; from paste.script import command; command.run()" $@
+fi
Property changes on: packages/pastescript/trunk/debian/paster
___________________________________________________________________
Name: svn:executable
+ *
Modified: packages/pastescript/trunk/debian/patches/02_rename_templates_dir.dpatch
===================================================================
--- packages/pastescript/trunk/debian/patches/02_rename_templates_dir.dpatch 2008-05-24 19:58:29 UTC (rev 5471)
+++ packages/pastescript/trunk/debian/patches/02_rename_templates_dir.dpatch 2008-05-24 20:02:46 UTC (rev 5472)
@@ -1,8 +1,7 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_rename_templates_dir.dpatch by <Piotr Ożarowski <piotr at debian.org>>
+## 02_rename_templates_dir.dpatch by Piotr Ożarowski <piotr at debian.org>
##
-## DP: it's a workaround for http://bugs.debian.org/459468
-## DP: please note that paste/script/templates directory is renamed to templates_dir in debian/rules
+## DP: paster's templates are outside site-packages in Debian
@DPATCH@
diff -urNad pastescript-1.6.1~/paste/script/templates.py pastescript-1.6.1/paste/script/templates.py
@@ -13,7 +12,7 @@
class BasicPackage(Template):
- _template_dir = 'templates/basic_package'
-+ _template_dir = 'templates_dir/basic_package'
++ _template_dir = '/usr/share/paster_templates/basic_package'
summary = "A basic setuptools-enabled package"
vars = [
var('version', 'Version (like 0.1)'),
Modified: packages/pastescript/trunk/debian/rules
===================================================================
--- packages/pastescript/trunk/debian/rules 2008-05-24 19:58:29 UTC (rev 5471)
+++ packages/pastescript/trunk/debian/rules 2008-05-24 20:02:46 UTC (rev 5472)
@@ -28,23 +28,23 @@
touch $@
install: build $(PYVERS:%=install-python%)
-install-python%:
+install-python%: patch
python$* setup.py install \
--single-version-externally-managed \
--root $(PKGDIR)
# pth file is not needed since all paste* packages are installed in the same directory
rm -f $(PKGDIR)/usr/lib/python$*/site-packages/PasteScript-${DEB_UPSTREAM_VERSION}-py$*-nspkg.pth
- # provided by paste-common package:
+ # python-support's namespace feature will handle this
rm -f $(PKGDIR)/usr/lib/python$*/site-packages/paste/__init__.py
- # create /usr/bin/pasterX.Y
- cp $(CURDIR)/scripts/paster $(PKGDIR)/usr/bin/paster$*
- sed -i -e '1s,usr/bin/.*,usr/bin/python$*,' $(PKGDIR)/usr/bin/paster$*
+ # create /usr/bin/pasterX.Y symlink
+ dh_link /usr/bin/paster /usr/bin/paster$*
dh_link /usr/share/man/man1/paster.1.gz /usr/share/man/man1/paster$*.1.gz
- # default Python version in hashbang
- sed -i -e '1s/python.*/python/' $(PKGDIR)/usr/bin/paster
- # temporary workaround for bug #459446 (see also patch 02_rename_templates_dir.dpatch)
- mv $(PKGDIR)/usr/lib/python$*/site-packages/paste/script/templates \
- $(PKGDIR)/usr/lib/python$*/site-packages/paste/script/templates_dir \
+ # move templates outside site-packages
+ if [ ! -d $(PKGDIR)/usr/share/paster_templates/basic_package ]; then \
+ mv $(PKGDIR)/usr/lib/python$*/site-packages/paste/script/templates/* \
+ $(PKGDIR)/usr/share/paster_templates/;\
+ fi
+ rm -rf $(PKGDIR)/usr/lib/python$*/site-packages/paste/script/templates/
binary-indep: build install
dh_testdir -i
@@ -53,6 +53,7 @@
dh_installdocs -i
dh_link usr/share/doc/python-pastescript/docs /usr/share/doc/python-paste/docs/script
dh_installman -i
+ dh_install debian/paster /usr/bin/
dh_pysupport -i
dh_compress -i -X.py
dh_fixperms -i
More information about the Python-modules-commits
mailing list