[Python-modules-commits] r18933 - in packages/sphinx/trunk/debian (4 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Sat Oct 15 15:12:22 UTC 2011


    Date: Saturday, October 15, 2011 @ 15:12:20
  Author: jwilk
Revision: 18933

Modify sphinx.package_dir directly in debian/rules, not via patch. This makes move_static_files_outside_site-packages.patch fully forwardable upstream, and makes running tests easier.

Modified:
  packages/sphinx/trunk/debian/changelog
  packages/sphinx/trunk/debian/patches/move_static_files_outside_site-packages.patch
  packages/sphinx/trunk/debian/rules
Deleted:
  packages/sphinx/trunk/debian/sphinx-build-local.py

Modified: packages/sphinx/trunk/debian/changelog
===================================================================
--- packages/sphinx/trunk/debian/changelog	2011-10-15 13:40:46 UTC (rev 18932)
+++ packages/sphinx/trunk/debian/changelog	2011-10-15 15:12:20 UTC (rev 18933)
@@ -14,8 +14,11 @@
   * Fix a typo in the package description.
   * Use a for loop in debian/rules to install all sphinx-* scripts.
   * Use ‘set -x’ for all for loops in debian/rules.
+  * Modify sphinx.package_dir directly in debian/rules, not via patch. This
+    makes move_static_files_outside_site-packages.patch fully forwardable
+    upstream, and makes running tests easier.
 
- -- Jakub Wilk <jwilk at debian.org>  Sat, 15 Oct 2011 15:03:43 +0200
+ -- Jakub Wilk <jwilk at debian.org>  Sat, 15 Oct 2011 15:51:21 +0200
 
 sphinx (1.0.8+dfsg-2) unstable; urgency=low
 

Modified: packages/sphinx/trunk/debian/patches/move_static_files_outside_site-packages.patch
===================================================================
--- packages/sphinx/trunk/debian/patches/move_static_files_outside_site-packages.patch	2011-10-15 13:40:46 UTC (rev 18932)
+++ packages/sphinx/trunk/debian/patches/move_static_files_outside_site-packages.patch	2011-10-15 15:12:20 UTC (rev 18933)
@@ -1,19 +1,8 @@
 Description: Move static files outside site-packages so that they can be shared
   between different Python versions.
-Forwarded: not-needed
-Last-Update: 2011-01-10
+Forwarded: no
+Last-Update: 2011-10-15
 
---- a/sphinx/__init__.py
-+++ b/sphinx/__init__.py
-@@ -15,7 +15,7 @@
- __version__  = '1.0.8'
- __released__ = '1.0.8'  # used when Sphinx builds its own docs
- 
--package_dir = path.abspath(path.dirname(__file__))
-+package_dir = '/usr/share/sphinx/'
- 
- if '+' in __version__ or 'pre' in __version__:
-     # try to find out the changeset hash if checked out from hg, and append
 --- a/tests/run.py
 +++ b/tests/run.py
 @@ -14,7 +14,10 @@

Modified: packages/sphinx/trunk/debian/rules
===================================================================
--- packages/sphinx/trunk/debian/rules	2011-10-15 13:40:46 UTC (rev 18932)
+++ packages/sphinx/trunk/debian/rules	2011-10-15 15:12:20 UTC (rev 18933)
@@ -22,7 +22,7 @@
 	dh_testdir
 	ln -sf /usr/share/javascript/jquery/jquery.js sphinx/themes/basic/static/
 	ln -sf /usr/share/javascript/underscore/underscore.js sphinx/themes/basic/static/
-	PYTHONPATH=. python debian/sphinx-build-local.py doc build/html
+	python ./sphinx-build.py doc build/html
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 	set -e -x; \
 	for python in $(shell pyversions -r); do \
@@ -46,6 +46,8 @@
 	dh_installdirs
 	python setup.py install --no-compile --install-layout=deb --root $(debroot)
 	# move static files outside {site,dist}-packages
+	sed -i -e "s!^package_dir = .*!package_dir = '/usr/share/sphinx'!" \
+		$(debroot)$(site_packages)/sphinx/__init__.py
 	cd $(debroot) && mv -t usr/share/sphinx/ .$(site_packages)/sphinx/texinputs \
 		.$(site_packages)/sphinx/themes
 	cd $(debroot) && mv -t usr/share/sphinx/pycode/ \

Deleted: packages/sphinx/trunk/debian/sphinx-build-local.py
===================================================================
--- packages/sphinx/trunk/debian/sphinx-build-local.py	2011-10-15 13:40:46 UTC (rev 18932)
+++ packages/sphinx/trunk/debian/sphinx-build-local.py	2011-10-15 15:12:20 UTC (rev 18933)
@@ -1,13 +0,0 @@
-#!/usr/bin/python
-
-# Like /usr/bin/sphinx-build, but don't try to use system-wide static files.
-
-import os
-import sys
-import sphinx
-
-if __name__ == '__main__':
-    sphinx.package_dir = os.path.abspath(os.path.dirname(sphinx.__file__))
-    sys.exit(sphinx.main(sys.argv))
-
-# vim:ts=4 sw=4 et




More information about the Python-modules-commits mailing list