[Python-modules-commits] r22237 - in packages/pytest/trunk/debian (16 files)
laarmen-guest at users.alioth.debian.org
laarmen-guest at users.alioth.debian.org
Thu Jun 21 23:08:10 UTC 2012
Date: Thursday, June 21, 2012 @ 23:08:09
Author: laarmen-guest
Revision: 22237
Use rt{install, remove} mechanisms from the Python package to replace the
wrapper system. /usr/bin/py.test-X.Y will now be available only if the
corresponding python package is installed.
Added:
packages/pytest/trunk/debian/py.test.template
packages/pytest/trunk/debian/python-pytest.install
packages/pytest/trunk/debian/python-pytest.postinst
packages/pytest/trunk/debian/python-pytest.postrm
packages/pytest/trunk/debian/python-pytest.rtinstall
packages/pytest/trunk/debian/python-pytest.rtremove
packages/pytest/trunk/debian/python-pytest.rtupdate
packages/pytest/trunk/debian/python3-pytest.install
packages/pytest/trunk/debian/python3-pytest.postinst
packages/pytest/trunk/debian/python3-pytest.postrm
packages/pytest/trunk/debian/python3-pytest.rtinstall
packages/pytest/trunk/debian/python3-pytest.rtremove
packages/pytest/trunk/debian/python3-pytest.rtupdate
Modified:
packages/pytest/trunk/debian/changelog
packages/pytest/trunk/debian/rules
Deleted:
packages/pytest/trunk/debian/py.test.sh
Modified: packages/pytest/trunk/debian/changelog
===================================================================
--- packages/pytest/trunk/debian/changelog 2012-06-21 20:29:55 UTC (rev 22236)
+++ packages/pytest/trunk/debian/changelog 2012-06-21 23:08:09 UTC (rev 22237)
@@ -1,3 +1,11 @@
+pytest (2.2.4-2) UNRELEASED; urgency=low
+
+ * Use rt{install, remove} mechanisms from the Python package to replace the
+ wrapper system. /usr/bin/py.test-X.Y will now be available only if the
+ corresponding python package is installed.
+
+ -- Simon Chopin <chopin.simon at gmail.com> Thu, 21 Jun 2012 23:30:23 +0200
+
pytest (2.2.4-1) unstable; urgency=low
* New upstream release
Deleted: packages/pytest/trunk/debian/py.test.sh
===================================================================
--- packages/pytest/trunk/debian/py.test.sh 2012-06-21 20:29:55 UTC (rev 22236)
+++ packages/pytest/trunk/debian/py.test.sh 2012-06-21 23:08:09 UTC (rev 22237)
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-PYVERSION="${0##*py.test-}"
-case $PYVERSION in
- [0-9].[0-9]|[0-9]) ;;
- *) PYVERSION='';; #If ill-formed version, use the default.
-esac
-UPSTREAMVERSION=#PYTEST#
-
-if [ -f /usr/bin/python$PYVERSION ] ; then
-
- exec python$PYVERSION -c "import sys ; from pkg_resources import load_entry_point ; sys.argv[0]='/usr/bin/$0' ; sys.exit(load_entry_point('pytest==$UPSTREAMVERSION', 'console_scripts', 'py.test')())" $@
-
-else
- echo "Please install the python$PYVERSION package." >&2
- exit 1
-fi
Added: packages/pytest/trunk/debian/py.test.template
===================================================================
--- packages/pytest/trunk/debian/py.test.template (rev 0)
+++ packages/pytest/trunk/debian/py.test.template 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,5 @@
+#PYSHEBANG#
+
+import sys
+from pkg_resources import load_entry_point
+sys.exit(load_entry_point('pytest==#UPSTREAMVERSION#', 'console_scripts', 'py.test')())
Added: packages/pytest/trunk/debian/python-pytest.install
===================================================================
--- packages/pytest/trunk/debian/python-pytest.install (rev 0)
+++ packages/pytest/trunk/debian/python-pytest.install 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1 @@
+debian/python-pytest.rt* /usr/share/python/runtime.d
Added: packages/pytest/trunk/debian/python-pytest.postinst
===================================================================
--- packages/pytest/trunk/debian/python-pytest.postinst (rev 0)
+++ packages/pytest/trunk/debian/python-pytest.postinst 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,38 @@
+#!/bin/sh
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure|abort-upgrade|abort-remove|abort-deconfigure)
+ for version in `pyversions -vi`; do
+ install -m 755 /usr/share/pytest/py.test.template "/usr/bin/py.test-$version"
+ sed -i "s/#PYSHEBANG#/#!\/usr\/bin\/python$version/" "/usr/bin/py.test-$version"
+ done
+ rm -f /usr/bin/py.test
+ ln -s /usr/bin/py.test-`pyversions -vd` /usr/bin/py.test
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: packages/pytest/trunk/debian/python-pytest.postrm
===================================================================
--- packages/pytest/trunk/debian/python-pytest.postrm (rev 0)
+++ packages/pytest/trunk/debian/python-pytest.postrm 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,35 @@
+#!/bin/sh
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ rm -f /usr/bin/py.test-3.[0-9]
+ rm -f /usr/bin/py.test-3
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: packages/pytest/trunk/debian/python-pytest.rtinstall
===================================================================
--- packages/pytest/trunk/debian/python-pytest.rtinstall (rev 0)
+++ packages/pytest/trunk/debian/python-pytest.rtinstall 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+PYVERSION="${2##*python}"
+if [ ! -e "/usr/bin/py.test-$PYVERSION" ]; then
+ install -m 755 /usr/share/pytest/py.test.template "/usr/bin/py.test-$PYVERSION"
+ sed -i "s/#PYSHEBANG#/#!\/usr\/bin\/python$PYVERSION/" /usr/bin/py.test-$PYVERSION
+fi
Property changes on: packages/pytest/trunk/debian/python-pytest.rtinstall
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/pytest/trunk/debian/python-pytest.rtremove
===================================================================
--- packages/pytest/trunk/debian/python-pytest.rtremove (rev 0)
+++ packages/pytest/trunk/debian/python-pytest.rtremove 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+PYVERSION="${2##*python}"
+if [ -e "/usr/bin/py.test-$PYVERSION" ]; then
+ rm "/usr/bin/py.test-$PYVERSION"
+fi
Property changes on: packages/pytest/trunk/debian/python-pytest.rtremove
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/pytest/trunk/debian/python-pytest.rtupdate
===================================================================
--- packages/pytest/trunk/debian/python-pytest.rtupdate (rev 0)
+++ packages/pytest/trunk/debian/python-pytest.rtupdate 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+if [ "$1" = rtupdate ]; then
+ PYVERSION="${3##*python}"
+ rm -f /usr/bin/py.test
+ ln -s "/usr/bin/py.test-$PYVERSION" /usr/bin/py.test
+fi
Property changes on: packages/pytest/trunk/debian/python-pytest.rtupdate
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/pytest/trunk/debian/python3-pytest.install
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.install (rev 0)
+++ packages/pytest/trunk/debian/python3-pytest.install 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1 @@
+debian/python3-pytest.rt* /usr/share/python3/runtime.d
Added: packages/pytest/trunk/debian/python3-pytest.postinst
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.postinst (rev 0)
+++ packages/pytest/trunk/debian/python3-pytest.postinst 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,39 @@
+#!/bin/sh
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure|abort-upgrade|abort-remove|abort-deconfigure)
+ # Just in case, recreate all scripts
+ for version in `py3versions -vi`; do
+ install -m 755 /usr/share/pytest/py.test-3.template "/usr/bin/py.test-$version"
+ sed -i "s/#PYSHEBANG#/#!\/usr\/bin\/python$version/" "/usr/bin/py.test-$version"
+ done
+ rm -f /usr/bin/py.test-3
+ ln -s /usr/bin/py.test-`py3versions -vd` /usr/bin/py.test-3
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: packages/pytest/trunk/debian/python3-pytest.postrm
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.postrm (rev 0)
+++ packages/pytest/trunk/debian/python3-pytest.postrm 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,35 @@
+#!/bin/sh
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ rm -f /usr/bin/py.test-3.[0-9]
+ rm -f /usr/bin/py.test-3
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: packages/pytest/trunk/debian/python3-pytest.rtinstall
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.rtinstall (rev 0)
+++ packages/pytest/trunk/debian/python3-pytest.rtinstall 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+PYVERSION="${2##*python}"
+if [ ! -e "/usr/bin/py.test-$PYVERSION" ]; then
+ install -m 755 /usr/share/pytest/py.test-3.template "/usr/bin/py.test-$PYVERSION"
+ sed -i "s/#PYSHEBANG#/#!\/usr\/bin\/python$PYVERSION/" /usr/bin/py.test-$PYVERSION
+fi
Property changes on: packages/pytest/trunk/debian/python3-pytest.rtinstall
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/pytest/trunk/debian/python3-pytest.rtremove
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.rtremove (rev 0)
+++ packages/pytest/trunk/debian/python3-pytest.rtremove 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+PYVERSION="${2##*python}"
+if [ -e "/usr/bin/py.test-$PYVERSION" ]; then
+ rm "/usr/bin/py.test-$PYVERSION"
+fi
Property changes on: packages/pytest/trunk/debian/python3-pytest.rtremove
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/pytest/trunk/debian/python3-pytest.rtupdate
===================================================================
--- packages/pytest/trunk/debian/python3-pytest.rtupdate (rev 0)
+++ packages/pytest/trunk/debian/python3-pytest.rtupdate 2012-06-21 23:08:09 UTC (rev 22237)
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+if [ "$1" = rtupdate ]; then
+ PYVERSION="${3##*python}"
+ rm -f /usr/bin/py.test-3
+ ln -s "/usr/bin/py.test-$PYVERSION" /usr/bin/py.test-3
+fi
Property changes on: packages/pytest/trunk/debian/python3-pytest.rtupdate
___________________________________________________________________
Added: svn:executable
+ *
Modified: packages/pytest/trunk/debian/rules
===================================================================
--- packages/pytest/trunk/debian/rules 2012-06-21 20:29:55 UTC (rev 22236)
+++ packages/pytest/trunk/debian/rules 2012-06-21 23:08:09 UTC (rev 22237)
@@ -34,25 +34,17 @@
python setup.py install --skip-build --no-compile \
--root debian/python-pytest \
--install-layout=deb
- rm debian/python-pytest/usr/bin/*
- install -m 755 debian/py.test.sh debian/python-pytest/usr/bin/py.test
- sed -i 's/#PYTEST#/$(UPSTREAM)/' debian/python-pytest/usr/bin/py.test
- set -e; \
- for py in $(PYVERS) ; do \
- dh_link -ppython-pytest usr/bin/py.test usr/bin/py.test-$$py; \
- dh_link -ppython-pytest /usr/share/man/man1/py.test.1.gz /usr/share/man/man1/py.test-$$py.1.gz ;\
- done
+ rm -rf debian/python-pytest/usr/bin/
+ mkdir -p debian/python-pytest/usr/share/pytest
+ install -m 644 debian/py.test.template debian/python-pytest/usr/share/pytest/py.test.template
+ sed -i 's/#UPSTREAMVERSION#/$(UPSTREAM)/' debian/python-pytest/usr/share/pytest/py.test.template
python3 setup.py install --skip-build --no-compile \
--root debian/python3-pytest \
--install-layout=deb
- rm debian/python3-pytest/usr/bin/*
- install -m 755 debian/py.test.sh debian/python3-pytest/usr/bin/py.test-3
- sed -i 's/#PYTEST#/$(UPSTREAM)/' debian/python3-pytest/usr/bin/py.test-3
- set -e; \
- for py in $(PY3VERS) ; do \
- dh_link -ppython3-pytest usr/bin/py.test-3 usr/bin/py.test-$$py; \
- dh_link -ppython3-pytest /usr/share/man/man1/py.test-3.1.gz /usr/share/man/man1/py.test-$$py.1.gz ;\
- done
+ rm -rf debian/python3-pytest/usr/bin/
+ mkdir -p debian/python3-pytest/usr/share/pytest
+ install -m 644 debian/py.test.template debian/python3-pytest/usr/share/pytest/py.test-3.template
+ sed -i 's/#UPSTREAMVERSION#/$(UPSTREAM)/' debian/python3-pytest/usr/share/pytest/py.test-3.template
dh_install
override_dh_auto_clean:
More information about the Python-modules-commits
mailing list