diff --git a/debian/changelog b/debian/changelog
index f78bf8a97660acc4cc2b9ab0cfad12e1386598ad..e590a04e1fc9b60d2af69a6c9f22a3aeb9e4e572 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+scikit-learn (0.3-2) unstable; urgency=low
+
+  * Setting both HOME and MPLCONFIGDIR while building documentation
+    (slipped through fingers somehow) (Closes: #580727).
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Sat, 08 May 2010 00:35:59 -0400
+
 scikit-learn (0.3-1) unstable; urgency=low
 
   * Fresh upstream release.
diff --git a/debian/rules b/debian/rules
index fb6ef5ccb282dc9d91d00bf5eb988d1420c42ecd..300f95076e207e5503fb81ec882eda005df2605c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,7 +16,8 @@ override_dh_auto_build:
 	dh_auto_build
 	: # Build Documentation
 ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
-	PYTHONPATH=`/bin/ls -d $$PWD/build/lib.*$(PYVER)` $(MAKE) -C doc html
+	export PYTHONPATH=`/bin/ls -d $$PWD/build/lib.*$(PYVER)` MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \
+	 cd doc; $(MAKE) html
 endif