[Python-modules-commits] [pytest] 02/03: Revert parts of c6eb0d1da9bdf2a0cfb40d69711e8a88e86d4657 and bring back rtinstall and rtremove for python3-pytest
Sebastian Ramacher
sramacher at moszumanska.debian.org
Tue Jan 19 14:47:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
sramacher pushed a commit to branch master
in repository pytest.
commit 652537bb62971086fbb4a3683a9cb2609dfc5437
Author: Sebastian Ramacher <sramacher at debian.org>
Date: Tue Jan 19 15:42:00 2016 +0100
Revert parts of c6eb0d1da9bdf2a0cfb40d69711e8a88e86d4657 and bring back rtinstall and rtremove for python3-pytest
Until it is decided that we do not want py.test-X.Y scripts, generate them correctly and without the need of sourceful uploads.
Closes: #811301
---
debian/python3-pytest.install | 1 +
debian/python3-pytest.postinst | 39 +++++++++++++++++++++++++++++++++++++++
debian/python3-pytest.prerm | 29 +++++++++++++++++++++++++++++
debian/python3-pytest.rtinstall | 7 +++++++
debian/python3-pytest.rtremove | 3 +++
debian/rules | 6 +-----
6 files changed, 80 insertions(+), 5 deletions(-)
diff --git a/debian/python3-pytest.install b/debian/python3-pytest.install
new file mode 100644
index 0000000..b803aa1
--- /dev/null
+++ b/debian/python3-pytest.install
@@ -0,0 +1 @@
+debian/python3-pytest.rt* /usr/share/python3/runtime.d
diff --git a/debian/python3-pytest.postinst b/debian/python3-pytest.postinst
new file mode 100644
index 0000000..6e6f726
--- /dev/null
+++ b/debian/python3-pytest.postinst
@@ -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
+ if [ $version ]; then
+ cp /usr/bin/py.test-3 /usr/bin/py.test-$version
+ sed -i "s,#! */usr/bin/python3,#!/usr/bin/python$version," "/usr/bin/py.test-$version"
+ fi
+ done
+ ;;
+
+ *)
+ 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
diff --git a/debian/python3-pytest.prerm b/debian/python3-pytest.prerm
new file mode 100644
index 0000000..d354019
--- /dev/null
+++ b/debian/python3-pytest.prerm
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+
+case "$1" in
+ remove|upgrade|deconfigure|failed-upgrade)
+ rm -f /usr/bin/py.test-3.[0-9]
+ ;;
+
+ *)
+ echo "prerm 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
diff --git a/debian/python3-pytest.rtinstall b/debian/python3-pytest.rtinstall
new file mode 100755
index 0000000..dbb8e66
--- /dev/null
+++ b/debian/python3-pytest.rtinstall
@@ -0,0 +1,7 @@
+#!/bin/sh
+set -e
+PYVERSION="${2##*python}"
+if [ ! -e "/usr/bin/py.test-$PYVERSION" ]; then
+ cp /usr/bin/py.test-3 /usr/bin/py.test-$PYVERSION
+ sed -i "s,#! */usr/bin/python3,#!/usr/bin/$2," /usr/bin/py.test-$PYVERSION
+fi
diff --git a/debian/python3-pytest.rtremove b/debian/python3-pytest.rtremove
new file mode 100755
index 0000000..656e1ce
--- /dev/null
+++ b/debian/python3-pytest.rtremove
@@ -0,0 +1,3 @@
+#!/bin/sh
+set -e
+rm -f "/usr/bin/py.test-${2##*python}"
diff --git a/debian/rules b/debian/rules
index cca7ce7..97d3954 100755
--- a/debian/rules
+++ b/debian/rules
@@ -31,11 +31,7 @@ override_dh_auto_install:
dh_auto_install
mv debian/python3-pytest/usr/bin/py.test \
debian/python3-pytest/usr/bin/py.test-3
- -sed -i '1s|.*|#!/usr/bin/python3.4|' \
- debian/python3-pytest/usr/bin/py.test-3.4
- -sed -i '1s|.*|#!/usr/bin/python3.5|' \
- debian/python3-pytest/usr/bin/py.test-3.5
- rm -rf debian/python3-pytest/usr/lib/python3.5
+ rm -f debian/python3-pytest/usr/bin/py.test-3.*
override_dh_auto_clean:
rm -rf doc/en/_build
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pytest.git
More information about the Python-modules-commits
mailing list