exit 1
fi
+VERSION=`python -c "import setup;print setup.VERSION"`
+
+# cleanup old build
rm -r docs/api/*
+# build the docs
export PTYHONPATH=$PWD
-
epydoc --name wxPython \
--html \
--output docs/api \
# TODO:
# 1. Should rebuild the top-level docs too (but we need more of them first!)
-# 2. bundle it all up into a tarball
-# 3. etc.
+
+# bundle it all up into a tarball
+DEST=wxPython-$VERSION/docs
+mkdir -p _build_docs/$DEST
+cp -R --link docs/api _build_docs/$DEST
+cd _build_docs
+rm -f ../dist/wxPythonNewDocs-$VERSION.tar.gz
+tar cf ../dist/wxPythonNewDocs-$VERSION.tar $DEST
+gzip -9 ../dist/wxPythonNewDocs-$VERSION.tar
+
+# Cleanup
+cd ..
+rm -r _build_docs
+