[sagenb-export] 01/01: Finish packaging with python3-notebook

Ximin Luo infinity0 at debian.org
Sat Nov 19 12:55:51 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository sagenb-export.

commit 730a05af3dffe4cfaa0b016ee9196a4933039dda
Author: Ximin Luo <infinity0 at debian.org>
Date:   Sat Nov 19 13:46:30 2016 +0100

    Finish packaging with python3-notebook
---
 debian/README.Debian                  |  9 +++++++++
 debian/changelog                      |  1 -
 debian/control                        | 10 +++++-----
 debian/python-sagenb-export.postinst  |  9 +++++++++
 debian/python-sagenb-export.prerm     |  9 +++++++++
 debian/python3-sagenb-export.postinst |  9 +++++++++
 debian/python3-sagenb-export.prerm    |  9 +++++++++
 debian/rules                          | 10 ++++------
 8 files changed, 54 insertions(+), 12 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..154d977
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,9 @@
+Virtual package sagenb-export
+=============================
+
+Both python-sagenb-export and python3-sagenb-export Provides: a virtual
+sagenb-export package that other packages may depend on, if they just want a
+/usr/bin/sagenb-export program and don't care which version of python is
+running it.
+
+ -- Ximin Luo <infinity0 at debian.org>  Sat, 19 Nov 2016 13:45:51 +0100
diff --git a/debian/changelog b/debian/changelog
index 624c5d3..4430e29 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,5 @@
 sagenb-export (2.0-1) UNRELEASED; urgency=medium
 
   * Initial release. (Closes: #839782)
-  * DO NOT RELEASE YET. This depends on notebook which is not in Debian.
 
  -- Ximin Luo <infinity0 at debian.org>  Sun, 16 Oct 2016 18:46:54 +0200
diff --git a/debian/control b/debian/control
index 3c9edf6..b409199 100644
--- a/debian/control
+++ b/debian/control
@@ -7,10 +7,10 @@ Build-Depends: debhelper (>= 9), dh-python,
  python-all, python3-all,
  python-ipython (>= 5), python3-ipython (>= 5),
  python-nbconvert, python3-nbconvert,
-# ipython-notebook (>= 5), ipython3-notebook (>= 5), # TODO: not yet in Debian, tests will fail
  python-setuptools, python3-setuptools,
+# indeed, python(2)-notebook is not required for some reason
  python-six, python3-six,
- python-tornado, python3-tornado,
+ python-tornado, python3-tornado, python3-notebook,
  tox
 Standards-Version: 3.9.8
 Homepage: https://github.com/vbraun/ExportSageNB
@@ -18,12 +18,12 @@ X-Python-Version: >= 2.6
 X-Python3-Version: >= 3.2
 Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/sagenb-export.git
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/sagenb-export.git/
-#Testsuite: autopkgtest-pkg-python
+Testsuite: autopkgtest-pkg-python
 
 Package: python-sagenb-export
 Architecture: all
 Depends: ${python:Depends}, ${misc:Depends}
-Suggests: python-sagenb-export-doc
+Provides: sagenb-export (= ${binary:Version})
 Description: Convert SageNB Notebooks (Python 2)
  This is a tool to convert SageNB notebooks to other formats,
  in particular IPython/Jupyter notebooks.
@@ -33,7 +33,7 @@ Description: Convert SageNB Notebooks (Python 2)
 Package: python3-sagenb-export
 Architecture: all
 Depends: ${python3:Depends}, ${misc:Depends}
-Suggests: python-sagenb-export-doc
+Provides: sagenb-export (= ${binary:Version})
 Description: Convert SageNB Notebooks (Python 3)
  This is a tool to convert SageNB notebooks to other formats,
  in particular IPython/Jupyter notebooks.
diff --git a/debian/python-sagenb-export.postinst b/debian/python-sagenb-export.postinst
new file mode 100644
index 0000000..88f1676
--- /dev/null
+++ b/debian/python-sagenb-export.postinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
+	update-alternatives --install /usr/bin/sagenb-export sagenb-export /usr/bin/sagenb-export-python2 300
+fi
+
+#DEBHELPER#
diff --git a/debian/python-sagenb-export.prerm b/debian/python-sagenb-export.prerm
new file mode 100644
index 0000000..17bc8bd
--- /dev/null
+++ b/debian/python-sagenb-export.prerm
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] ; then
+	update-alternatives --remove sagenb-export /usr/bin/sagenb-export-python2
+fi
+
+#DEBHELPER#
diff --git a/debian/python3-sagenb-export.postinst b/debian/python3-sagenb-export.postinst
new file mode 100644
index 0000000..832d822
--- /dev/null
+++ b/debian/python3-sagenb-export.postinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] ; then
+	update-alternatives --install /usr/bin/sagenb-export sagenb-export /usr/bin/sagenb-export-python3 200
+fi
+
+#DEBHELPER#
diff --git a/debian/python3-sagenb-export.prerm b/debian/python3-sagenb-export.prerm
new file mode 100644
index 0000000..7edfb4f
--- /dev/null
+++ b/debian/python3-sagenb-export.prerm
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ] ; then
+	update-alternatives --remove sagenb-export /usr/bin/sagenb-export-python3
+fi
+
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
index 213958d..27c4835 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,8 +16,7 @@ export PYBUILD_NAME=sagenb-export
 #	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml        docs/ build/html # HTML generator
 #	PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bman        docs/ build/man # Manpage generator
 
-TOX_ENVLIST = py27
-#TOX_ENVLIST = py27,py35 # TODO: uncomment after notebook is in debian
+TOX_ENVLIST = py27,py35
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
@@ -31,10 +30,9 @@ override_dh_auto_clean:
 	rm -rf .tox
 	dh_auto_clean
 
-# TODO: link these back to /usr/bin/sagenb-export via update-alternatives,
 override_dh_install:
 	dh_install
-	mv debian/python3-sagenb-export/usr/bin/sagenb-export \
-	   debian/python3-sagenb-export/usr/bin/python3-sagenb-export
 	mv debian/python-sagenb-export/usr/bin/sagenb-export \
-	   debian/python-sagenb-export/usr/bin/python-sagenb-export
+	   debian/python-sagenb-export/usr/bin/sagenb-export-python2
+	mv debian/python3-sagenb-export/usr/bin/sagenb-export \
+	   debian/python3-sagenb-export/usr/bin/sagenb-export-python3

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagenb-export.git



More information about the debian-science-commits mailing list