[Python-modules-commits] [cysignals] 05/05: Refresh and harden
Jerome Benoit
calculus-guest at moszumanska.debian.org
Thu Oct 13 01:07:34 UTC 2016
This is an automated email from the git hooks/post-receive script.
calculus-guest pushed a commit to branch master
in repository cysignals.
commit 07048532d1202875030238dd28d95299f89b884b
Author: Jerome Benoit <calculus at rezozer.net>
Date: Thu Oct 13 00:55:58 2016 +0100
Refresh and harden
---
debian/changelog | 17 +-
debian/control | 4 +-
debian/patches/debianization.patch | 4 +-
debian/patches/series | 2 -
.../upstream-autotoolization-harden-generic.patch | 20 +--
.../upstream-autotoolization-harden-pari_gp.patch | 20 +--
...tion_pytoolization-harden-build_directory.patch | 24 +--
...mentation-make-user_friendly_check-soften.patch | 180 ---------------------
.../upstream-lintian-spelling-error-silence.patch | 69 --------
...eam-source-tools-gdb-handling_enhancement.patch | 24 +--
debian/python-cysignals-doc.docs | 2 -
debian/rules | 17 +-
12 files changed, 59 insertions(+), 324 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index a9e5127..2162e49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,17 @@
-cysignals (1.2.0+ds-1) UNRELEASED; urgency=medium
+cysignals (1.2.0+ds-1) unstable; urgency=medium
- * Debianization:
- - debian/rules, add Build-Profiles helper/reminder (cf d/README.source).
* New upstream version.
-
- -- Jerome Benoit <calculus at rezozer.net> Wed, 12 Oct 2016 23:53:58 +0000
+ * Debianization:
+ - debian/patches/:
+ - d/p/upstream-documentation-make-user_friendly_check-soften.patch,
+ discard;
+ - debian/control, harden;
+ - debian/rules:
+ - unconditional use of --with sphinxdoc;
+ - add Build-Profiles helper/reminder (cf d/README.source);
+ - documentation composition, harden.
+
+ -- Jerome Benoit <calculus at rezozer.net> Thu, 13 Oct 2016 00:34:58 +0000
cysignals (1.1.1+ds-2) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 711f79c..88842c2 100644
--- a/debian/control
+++ b/debian/control
@@ -10,13 +10,13 @@ Build-Depends:
dpkg-dev (>= 1.17.14),
python-setuptools,
python-all,
+ python-sphinx,
libpython-dev,
libpari-dev (>= 2.8) <pkg.cysignals.pari>,
cython (>= 0.24),
gdb
Build-Depends-Indep:
python-docutils,
- python-sphinx,
texlive-latex-base,
texlive-latex-recommended,
texlive-fonts-recommended,
@@ -74,7 +74,7 @@ Description: interrupt and signal handling for Cython -- tools
Package: python-cysignals-doc
Section: doc
Architecture: all
-Depends: ${misc:Depends}
+Depends: ${misc:Depends}, ${sphinxdoc:Depends}
Suggests: pdf-viewer, www-browser
Enhances: python-cysignals (= ${source:Version})
Description: interrupt and signal handling for Cython -- doc
diff --git a/debian/patches/debianization.patch b/debian/patches/debianization.patch
index 50172b7..c7e0107 100644
--- a/debian/patches/debianization.patch
+++ b/debian/patches/debianization.patch
@@ -8,7 +8,7 @@ Last-Update: 2015-09-14
--- a/setup.py
+++ b/setup.py
-@@ -62,6 +62,7 @@
+@@ -64,6 +64,7 @@
# The variable "init_pxd" is the string which should be written to
# __init__.pxd
init_pxd = "# distutils: include_dirs = {0}\n".format(install_dir)
@@ -18,7 +18,7 @@ Last-Update: 2015-09-14
init_pxd += c.read()
--- a/src/scripts/cysignals-CSI
+++ b/src/scripts/cysignals-CSI
-@@ -86,6 +86,7 @@
+@@ -97,6 +97,7 @@
"""
# Preload the right Python library
libpython = os.path.join(sysconfig.get_config_var('exec_prefix'), 'lib',
diff --git a/debian/patches/series b/debian/patches/series
index 3cdd02b..1e1ece4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,5 @@
-upstream-lintian-spelling-error-silence.patch
upstream-autotoolization-harden-generic.patch
upstream-autotoolization-harden-pari_gp.patch
upstream-autotoolization_pytoolization-harden-build_directory.patch
upstream-source-tools-gdb-handling_enhancement.patch
-upstream-documentation-make-user_friendly_check-soften.patch
debianization.patch
diff --git a/debian/patches/upstream-autotoolization-harden-generic.patch b/debian/patches/upstream-autotoolization-harden-generic.patch
index 9a2ccd1..c856291 100644
--- a/debian/patches/upstream-autotoolization-harden-generic.patch
+++ b/debian/patches/upstream-autotoolization-harden-generic.patch
@@ -6,26 +6,8 @@ Description: autotoolization: harden: generic
Origin: vendor, Debian
Forwarded: https://github.com/sagemath/cysignals/pull/38
Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2016-09-14
+Last-Update: 2016-10-10
---- a/configure.ac
-+++ b/configure.ac
-@@ -1,12 +1,13 @@
- dnl Not sure which autoconf version we need, but 2.69 (from 2012)
- dnl is widely available.
- AC_PREREQ([2.69])
-+AC_COPYRIGHT([GPL version 2 or later])
-
- AC_DEFUN([VERSION], m4_esyscmd_s(cat VERSION))
-
- AC_INIT([cysignals], VERSION, [https://github.com/sagemath/cysignals/issues])
--AC_COPYRIGHT([GPL version 2 or later])
--AC_CONFIG_SRCDIR([configure.ac])
-+AC_CONFIG_MACRO_DIR([m4])
-+AC_CONFIG_SRCDIR([src/cysignals/pxi.h])
- AC_CONFIG_HEADERS([build/src/config.h:src/config.h.in])
-
- AC_LANG(C)
--- a/Makefile
+++ b/Makefile
@@ -46,8 +46,8 @@
diff --git a/debian/patches/upstream-autotoolization-harden-pari_gp.patch b/debian/patches/upstream-autotoolization-harden-pari_gp.patch
index a707e25..a0ea8ad 100644
--- a/debian/patches/upstream-autotoolization-harden-pari_gp.patch
+++ b/debian/patches/upstream-autotoolization-harden-pari_gp.patch
@@ -8,7 +8,7 @@ Description: autotoolization: harden: PARI/GP
Origin: vendor, Debian
Forwarded: https://github.com/sagemath/cysignals/pull/38
Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2016-09-14
+Last-Update: 2016-10-10
--- /dev/null
+++ b/m4/pari.m4
@@ -278,7 +278,7 @@ Last-Update: 2016-09-14
+])
--- a/configure.ac
+++ b/configure.ac
-@@ -12,14 +12,12 @@
+@@ -18,14 +18,12 @@
AC_LANG(C)
@@ -296,7 +296,7 @@ Last-Update: 2016-09-14
AC_MSG_CHECKING([for emms instruction])
# We add the "leal" instruction to reduce false positives in case some
-@@ -37,9 +35,15 @@
+@@ -43,9 +41,15 @@
AC_CONFIG_COMMANDS([build/src/config.pxd],
# Generate a file config.pxd whose contents will be copied to
# __init__.pxd to set correct compiler options.
@@ -340,18 +340,12 @@ Last-Update: 2016-09-14
kwds = dict(include_dirs=[opj("src", "cysignals"),
opj(cythonize_dir, "src"),
opj(cythonize_dir, "src", "cysignals")],
-@@ -27,13 +38,12 @@
- Extension("cysignals.tests", ["src/cysignals/tests.pyx"], **kwds)
- ]
-
--
- # Run configure if it wasn't run before. We check this by the presence
- # of config.pxd
- config_pxd_file = opj(cythonize_dir, "src", "config.pxd")
+@@ -34,7 +45,7 @@
if not os.path.isfile(config_pxd_file):
import subprocess
-- subprocess.check_call("make configure && ./configure", shell=True)
-+ subprocess.check_call( "make configure && ./configure " + ac_configure_flags , shell=True)
+ subprocess.check_call(["make", "configure"])
+- subprocess.check_call(["sh", "configure"])
++ subprocess.check_call(["sh", "configure" + ac_configure_flags ])
# Determine installation directory from distutils
diff --git a/debian/patches/upstream-autotoolization_pytoolization-harden-build_directory.patch b/debian/patches/upstream-autotoolization_pytoolization-harden-build_directory.patch
index b2b4691..89ed79b 100644
--- a/debian/patches/upstream-autotoolization_pytoolization-harden-build_directory.patch
+++ b/debian/patches/upstream-autotoolization_pytoolization-harden-build_directory.patch
@@ -8,7 +8,7 @@ Description: autotoolization/pytoolization: harden: build directory
Origin: vendor, Debian
Forwarded: https://github.com/sagemath/cysignals/pull/38
Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2016-09-14
+Last-Update: 2016-10-10
--- a/setup.py
+++ b/setup.py
@@ -36,31 +36,33 @@ Last-Update: 2016-09-14
kwds = dict(include_dirs=[opj("src", "cysignals"),
opj(cythonize_dir, "src"),
-@@ -43,7 +45,11 @@
+@@ -44,8 +46,12 @@
config_pxd_file = opj(cythonize_dir, "src", "config.pxd")
if not os.path.isfile(config_pxd_file):
import subprocess
-- subprocess.check_call( "make configure && ./configure " + ac_configure_flags , shell=True)
+- subprocess.check_call(["make", "configure"])
+- subprocess.check_call(["sh", "configure" + ac_configure_flags ])
+ subprocess.check_call(
+ "make configure && mkdir -p " + cythonize_dir +
+ " && " +
+ "{ cd " + cythonize_dir + " ; ../../configure " + ac_configure_flags + " ; }" ,
+ shell=True)
++
# Determine installation directory from distutils
--- a/configure.ac
+++ b/configure.ac
-@@ -8,7 +8,7 @@
+@@ -7,7 +7,7 @@
AC_INIT([cysignals], VERSION, [https://github.com/sagemath/cysignals/issues])
- AC_CONFIG_MACRO_DIR([m4])
- AC_CONFIG_SRCDIR([src/cysignals/pxi.h])
--AC_CONFIG_HEADERS([build/src/config.h:src/config.h.in])
-+AC_CONFIG_HEADERS([src/config.h])
+ AC_COPYRIGHT([GNU Lesser General Public License version 3 or later])
+ AC_CONFIG_SRCDIR([configure.ac])
+-AC_CONFIG_HEADERS([build/src/config.h:src/config.h.in build/src/cysignals/debug.h:src/cysignals/debug.h.in])
++AC_CONFIG_HEADERS([src/config.h src/cysignals/debug.h])
- AC_LANG(C)
-
-@@ -32,13 +32,13 @@
+ AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug], [enable debug output]))
+@@ -38,13 +38,13 @@
)
diff --git a/debian/patches/upstream-documentation-make-user_friendly_check-soften.patch b/debian/patches/upstream-documentation-make-user_friendly_check-soften.patch
deleted file mode 100644
index dc5fda5..0000000
--- a/debian/patches/upstream-documentation-make-user_friendly_check-soften.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-Description: upstream: documentation composition: soften user-friendly check
- Render `user-friendly check for sphinx-build' even more friendly by not
- emitting the error message and not stopping wherever is not needed in view
- to be able to launch non-composition targets (e.g., clean) on systems without
- sphinx-build installed; meant to be submitted to the upstream maintainer.
-Origin: vendor, Debian
-Forwarded: https://github.com/sagemath/cysignals/pull/40
-Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2016-10-08
-
---- a/docs/Makefile
-+++ b/docs/Makefile
-@@ -7,11 +7,6 @@
- PAPER =
- BUILDDIR = build
-
--# User-friendly check for sphinx-build
--ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
--$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
--endif
--
- # Internal variables.
- PAPEROPT_a4 = -D latex_paper_size=a4
- PAPEROPT_letter = -D latex_paper_size=letter
-@@ -50,37 +45,44 @@
- rm -rf $(BUILDDIR)/*
-
- html:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
- dirhtml:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
- singlehtml:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
- pickle:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
- json:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
- htmlhelp:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
- qthelp:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
-@@ -90,6 +92,7 @@
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cysignals.qhc"
-
- devhelp:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
-@@ -99,11 +102,13 @@
- @echo "# devhelp"
-
- epub:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
- latex:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
-@@ -111,28 +116,33 @@
- "(use \`make latexpdf' here to do that automatically)."
-
- latexpdf:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
- latexpdfja:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through platex and dvipdfmx..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
- text:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
- man:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
- texinfo:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo
- @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
-@@ -140,38 +150,54 @@
- "(use \`make info' here to do that automatically)."
-
- info:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo "Running Texinfo files through makeinfo..."
- make -C $(BUILDDIR)/texinfo info
- @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
-
- gettext:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
- @echo
- @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
-
- changes:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
- linkcheck:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
- doctest:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
-
- xml:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
- @echo
- @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
-
- pseudoxml:
-+ $(call user_friendly_check_for_sphinx_build)
- $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
- @echo
- @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
-+
-+
-+#### utilities
-+
-+user_friendly_check_for_sphinx_build = \
-+ $(if $(shell which $(SPHINXBUILD) >/dev/null 2>&1 || echo $$?),\
-+ $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/),)
-+
-+####
diff --git a/debian/patches/upstream-lintian-spelling-error-silence.patch b/debian/patches/upstream-lintian-spelling-error-silence.patch
deleted file mode 100644
index b0c54a6..0000000
--- a/debian/patches/upstream-lintian-spelling-error-silence.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Description: source typo
- Correct spelling error as reported by lintian in some binraries;
- meant to silence lintian and eventually to be submitted to the
- upstream maintainer.
-Origin: vendor, Debian
-Forwarded: https://github.com/sagemath/cysignals/pull/37
-Comment: spelling-error-in-binary
-Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2016-09-08
-
---- a/src/cysignals/macros.h
-+++ b/src/cysignals/macros.h
-@@ -66,14 +66,14 @@
- *
- * _sig_on_(message) is a macro which pretends to be a function.
- * Since this is declared as "cdef except 0", Cython will know that an
-- * exception occured if the value of _sig_on_() is 0 (false).
-+ * exception occurred if the value of _sig_on_() is 0 (false).
- *
- * INPUT:
- *
- * - message -- a string to be displayed as error message when the code
- * between sig_on() and sig_off() fails and raises an exception.
- *
-- * OUTPUT: zero if an exception occured, non-zero otherwise.
-+ * OUTPUT: zero if an exception occurred, non-zero otherwise.
- *
- * The function sigsetjmp() in the _sig_on_() macro can return:
- * - zero: this happens in the actual sig_on() call. sigsetjmp() sets
-@@ -127,7 +127,7 @@
- {
- if (unlikely(jmpret > 0))
- {
-- /* An exception occured */
-+ /* An exception occurred */
- _sig_on_recover();
- return 0;
- }
-@@ -189,7 +189,7 @@
- * but much faster. Essentially, it checks whether we missed any
- * interrupts.
- *
-- * OUTPUT: zero if an interrupt occured, non-zero otherwise.
-+ * OUTPUT: zero if an interrupt occurred, non-zero otherwise.
- */
- static inline int sig_check(void)
- {
---- a/src/cysignals/implementation.c
-+++ b/src/cysignals/implementation.c
-@@ -189,7 +189,7 @@
- signal(SIGTERM, SIG_DFL);
- sigprocmask(SIG_SETMASK, &default_sigmask, NULL);
-
-- if (inside) sigdie(sig, "An error occured during signal handling.");
-+ if (inside) sigdie(sig, "An error occurred during signal handling.");
-
- /* Quit Python with an appropriate message. */
- switch(sig)
---- a/src/cysignals/tests.pyx
-+++ b/src/cysignals/tests.pyx
-@@ -598,7 +598,7 @@
- ------------------------------------------------------------------------
- ...
- ------------------------------------------------------------------------
-- An error occured during signal handling.
-+ An error occurred during signal handling.
- This probably occurred because a *compiled* module has a bug
- in it and is not properly wrapped with sig_on(), sig_off().
- Python will now terminate.
diff --git a/debian/patches/upstream-source-tools-gdb-handling_enhancement.patch b/debian/patches/upstream-source-tools-gdb-handling_enhancement.patch
index 8d7e55d..5d34155 100644
--- a/debian/patches/upstream-source-tools-gdb-handling_enhancement.patch
+++ b/debian/patches/upstream-source-tools-gdb-handling_enhancement.patch
@@ -6,11 +6,11 @@ Description: enhance helper handling in cysignals-CSI
Origin: vendor, Debian
Forwarded: https://github.com/sagemath/cysignals/pull/39
Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2016-09-12
+Last-Update: 2016-10-10
--- a/setup.py
+++ b/setup.py
-@@ -145,11 +145,13 @@
+@@ -147,11 +147,13 @@
platforms=["POSIX"],
ext_modules=extensions,
@@ -30,24 +30,24 @@ Last-Update: 2016-09-12
)
--- a/src/scripts/cysignals-CSI
+++ b/src/scripts/cysignals-CSI
-@@ -54,6 +54,8 @@
+@@ -64,6 +64,8 @@
def gdb_commands(pid, color):
+ from cysignals_gdb import __file__ as cysignals_gdb_pkg_root
+ cysignals_gdb_pkg_root = os.path.dirname(cysignals_gdb_pkg_root)
- cmds = ''
- cmds += 'set prompt (cysignals-gdb-prompt)\n'
- cmds += 'set verbose off\n'
-@@ -65,7 +67,7 @@
- cmds += 'import sys; sys.stdout.flush()\n'
- cmds += 'end\n'
- cmds += 'bt full\n'
+ cmds = b('')
+ cmds += b('set prompt (cysignals-gdb-prompt)\n')
+ cmds += b('set verbose off\n')
+@@ -75,7 +77,7 @@
+ cmds += b('import sys; sys.stdout.flush()\n')
+ cmds += b('end\n')
+ cmds += b('bt full\n')
- script = os.path.join(os.path.dirname(sys.argv[0]), 'cysignals-CSI-helper.py')
+ script = os.path.join(cysignals_gdb_pkg_root, 'cysignals-CSI-helper.py')
with open(script, 'r') as f:
- cmds += 'python\n'
- cmds += 'color = {0}\n'.format(color)
+ cmds += b('python\n')
+ cmds += b('color = {0}\n'.format(color))
--- /dev/null
+++ b/src/scripts/__init__.py
@@ -0,0 +1 @@
diff --git a/debian/python-cysignals-doc.docs b/debian/python-cysignals-doc.docs
index 70d8ff0..a923dbf 100644
--- a/debian/python-cysignals-doc.docs
+++ b/debian/python-cysignals-doc.docs
@@ -1,4 +1,2 @@
PKG-INFO
README.rst
-docs/build/html/
-docs/build/latex/cysignals.pdf
diff --git a/debian/rules b/debian/rules
index 49ff64e..efb5545 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,8 +8,6 @@ DEB_PKG_VERSION ?= $(shell dpkg-parsechangelog -S Version)
export ACLOCAL_PATH=m4
-DHFLAGS = --with autoreconf --with python2 --buildsystem=pybuild
-
H2MFLAGS = \
--manual="CySIgnals Cython package" \
--source="CySIgnals (Debian $(DEB_PKG_VERSION))" \
@@ -19,11 +17,8 @@ H2MFLAGS = \
default:
@uscan --no-conf --dehs --report || true
-%-indep:
- dh $@ $(DHFLAGS) --with sphinxdoc
-
%:
- dh $@ $(DHFLAGS)
+ dh $@ --with autoreconf --with python2 --with sphinxdoc --buildsystem=pybuild
override_dh_auto_configure-arch:
$(call adhoc_dh_auto_configure_do,bare)
@@ -42,7 +37,6 @@ endif
override_dh_auto_build-indep:
$(call adhoc_dh_auto_build_do,bare)
- $(MAKE) -C docs html latexpdf PAPER=a4 LATEXOPTS='-interaction batchmode'
override_dh_auto_test-arch:
$(call adhoc_dh_auto_test_do,bare)
@@ -90,6 +84,15 @@ override_dh_install-indep:
override_dh_installdocs:
dh_installdocs --all debian/README.Debian
+DEB_SPHINXDOC_DOCDIR=$(CURDIR)/debian/python-cysignals-doc/usr/share/doc/python-cysignals-doc
+override_dh_sphinxdoc-indep:
+ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
+ $(MAKE) -C docs latexpdf PAPER=a4 LATEXOPTS='-interaction batchmode'
+ cp -p $(CURDIR)/docs/build/latex/cysignals.pdf $(DEB_SPHINXDOC_DOCDIR)
+ PYTHONPATH=$(CURDIR) sphinx-build -b html docs/source $(DEB_SPHINXDOC_DOCDIR)/html
+ dh_sphinxdoc -O--buildsystem=pybuild
+endif
+
override_dh_compress-indep:
dh_compress -X.pdf -Xexamples
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/cysignals.git
More information about the Python-modules-commits
mailing list