debian/rules
branchstable
changeset 8476 864a92b10cb8
parent 7767 07c74f5585d1
child 8647 2294fad830ca
--- a/debian/rules	Thu Jul 19 10:27:04 2012 +0200
+++ b/debian/rules	Fri Jul 20 09:31:15 2012 +0200
@@ -11,10 +11,14 @@
 build-stamp:
 	dh_testdir
 	NO_SETUPTOOLS=1 python setup.py build
+	# cubicweb.foo needs to be importable by sphinx, so create a cubicweb symlink to the source dir
+	mkdir -p debian/pythonpath
+	ln -sf $(CURDIR) debian/pythonpath/cubicweb
 	# documentation build is now made optional since it can break for old
 	# distributions and we don't want to block a new release of Cubicweb
 	# because of documentation issues.
-	-PYTHONPATH=$(CURDIR)/.. $(MAKE) -C doc/book/en all
+	-PYTHONPATH=$${PYTHONPATH:+$${PYTHONPATH}:}$(CURDIR)/debian/pythonpath $(MAKE) -C doc/book/en all
+	rm -rf debian/pythonpath
 	touch build-stamp
 
 clean: