summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2009-05-06 21:19:53 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2009-05-06 21:19:53 +0200
commit2c43ad2f4440571a1fadb6830f14d7a3f1ad2020 (patch)
tree76b78116acb768f6379d3425bace15cc7069bfe9 /setup.py
parentd9096e08b64c0e917bcfcce29f498fa47a6d7db4 (diff)
parentb285f7334fc4aa735993a057c8788876620e55cb (diff)
downloadpython-apt-2c43ad2f4440571a1fadb6830f14d7a3f1ad2020.tar.gz
* merged from debian, remaining changes:
- updated mirrors - build python2.4 - use DH_PYCENTRAL=include-links - use --install-layout=deb - pre-build.sh: update ubuntu mirrors on bzr-buildpackage * apt/package.py: Handle cases where no candidate is available, by returning None in the candidate property. (Closes: #523801) * apt/package.py: Handle cases where no candidate is available and one of the deprecated properties (e.g. candidateVersion) is requested. (Closes: #523801) * setup.py, debian/rules: Support version in setup.py again by getting the value from the variable DEBVER (defined in debian/rules), falling back to None. * Build-Depend on python-debian, use it to get version number from changelog * Depend on libjs-jquery, and remove internal copy (Closes: #521532) * apt/package.py: - Introduce Version.{uri,uris,fetch_binary()} * debian/control: - Remove mdz from Uploaders (Closes: #521477), add myself. - Update Standards-Version to 3.8.1 - Use ${binary:Version} instead of ${Source-Version} - Fix spelling error: python -> Python * debian/copyright: Switch to machine-interpretable copyright * Fix documentation building - doc/source/conf.py: Only include directories for current python version. - debian/control: Build-Depend on python-gtk2, python-vte. - setup.py: If pygtk can not be imported, do not build the documentation. * Breaks: debdelta (<< 0.28~) to avoid more problems due to the internal API changes from 0.7.9. * apt/gtk/widgets.py: - Handle older versions of python-gobject which do not ship glib * apt/package.py: Introduce the Version class - Deprecate Package.candidate*() and Package.installed*(), except for installedFiles. - Provide Version.get_source() (LP: #118788) - Provide Package.versions (Closes: #513236) * apt/progress/: New package, replaces apt.progress and apt.gtk - apt/progress/gtk2.py: Moved here from apt/gtk/widgets.py - apt/progress/__init__.py: Move here from apt/progress.py * doc/source/*: Improve the documentation - Document more attributes and functions of apt_pkg (they are all listed) * aptsources/distro.py: - use iso_3166.xml instead of iso_3166.tab - fix incorrect indent * debian/control: - add Recommends to iso-codes (for iso_3166.xml) * apt/package.py: - make sure to set the defaulttimeout back to the original value (in getChangelog(), LP: #314212) Closes: #513315 * apt/cache.py: - when setting a alternative rootdir, read the config from it as well * python/configuration.cc, python/apt_pkgmodule.cc: - add apt_pkg.ReadConfigDir() * python/cache.cc, tests/getcache_mem_corruption.py: - test if progress objects have the right methods and raise error if not (thanks to Emanuele Rocca) closes: #497049 * apt/package.py: - avoid uneeded interal references in the Package objects * aptsources/sourceslist.py: - fix bug in invalid lines detection (LP: #324614)
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index 1783d4cc..9ed21378 100755
--- a/setup.py
+++ b/setup.py
@@ -1,14 +1,14 @@
#! /usr/bin/env python
# $Id: setup.py,v 1.2 2002/01/08 07:13:21 jgg Exp $
-
-from distutils.core import setup, Extension
-from distutils.sysconfig import parse_makefile
-from DistUtilsExtra.command import build_extra, build_i18n
import glob
import os
import shutil
import sys
+from distutils.core import setup, Extension
+from distutils.sysconfig import parse_makefile
+from DistUtilsExtra.command import build_extra, build_i18n
+
# The apt_pkg module
files = map(lambda source: "python/"+source,
@@ -46,12 +46,12 @@ if len(sys.argv) > 1 and sys.argv[1] == "clean" and '-a' in sys.argv:
print "Not removing", dirname, "because it does not exist"
setup(name="python-apt",
- version="0.7.9",
description="Python bindings for APT",
+ version=os.environ.get('DEBVER'),
author="APT Development Team",
author_email="deity@lists.debian.org",
ext_modules=[apt_pkg, apt_inst],
- packages=['apt', 'apt.gtk', 'aptsources'],
+ packages=['apt', 'apt.progress', 'aptsources'],
data_files = [('share/python-apt/templates',
glob.glob('build/data/templates/*.info')),
('share/python-apt/templates',
@@ -64,6 +64,12 @@ setup(name="python-apt",
if (len(sys.argv) > 1 and sys.argv[1] == "build" and
sys.version_info[0] >= 2 and sys.version_info[1] >= 5):
import sphinx
+ try:
+ import pygtk
+ except ImportError:
+ print >> sys.stderr, ('W: Not building documentation because python-'
+ 'gtk2 is not available at the moment.')
+ sys.exit(0)
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",