[Python-modules-commits] r18946 - in packages/sphinx/branches/1.1/debian (9 files)
jwilk at users.alioth.debian.org
jwilk at users.alioth.debian.org
Sat Oct 15 20:50:27 UTC 2011
Date: Saturday, October 15, 2011 @ 20:50:25
Author: jwilk
Revision: 18946
/usr/bin/sphinx-* are now symlinks and are managed by docutils-common postinst/postrm maintainer scripts.
Added:
packages/sphinx/branches/1.1/debian/sphinx-common.lintian-overrides
packages/sphinx/branches/1.1/debian/sphinx-common.postinst.in
packages/sphinx/branches/1.1/debian/sphinx-common.prerm.in
packages/sphinx/branches/1.1/debian/sphinx-common.triggers
Modified:
packages/sphinx/branches/1.1/debian/changelog
packages/sphinx/branches/1.1/debian/control
packages/sphinx/branches/1.1/debian/python-sphinx.install
packages/sphinx/branches/1.1/debian/python3-sphinx.install
packages/sphinx/branches/1.1/debian/rules
Modified: packages/sphinx/branches/1.1/debian/changelog
===================================================================
--- packages/sphinx/branches/1.1/debian/changelog 2011-10-15 18:33:12 UTC (rev 18945)
+++ packages/sphinx/branches/1.1/debian/changelog 2011-10-15 20:50:25 UTC (rev 18946)
@@ -29,6 +29,15 @@
can replace one with the other. Add lintian override.
* New binary package: python3-sphinx.
+ Add build-dependency on python3 (needed for dh_python3).
+ + Both python-sphinx and python3-sphinx provide sphinx-* scripts. The
+ scripts have:
+ #!/usr/bin/python3 shebang if only python3-sphinx is installed;
+ #!/usr/bin/python shebang otherwise.
+ + /usr/bin/sphinx-* are now symlinks and are managed by docutils-common
+ postinst/postrm maintainer scripts.
+ + Conflict with older versions of python-sphinx that were shipping
+ /usr/bin/sphinx-* scripts. Add lintian override for
+ conflicts-with-version.
* Run dh_install with --fail-missing.
* Improve debian/rules:
+ Make the build actually fail if integration tests for the JavaScript
@@ -43,7 +52,7 @@
+ Run nosetests with --verbose --no-skip.
* Use XS-Python-Version instead of debian/pyversions.
- -- Jakub Wilk <jwilk at debian.org> Sat, 15 Oct 2011 19:03:26 +0200
+ -- Jakub Wilk <jwilk at debian.org> Sat, 15 Oct 2011 22:48:04 +0200
sphinx (1.0.8+dfsg-2) unstable; urgency=low
Modified: packages/sphinx/branches/1.1/debian/control
===================================================================
--- packages/sphinx/branches/1.1/debian/control 2011-10-15 18:33:12 UTC (rev 18945)
+++ packages/sphinx/branches/1.1/debian/control 2011-10-15 20:50:25 UTC (rev 18946)
@@ -75,7 +75,7 @@
Depends: ${misc:Depends},
libjs-sphinxdoc (= ${source:Version})
Recommends: python-sphinx | python3-sphinx
-Breaks: python-sphinx (<< 1.1)
+Conflicts: python-sphinx (<< 1.1)
Replaces: python-sphinx (<< 1.1)
Description: documentation generator for Python projects - common data
Sphinx is a tool for producing documentation for Python projects, using
Modified: packages/sphinx/branches/1.1/debian/python-sphinx.install
===================================================================
--- packages/sphinx/branches/1.1/debian/python-sphinx.install 2011-10-15 18:33:12 UTC (rev 18945)
+++ packages/sphinx/branches/1.1/debian/python-sphinx.install 2011-10-15 20:50:25 UTC (rev 18946)
@@ -1,2 +1,2 @@
/usr/lib/python2.*/*-packages/
-/usr/bin/*
+/usr/share/sphinx/scripts/python2/
Modified: packages/sphinx/branches/1.1/debian/python3-sphinx.install
===================================================================
--- packages/sphinx/branches/1.1/debian/python3-sphinx.install 2011-10-15 18:33:12 UTC (rev 18945)
+++ packages/sphinx/branches/1.1/debian/python3-sphinx.install 2011-10-15 20:50:25 UTC (rev 18946)
@@ -1 +1,2 @@
/usr/lib/python3/dist-packages/
+/usr/share/sphinx/scripts/python3/
Modified: packages/sphinx/branches/1.1/debian/rules
===================================================================
--- packages/sphinx/branches/1.1/debian/rules 2011-10-15 18:33:12 UTC (rev 18945)
+++ packages/sphinx/branches/1.1/debian/rules 2011-10-15 20:50:25 UTC (rev 18946)
@@ -44,6 +44,7 @@
python setup.py clean
find . -name '*.py[co]' -delete
rm -rf build *.egg-info
+ rm -f $(basename $(wildcard debian/*.in))
dh_clean
install: build
@@ -88,10 +89,20 @@
cd $(debroot)$(py3_site_packages)/sphinx/locale && rm -rf sphinx.pot */
# install scripts not touched by easy install
set -e -x; \
- for script in sphinx-*.py; do \
- install -m 755 $$script $(debroot)/usr/bin/$${script%.py}; \
+ for python in python2 python3; do \
+ dir=$(debroot)/usr/share/sphinx/scripts/$$python/; \
+ mkdir -p $$dir; \
+ for script in sphinx-*.py; do \
+ sed -e "1 s,#!.*,#!/usr/bin/$${python%2}," $$script \
+ > $$dir/$${script%.py}; \
+ rm -f $(debroot)/usr/bin/$${script%.py}; \
+ done; \
+ chmod 755 $$dir/*; \
done
- install -m 755 sphinx-apidoc.py $(debroot)/usr/bin/sphinx-apidoc
+ set -e -x; \
+ for maintscript in $(wildcard debian/sphinx-common.*.in); do \
+ sed -e 's/@SCRIPTS@/$(basename $(wildcard sphinx-*.py))/' $$maintscript > $${maintscript%.in}; \
+ done
# Move JavaScript code to libjs-sphinxdoc:
set -e -x; \
for js in $$(find build/html/_static/ -name '*.js'); do \
@@ -110,7 +121,8 @@
dh_testroot
dh_installchangelogs CHANGES
dh_installdocs
- dh_install --fail-missing
+ dh_install -p sphinx-common -X /scripts/
+ dh_install -N sphinx-common --fail-missing
dh_lintian
./debian/dh-sphinxdoc/dh_sphinxdoc -p sphinx-doc /usr/share/doc/sphinx-doc/html/
dh_installexamples
Added: packages/sphinx/branches/1.1/debian/sphinx-common.lintian-overrides
===================================================================
--- packages/sphinx/branches/1.1/debian/sphinx-common.lintian-overrides (rev 0)
+++ packages/sphinx/branches/1.1/debian/sphinx-common.lintian-overrides 2011-10-15 20:50:25 UTC (rev 18946)
@@ -0,0 +1,3 @@
+# sphinx-common postinst must not be run if old version on python-sphinx is
+# even unpacked.
+sphinx-common: conflicts-with-version python-sphinx (<< 1.1)
Added: packages/sphinx/branches/1.1/debian/sphinx-common.postinst.in
===================================================================
--- packages/sphinx/branches/1.1/debian/sphinx-common.postinst.in (rev 0)
+++ packages/sphinx/branches/1.1/debian/sphinx-common.postinst.in 2011-10-15 20:50:25 UTC (rev 18946)
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+directory=/usr/share/sphinx/scripts
+scripts='@SCRIPTS@'
+if [ "$1" = configure ] || [ "$1" = triggered ]
+then
+ if [ -d $directory/python2/ ]
+ then
+ for script in $scripts
+ do
+ ln -sf ../${directory#/usr/}/python2/$script /usr/bin/
+ done
+ elif [ -d $directory/python3/ ]
+ then
+ for script in $scripts
+ do
+ ln -sf ../${directory#/usr/}/python3/$script /usr/bin/
+ done
+ else
+ cd /usr/bin/
+ rm -f $scripts
+ cd /
+ fi
+fi
+unset directory
+unset scripts
+
+#DEBHELPER#
Added: packages/sphinx/branches/1.1/debian/sphinx-common.prerm.in
===================================================================
--- packages/sphinx/branches/1.1/debian/sphinx-common.prerm.in (rev 0)
+++ packages/sphinx/branches/1.1/debian/sphinx-common.prerm.in 2011-10-15 20:50:25 UTC (rev 18946)
@@ -0,0 +1,13 @@
+#!/bin/sh
+set -e
+
+scripts='@SCRIPTS@'
+if [ "$1" = remove ] || [ "$1" = deconfigure ]
+then
+ cd /usr/bin/
+ rm -f $scripts
+ cd /
+fi
+unset scripts
+
+#DEBHELPER#
Added: packages/sphinx/branches/1.1/debian/sphinx-common.triggers
===================================================================
--- packages/sphinx/branches/1.1/debian/sphinx-common.triggers (rev 0)
+++ packages/sphinx/branches/1.1/debian/sphinx-common.triggers 2011-10-15 20:50:25 UTC (rev 18946)
@@ -0,0 +1 @@
+interest /usr/share/sphinx/scripts
More information about the Python-modules-commits
mailing list