Commit 21ba650e authored by Julian Andres Klode's avatar Julian Andres Klode

* setup.py, doc/source/conf.py: Fix building by adding build/lib* to PYTHONPATH

We now build the extension first, and then the documentation. Also add
the text docs.
parent 6a806f05
......@@ -13,7 +13,9 @@ python-apt (0.7.9~exp2) experimental; urgency=low
- debian/rules: Build the documentation here
- setup.py: Remove pydoc building and add new docs.
- debian/examples: Include examples from documentation
- debian/python-apt.docs: Change html/ to doc/build/html.
- debian/python-apt.docs:
+ Change html/ to build/doc/html.
+ Add build/doc/text for the text-only documentation
* setup.py:
- Only create build/data when building, not all the time
- Remove build/mo and build/data on clean -a
......@@ -22,7 +24,7 @@ python-apt (0.7.9~exp2) experimental; urgency=low
they are only needed for oldstable (sarge)
- Build-Depend on python-sphinx (>= 0.5)
-- Julian Andres Klode <jak@debian.org> Fri, 09 Jan 2009 17:20:41 +0100
-- Julian Andres Klode <jak@debian.org> Fri, 09 Jan 2009 18:11:30 +0100
python-apt (0.7.9~exp1) experimental; urgency=low
......
README
apt/README.apt
data/templates/README.templates
doc/build/html/
build/doc/html/
build/doc/text/
......@@ -13,6 +13,7 @@ include /usr/share/cdbs/1/class/python-distutils.mk
PKG=python-apt
DEBVER=$(shell dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p')
DEB_COMPRESS_EXCLUDE:=.html .js _static/* _sources/* _sources/*/* .inv
DEB_BUILD_PROG:=debuild --preserve-envvar PATH --preserve-envvar CCACHE_DIR -us -uc $(DEB_BUILD_PROG_OPTS)
build/python-apt-dbg::
......
......@@ -26,6 +26,10 @@ help:
clean:
-rm -rf build/*
text:
mkdir -p build/text build/doctrees
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) build/text
html:
mkdir -p build/html build/doctrees
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
......
......@@ -19,8 +19,11 @@ import sys, os
# If your extensions are in another directory, add it here. If the directory
# is relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
sys.path.insert(0,os.path.abspath('..'))
sys.path.insert(0,os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../..'))
if os.path.exists("../../build"):
for dirname in os.listdir('../../build'):
sys.path.insert(0, os.path.abspath('../../build/' + dirname))
# General configuration
# ---------------------
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-01-09 17:23+0100\n"
"POT-Creation-Date: 2009-01-09 18:08+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......
......@@ -10,7 +10,6 @@ import os.path
import pydoc
import shutil
import string
import subprocess
import sys
......@@ -39,10 +38,10 @@ if len(sys.argv) > 1 and sys.argv[1] == "build":
build.write(line.lstrip("_"))
source.close()
build.close()
if subprocess.call(["make", "-C", "doc", "html"]) :
raise SystemError
if len(sys.argv) > 1 and sys.argv[1] == "clean" and '-a' in sys.argv:
for dirname in "doc/build", "build/data", "build/mo":
for dirname in "build/doc", "doc/build", "build/data", "build/mo":
if os.path.exists(dirname):
print "Removing", dirname
shutil.rmtree(dirname)
......@@ -65,3 +64,10 @@ setup(name="python-apt",
license = 'GNU GPL',
platforms = 'posix'
)
if len(sys.argv) > 1 and sys.argv[1] == "build":
import sphinx
sphinx.main(["sphinx", "-b", "html", "-d", "build/doc/doctrees",
os.path.abspath("doc/source"), "build/doc/html"])
sphinx.main(["sphinx", "-b", "text", "-d", "build/doc/doctrees",
os.path.abspath("doc/source"), "build/doc/text"])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment