summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMichael Vogt <egon@bottom>2007-06-11 00:32:48 +0200
committerMichael Vogt <egon@bottom>2007-06-11 00:32:48 +0200
commit3c2d0313a45668770e7cb2993dc092fb4e711bb7 (patch)
treef427cec965fcd27822fae3617478768d4f0f26ea /setup.py
parenta1dcc6a2e3afe8c649c05273955331b97aa50c41 (diff)
parent2b26361164399ab739e694de6ad98f19055f6562 (diff)
downloadpython-apt-3c2d0313a45668770e7cb2993dc092fb4e711bb7.tar.gz
* build against the new apt
* support for new "aptsources" pythn module (thanks to Sebastian Heinlein) * merged support for translated package descriptions * merged support for automatic removal of unused dependencies * merged http://glatzor.de/bzr/python-apt/sebi: - this means that the new aptsources modules is available * support translated pacakge descriptions * support automatic dependency information * python/depcache.cc: - "IsGarbage()" method added (to support auto-mark)
Diffstat (limited to 'setup.py')
-rwxr-xr-x[-rw-r--r--]setup.py27
1 files changed, 23 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 5adb0376..99bc62c6 100644..100755
--- a/setup.py
+++ b/setup.py
@@ -3,8 +3,8 @@
from distutils.core import setup, Extension
from distutils.sysconfig import parse_makefile
-import string, glob
-
+from DistUtilsExtra.distutils_extra import build_extra, build_l10n
+import glob, os, string
# The apt_pkg module
files = map(lambda source: "python/"+source,
@@ -16,6 +16,18 @@ files = map(lambda source: "python/"+source,
string.split(parse_makefile("python/makefile")["APT_INST_SRC"]))
apt_inst = Extension("apt_inst", files, libraries=["apt-pkg","apt-inst"]);
+# Replace the leading _ that is used in the templates for translation
+templates = []
+if not os.path.exists("build/data/templates/"):
+ os.makedirs("build/data/templates")
+for template in glob.glob('data/templates/*.info.in'):
+ source = open(template, "r")
+ build = open(os.path.join("build", template[:-3]), "w")
+ lines = source.readlines()
+ for line in lines:
+ build.write(line.lstrip("_"))
+ source.close()
+ build.close()
setup(name="python-apt",
version="0.6.17",
@@ -23,6 +35,13 @@ setup(name="python-apt",
author="APT Development Team",
author_email="deity@lists.debian.org",
ext_modules=[apt_pkg,apt_inst],
- packages=['apt']
+ packages=['apt', 'aptsources'],
+ data_files = [('share/python-apt/templates',
+ glob.glob('build/data/templates/*.info')),
+ ('share/python-apt/templates',
+ glob.glob('data/templates/*.mirrors'))],
+ cmdclass = { "build" : build_extra,
+ "build_l10n" : build_l10n },
+ license = 'GNU GPL',
+ platforms = 'posix'
)
-