From cece83b131202c9557fa332332b8cf85c2170eb8 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 8 Mar 2009 19:09:47 +0100 Subject: * setup.py: Remove apt.gtk, add apt.progress --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 6a22734d..fc046381 100755 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ setup(name="python-apt", 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', -- cgit v1.2.3 From 10858f98f759a2407ac596582687581a2ed33d34 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 29 Mar 2009 16:35:39 +0200 Subject: Build-Depend on python-debian, use it to get version number from changelog --- debian/changelog | 6 ++++++ debian/control | 11 ++++++++++- doc/source/conf.py | 7 +++++-- setup.py | 22 +++++++++++++++++----- 4 files changed, 38 insertions(+), 8 deletions(-) (limited to 'setup.py') diff --git a/debian/changelog b/debian/changelog index f996ef5b..3f7b420d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-apt (0.7.10~exp1) experimental; urgency=low + + * Build-Depend on python-debian, use it to get version number from changelog + + -- Julian Andres Klode Sun, 29 Mar 2009 14:09:18 +0200 + python-apt (0.7.9) unstable; urgency=low [ Julian Andres Klode ] diff --git a/debian/control b/debian/control index 41e3af4a..932a2b4f 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,16 @@ Maintainer: APT Development Team Uploaders: Matt Zimmerman , Michael Vogt Standards-Version: 3.7.2.2 XS-Python-Version: all -Build-Depends: debhelper (>= 5.0.37.1), libapt-pkg-dev (>= 0.7.10), apt-utils, python-all-dev, python-distutils-extra (>= 1.9.0), cdbs, python-central (>= 0.5), python-all-dbg, python-sphinx (>= 0.5) +Build-Depends: apt-utils, + cdbs, + debhelper (>= 5.0.37.1), + libapt-pkg-dev (>= 0.7.10), + python-all-dbg, + python-all-dev, + python-central (>= 0.5), + python-debian, + python-distutils-extra (>= 1.9.0), + python-sphinx (>= 0.5) Vcs-Bzr: http://bzr.debian.org/apt/python-apt/debian-sid Vcs-Browser: http://bzr.debian.org/loggerhead/apt/python-apt/debian-sid/changes diff --git a/doc/source/conf.py b/doc/source/conf.py index 3b0ebed7..17fe6a23 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -56,10 +56,13 @@ copyright = u'2009, Julian Andres Klode ' # |version| and |release|, also used in various other places throughout the # built documents. # +from debian_bundle.changelog import Changelog + +changes = Changelog(open('../../debian/changelog')) # The short X.Y version. -version = '0.7' +version = '.'.join(changes.full_version.split('.')[:2]) # The full version, including alpha/beta/rc tags. -release = '0.7.9~exp3' +release = changes.full_version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index fc046381..1c266ce7 100755 --- a/setup.py +++ b/setup.py @@ -1,14 +1,26 @@ #! /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 + + +class FakeDebianSupportModule(object): + """Work around the python-apt dependency of debian_support.""" + + class Version(object): + """Empty class.""" + +sys.modules['debian_bundle.debian_support'] = FakeDebianSupportModule + +from debian_bundle.changelog import Changelog + + # The apt_pkg module files = map(lambda source: "python/"+source, @@ -46,7 +58,7 @@ 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", + version=Changelog(open('debian/changelog')).full_version, description="Python bindings for APT", author="APT Development Team", author_email="deity@lists.debian.org", -- cgit v1.2.3 From 192a186f6613f02e0fcef12da11412ec6001ed8c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 1 Apr 2009 17:11:16 +0200 Subject: * 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. --- debian/changelog | 4 ++++ debian/control | 4 +++- doc/source/conf.py | 6 +++++- setup.py | 5 +++++ 4 files changed, 17 insertions(+), 2 deletions(-) (limited to 'setup.py') diff --git a/debian/changelog b/debian/changelog index 91ce7304..4bc94036 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,10 @@ python-apt (0.7.10~exp1) experimental; urgency=low - Update Standards-Version to 3.8.1 - Use ${binary:Version} instead of ${Source-Version} * 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. -- Julian Andres Klode Wed, 01 Apr 2009 15:24:29 +0200 diff --git a/debian/control b/debian/control index 9afd50e0..c06611e2 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,9 @@ Build-Depends: apt-utils, python-central (>= 0.5), python-debian, python-distutils-extra (>= 1.9.0), - python-sphinx (>= 0.5) + python-gtk2, + python-sphinx (>= 0.5), + python-vte Vcs-Bzr: http://bzr.debian.org/apt/python-apt/debian-sid Vcs-Browser: http://bzr.debian.org/loggerhead/apt/python-apt/debian-sid/changes diff --git a/doc/source/conf.py b/doc/source/conf.py index 17fe6a23..40154a6f 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -23,9 +23,13 @@ import sys # absolute, like shown here. sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('../..')) + +# Find the path to the built apt_pkg and apt_inst extensions if os.path.exists("../../build"): + version = '.'.join(str(x) for x in sys.version_info[:2]) for dirname in os.listdir('../../build'): - sys.path.insert(0, os.path.abspath('../../build/' + dirname)) + if version in dirname: + sys.path.insert(0, os.path.abspath('../../build/' + dirname)) # General configuration # --------------------- diff --git a/setup.py b/setup.py index 1c266ce7..3d378050 100755 --- a/setup.py +++ b/setup.py @@ -75,6 +75,11 @@ setup(name="python-apt", if len(sys.argv) > 1 and sys.argv[1] == "build": import sphinx + try: + import pygtk + except ImportError: + print >> sys.stderr, 'E: python-gtk2 is required to build documentation.' + 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", -- cgit v1.2.3 From f4ad2eba9cb8a84903691d6f31b5b90e07fb5ae3 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 10 Apr 2009 17:51:01 +0200 Subject: Fix FTBFS with python-debian (>= 0.1.13) on Python 2.4 by not using it to get a version number in setup.py (Closes: #523473) --- debian/changelog | 7 +++++++ setup.py | 16 ++-------------- 2 files changed, 9 insertions(+), 14 deletions(-) (limited to 'setup.py') diff --git a/debian/changelog b/debian/changelog index 04d6a5d5..7f4a0203 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-apt (0.7.10.1) unstable; urgency=low + + * Fix FTBFS with python-debian (>= 0.1.13) on Python 2.4 by not using it to + get a version number in setup.py (Closes: #523473) + + -- Julian Andres Klode Fri, 10 Apr 2009 15:27:28 +0200 + python-apt (0.7.10) unstable; urgency=low * Build-Depend on python-debian, use it to get version number from changelog diff --git a/setup.py b/setup.py index 3d378050..2fd29953 100755 --- a/setup.py +++ b/setup.py @@ -10,18 +10,6 @@ from distutils.sysconfig import parse_makefile from DistUtilsExtra.command import build_extra, build_i18n -class FakeDebianSupportModule(object): - """Work around the python-apt dependency of debian_support.""" - - class Version(object): - """Empty class.""" - -sys.modules['debian_bundle.debian_support'] = FakeDebianSupportModule - -from debian_bundle.changelog import Changelog - - - # The apt_pkg module files = map(lambda source: "python/"+source, parse_makefile("python/makefile")["APT_PKG_SRC"].split()) @@ -58,7 +46,6 @@ 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=Changelog(open('debian/changelog')).full_version, description="Python bindings for APT", author="APT Development Team", author_email="deity@lists.debian.org", @@ -78,7 +65,8 @@ if len(sys.argv) > 1 and sys.argv[1] == "build": try: import pygtk except ImportError: - print >> sys.stderr, 'E: python-gtk2 is required to build documentation.' + 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"]) -- cgit v1.2.3 From 3bbb577e8a47ed05041c2532531e0e263f821c2c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 12 Apr 2009 19:10:48 +0200 Subject: 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. --- debian/changelog | 3 +++ debian/rules | 1 + setup.py | 1 + 3 files changed, 5 insertions(+) (limited to 'setup.py') diff --git a/debian/changelog b/debian/changelog index 20d2167a..d9258436 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ python-apt (0.7.10.2) unstable; urgency=low * 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. -- Julian Andres Klode Sun, 12 Apr 2009 19:00:07 +0200 diff --git a/debian/rules b/debian/rules index a2802ea7..6d709ecd 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,7 @@ 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) +export DEBVER build/python-apt-dbg:: set -e; \ diff --git a/setup.py b/setup.py index 2fd29953..2afd0708 100755 --- a/setup.py +++ b/setup.py @@ -47,6 +47,7 @@ if len(sys.argv) > 1 and sys.argv[1] == "clean" and '-a' in sys.argv: setup(name="python-apt", 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], -- cgit v1.2.3