From 53f6d225f75a4a49eba0cfdf9ce8b7cd62074c1d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 24 Nov 2008 15:16:40 +0100 Subject: change naming for the gobjects to match glatzors branch --- debian/changelog | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8efc99bf..e812fe32 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,10 +14,10 @@ python-apt (0.7.9) UNRELEASED; urgency=low - new method "installedFiles()" - new method "getChangelog()" * apt/gtk/widgets.py: - - new widget GtkOpProgress - - new widget GtkFetchProgress - - new widget GtkInstallProgress - - new widget GtkDpkgInstallProgress + - new gobject GOpProgress + - new gobject GFetchProgress + - new gobject GInstallProgress + - new gobject GDpkgInstallProgress - new widget GtkAptProgress * doc/examples/gui-inst.py: - updated to use the new widgets -- cgit v1.2.3 From 4dcfce5fd58b99b9aaf6acb2ab86d811b1f1a01d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 11 Dec 2008 10:42:00 -0800 Subject: - new method "getRequiredDownload()" - new method "additionalRequiredSpace()" --- apt/cache.py | 11 +++++++++++ debian/changelog | 2 ++ 2 files changed, 13 insertions(+) (limited to 'debian') diff --git a/apt/cache.py b/apt/cache.py index 3c032052..79e58282 100644 --- a/apt/cache.py +++ b/apt/cache.py @@ -129,6 +129,17 @@ class Cache(object): self.cachePostChange() @property + def requiredDownload(self): + """ get the size of the packages that are required to download """ + pm = apt_pkg.GetPackageManager(self._depcache) + fetcher = apt_pkg.GetAcquire() + pm.GetArchives(fetcher, self._list, self._records) + return fetcher.FetchNeeded + @property + def additionalRequiredSpace(self): + """ get the size of the additional required space on the fs """ + return self._depcache.UsrSize + @property def reqReinstallPkgs(self): " return the packages not downloadable packages in reqreinst state " reqreinst = set() diff --git a/debian/changelog b/debian/changelog index e812fe32..3c3ae251 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ python-apt (0.7.9) UNRELEASED; urgency=low * apt/cache.py: - new method "isVirtualPackage()" - new method "getProvidingPackages()" + - new method "getRequiredDownload()" + - new method "additionalRequiredSpace()" * apt/debfile.py: - move a lot of the gdebi code into this file, this provides interfaces for querrying and installing -- cgit v1.2.3 From 481a90a820564dc12567348c16773e15cc129560 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 15 Dec 2008 14:24:51 +0100 Subject: * setup.py: - build html/ help of the apt and aptsources modules into /usr/share/doc/python-apt/html --- apt/package.py | 7 +++++-- debian/changelog | 3 +++ debian/python-apt.docs | 1 + debian/rules | 3 +++ setup.py | 29 ++++++++++++++++++++++++++++- 5 files changed, 40 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/apt/package.py b/apt/package.py index 94242e35..70ddbb1a 100644 --- a/apt/package.py +++ b/apt/package.py @@ -244,13 +244,15 @@ class Package(object): return self._records.ShortDesc summary = property(summary) - def description(self, format=True): + def description(self, format=True, useDots=False): """ Return the formated long description according to the Debian policy (Chapter 5.6.13). See http://www.debian.org/doc/debian-policy/ch-controlfields.html for more information. """ + if not format: + return self.rawDescription if not self._lookupRecord(): return "" # get the translated description @@ -289,7 +291,8 @@ class Package(object): else: line = raw_line # Use dots for lists - line = re.sub(r"^(\s*)(\*|0|o|-) ", ur"\1\u2022 ", line, 1) + if useDots: + line = re.sub(r"^(\s*)(\*|0|o|-) ", ur"\1\u2022 ", line, 1) # Add current line to the description desc += line return desc diff --git a/debian/changelog b/debian/changelog index 3c3ae251..160fe7c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,9 @@ python-apt (0.7.9) UNRELEASED; urgency=low - updated to use the new widgets * debian/control: - add suggests for python-gtk2 and python-vte + * setup.py: + - build html/ help of the apt and aptsources modules + into /usr/share/doc/python-apt/html -- Michael Vogt Mon, 24 Nov 2008 14:30:32 +0100 diff --git a/debian/python-apt.docs b/debian/python-apt.docs index 208050c5..f3c87fdc 100644 --- a/debian/python-apt.docs +++ b/debian/python-apt.docs @@ -1,3 +1,4 @@ README apt/README.apt data/templates/README.templates +html/ diff --git a/debian/rules b/debian/rules index c8aff2f9..adaad2a8 100755 --- a/debian/rules +++ b/debian/rules @@ -21,6 +21,9 @@ build/python-apt-dbg:: python$$i-dbg ./setup.py build; \ done +build/python-apt:: + pydoc -w + install/python-apt-dbg:: for i in $(cdbs_python_build_versions); do \ python$$i-dbg ./setup.py install --root $(CURDIR)/debian/python-apt-dbg; \ diff --git a/setup.py b/setup.py index fcbb6ba4..7024f81e 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,30 @@ from distutils.core import setup, Extension from distutils.sysconfig import parse_makefile from DistUtilsExtra.command import * -import glob, os, string +import glob +import os +import os.path +import pydoc +import shutil +import string +import sys + +def build_docs(dir="html", modules=["apt","aptsources"]): + htmldir = os.path.join(os.getcwd(), dir) + for d in modules: + for (dirpath, dirnames, filenames) in os.walk(d): + pydoc.writedoc(dirpath.replace("/",".")) + for file in filenames: + if not file.endswith(".py"): + continue + if file in ["__init__.py"]: + continue + pydoc.writedoc(dirpath.replace("/",".")+"."+file.split(".py")[0]) + if not os.path.exists(htmldir): + os.mkdir(htmldir) + for f in glob.glob("*.html"): + shutil.move(f, htmldir) + return True # The apt_pkg module files = map(lambda source: "python/"+source, @@ -29,6 +52,10 @@ for template in glob.glob('data/templates/*.info.in'): source.close() build.close() +# build doc +if sys.argv[1] == "build": + build_docs() + setup(name="python-apt", version="0.6.17", description="Python bindings for APT", -- cgit v1.2.3