On Fri, Nov 21, 2008 at 03:51:35PM +0100, Michael Hanke wrote: > On Fri, Nov 21, 2008 at 02:43:24PM +0100, Michael Hanke wrote: > Well, 0.4.3 also seems to be broken: Does not copy PDF figures into > latex build dir if there is an alternative png image available and > therefore fails to build PDF docs.
Ok, I think I have fixed it -- it was caused by sphinx swallowing the subdir path the images were in (ie. 'pics/something.pdf' became 'something.pdf'). As I cannot file bugs against an upstream version not yet in Debian and 0.4.2 is not affected, I have attached the patch (against 0.4.3) here. I also updated the prospective Debian-diff. Let me know if you want me to NMU. Michael -- GPG key: 1024D/3144BE0F Michael Hanke http://apsy.gse.uni-magdeburg.de/hanke ICQ: 48230050
sphinx_0.4.3-1.0.diff.gz
Description: Binary data
diff --git a/sphinx/environment.py b/sphinx/environment.py
index 1f0a15b..602b765 100644
--- a/sphinx/environment.py
+++ b/sphinx/environment.py
@@ -564,9 +564,9 @@ class BuildEnvironment:
for filename in glob(path.join(self.srcdir, imgpath)):
dir, base = path.split(filename)
if base.lower().endswith('.pdf'):
- candidates['application/pdf'] = path.join(docdir, base)
+ candidates['application/pdf'] = path.join(dir, base)
elif base.lower().endswith('.svg'):
- candidates['image/svg+xml'] = path.join(docdir, base)
+ candidates['image/svg+xml'] = path.join(dir, base)
else:
f = open(filename, 'rb')
try:
@@ -574,7 +574,7 @@ class BuildEnvironment:
finally:
f.close()
if imgtype:
- candidates['image/' + imgtype] = path.join(docdir, base)
+ candidates['image/' + imgtype] = path.join(dir, base)
else:
candidates['*'] = imgpath
for imgpath in candidates.itervalues():
signature.asc
Description: Digital signature

