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

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Thu Mar 26 21:25:02 UTC 2009


    Date: Thursday, March 26, 2009 @ 21:25:00
  Author: piotr
Revision: 8009

* update patch to new upstream release (0.6.1)
* move locale outside site-packages

Modified:
  packages/sphinx/trunk/debian/changelog
  packages/sphinx/trunk/debian/dirs
  packages/sphinx/trunk/debian/patches/move_static_files_outside_site-packages.patch
  packages/sphinx/trunk/debian/rules

Modified: packages/sphinx/trunk/debian/changelog
===================================================================
--- packages/sphinx/trunk/debian/changelog	2009-03-26 17:54:18 UTC (rev 8008)
+++ packages/sphinx/trunk/debian/changelog	2009-03-26 21:25:00 UTC (rev 8009)
@@ -1,4 +1,4 @@
-sphinx (0.6-1) UNRELEASED; urgency=low
+sphinx (0.6.1-1) UNRELEASED; urgency=low
 
   [ Piotr Ożarowski ]
   * New upstream release
@@ -7,10 +7,9 @@
   * Build depend on python-all (>= 2.5.4-1) (py_libdir is now used in
     debian/rules)
   TODO:
-  * move locale outside site-packages (warning: .js and .py files inside!)
   * create manpage for sphinx-autogen
 
- -- Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>  Tue, 17 Mar 2009 20:25:11 +0100
+ -- Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>  Thu, 26 Mar 2009 20:04:41 +0100
 
 sphinx (0.5.2-1) unstable; urgency=low
 

Modified: packages/sphinx/trunk/debian/dirs
===================================================================
--- packages/sphinx/trunk/debian/dirs	2009-03-26 17:54:18 UTC (rev 8008)
+++ packages/sphinx/trunk/debian/dirs	2009-03-26 21:25:00 UTC (rev 8009)
@@ -1 +1 @@
-/usr/share/sphinx/
+/usr/share/sphinx/locale

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	2009-03-26 17:54:18 UTC (rev 8008)
+++ packages/sphinx/trunk/debian/patches/move_static_files_outside_site-packages.patch	2009-03-26 21:25:00 UTC (rev 8009)
@@ -1,9 +1,9 @@
 # move static files outside site-packages so that they can be shared between
 # different Python versions
-Index: sphinx-0.6/sphinx/theming.py
+Index: sphinx-0.6.1/sphinx/theming.py
 ===================================================================
---- sphinx-0.6.orig/sphinx/theming.py
-+++ sphinx-0.6/sphinx/theming.py
+--- sphinx-0.6.1.orig/sphinx/theming.py
++++ sphinx-0.6.1/sphinx/theming.py
 @@ -33,7 +33,7 @@ class Theme(object):
      def init_themes(cls, builder):
          """Search all theme paths for available themes."""
@@ -13,10 +13,10 @@
  
          for themedir in cls.themepath[::-1]:
              themedir = path.join(builder.confdir, themedir)
-Index: sphinx-0.6/sphinx/builders/changes.py
+Index: sphinx-0.6.1/sphinx/builders/changes.py
 ===================================================================
---- sphinx-0.6.orig/sphinx/builders/changes.py
-+++ sphinx-0.6/sphinx/builders/changes.py
+--- sphinx-0.6.1.orig/sphinx/builders/changes.py
++++ sphinx-0.6.1/sphinx/builders/changes.py
 @@ -137,12 +137,10 @@ class ChangesBuilder(Builder):
                  f.close()
          themectx = dict(('theme_' + key, val) for (key, val) in
@@ -32,10 +32,10 @@
                            path.join(self.outdir, 'basic.css'), self)
  
      def hl(self, text, version):
-Index: sphinx-0.6/sphinx/builders/latex.py
+Index: sphinx-0.6.1/sphinx/builders/latex.py
 ===================================================================
---- sphinx-0.6.orig/sphinx/builders/latex.py
-+++ sphinx-0.6/sphinx/builders/latex.py
+--- sphinx-0.6.1.orig/sphinx/builders/latex.py
++++ sphinx-0.6.1/sphinx/builders/latex.py
 @@ -195,7 +195,7 @@ class LaTeXBuilder(Builder):
                              path.join(self.outdir, logobase))
  
