summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-03-29 16:35:39 +0200
committerJulian Andres Klode <jak@debian.org>2009-03-29 16:35:39 +0200
commit10858f98f759a2407ac596582687581a2ed33d34 (patch)
tree52f72f772ee855bbc34c9b2ab72c0365f3754214 /setup.py
parentcb5d0d7f1f3f0730a8ed2fbc982311b6fe3aa336 (diff)
downloadpython-apt-10858f98f759a2407ac596582687581a2ed33d34.tar.gz
Build-Depend on python-debian, use it to get version number from changelog
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py22
1 files changed, 17 insertions, 5 deletions
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",