@@ -45,16 +45,18 @@
          for filename in os.listdir(staticdirname):
              if not filename.startswith('.'):
                  shutil.copyfile(path.join(staticdirname, filename),
-Index: sphinx-0.6/sphinx/builders/pdf.py
+Index: sphinx-0.6.1/sphinx/builders/html.py
 ===================================================================
---- sphinx-0.6.orig/sphinx/builders/pdf.py
-+++ sphinx-0.6/sphinx/builders/pdf.py
-@@ -185,7 +185,7 @@ class PdfBuilder(Builder):
-                             path.join(self.outdir, logobase))
+--- sphinx-0.6.1.orig/sphinx/builders/html.py
++++ sphinx-0.6.1/sphinx/builders/html.py
+@@ -92,8 +92,8 @@ class StandaloneHTMLBuilder(Builder):
+             self.link_suffix = self.out_suffix
  
-         self.info(bold('copying TeX support files... '), nonl=True)
--        staticdirname = path.join(package_dir, 'texinputs')
-+        staticdirname = '/usr/share/sphinx/texinputs'
-         for filename in os.listdir(staticdirname):
-             if not filename.startswith('.'):
-                 shutil.copyfile(path.join(staticdirname, filename),
+         if self.config.language is not None:
+-            jsfile = path.join(package_dir, 'locale', self.config.language,
+-                               'LC_MESSAGES', 'sphinx.js')
++            jsfile = path.join('/usr/share/sphinx/locale', \
++                               self.config.language, 'sphinx.js')
+             if path.isfile(jsfile):
+                 self.script_files.append('_static/translations.js')
+ 

Modified: packages/sphinx/trunk/debian/rules
===================================================================
--- packages/sphinx/trunk/debian/rules	2009-03-26 17:54:18 UTC (rev 8008)
+++ packages/sphinx/trunk/debian/rules	2009-03-26 21:25:00 UTC (rev 8009)
@@ -6,12 +6,12 @@
 
 PACKAGE_NAME=python-sphinx
 PACKAGE_DIR=$(CURDIR)/debian/$(PACKAGE_NAME)
+SITE_PACKAGES_DIR=$(PACKAGE_DIR)$(call py_libdir,$(shell pyversions -d))
 
 build: build-stamp
 
 build-stamp:
 	dh_testdir
-
 	mkdir -p _build/html
 	python sphinx-build.py doc _build/html
 	touch build-stamp
@@ -31,13 +31,19 @@
 	dh_testdir
 	dh_testroot
 	dh_installdirs
-
+	
 	python setup.py install --no-compile --root $(PACKAGE_DIR)
 	# move static files outside {site,dist}-packages
-	mv $(PACKAGE_DIR)$(call py_libdir,$(shell pyversions -d))/sphinx/texinputs \
-	   $(PACKAGE_DIR)/usr/share/sphinx/
-	mv $(PACKAGE_DIR)$(call py_libdir,$(shell pyversions -d))/sphinx/themes \
-	   $(PACKAGE_DIR)/usr/share/sphinx/
+	mv $(SITE_PACKAGES_DIR)/sphinx/texinputs $(PACKAGE_DIR)/usr/share/sphinx/
+	mv $(SITE_PACKAGES_DIR)/sphinx/themes $(PACKAGE_DIR)/usr/share/sphinx/
+	for lang in `find $(SITE_PACKAGES_DIR)/sphinx/locale -maxdepth 1 -mindepth 1 -type d -printf "%f "`;\
+	do \
+		mkdir $(PACKAGE_DIR)/usr/share/sphinx/locale/$$lang; \
+		mv $(SITE_PACKAGES_DIR)/sphinx/locale/$$lang/LC_MESSAGES/sphinx.js \
+		   $(PACKAGE_DIR)/usr/share/sphinx/locale/$$lang/; \
+		rm -rf $(SITE_PACKAGES_DIR)/sphinx/locale/$$lang; \
+	done
+	rm -f $(SITE_PACKAGES_DIR)/sphinx/locale/sphinx.pot
 	# use packaged jQuery
 	dh_link /usr/share/javascript/jquery/jquery.js \
 		/usr/share/sphinx/themes/basic/static/jquery.js




More information about the Python-modules-commits mailing list