diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-04-16 20:06:14 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-04-16 20:06:14 +0200 |
| commit | 337c885e7dd531858c35b256d974989bac6463df (patch) | |
| tree | fdd82757c31340096016125dc7f5e06d87aa9d6c /python | |
| parent | 49c10e3b9f6760280761f1255f3182637ba0ac9e (diff) | |
| download | python-apt-337c885e7dd531858c35b256d974989bac6463df.tar.gz | |
* apt/*.py: Initial rename work for Bug#481061
A new module, apt.deprecation, is introduced containing functions and
classes which assist in the deprecation.
The apt_pkg extension gets a new attribute, _COMPAT_0_7 which can be set
by defining COMPAT_0_7 at compile time (-DCOMPAT_0_7).
The names are changed, and compatibility functions are enabled if
bool(apt_pkg._COMPAT_0_7) == True, i.e. if the package has been built with
backward compatibility fixes.
This commit changes the apt and aptsources packages, the apt_pkg and
apt_inst extensions will be the next renames.
Diffstat (limited to 'python')
| -rw-r--r-- | python/apt_pkgmodule.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index 3beec747..a056b0bc 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -589,6 +589,12 @@ extern "C" void initapt_pkg() AddInt(Dict,"InstStateReInstReq",pkgCache::State::ReInstReq); AddInt(Dict,"InstStateHold",pkgCache::State::Hold); AddInt(Dict,"InstStateHoldReInstReq",pkgCache::State::HoldReInstReq); + + #ifdef COMPAT_0_7 + AddInt(Dict,"_COMPAT_0_7",1); + #else + AddInt(Dict,"_COMPAT_0_7",0); + #endif #if PY_MAJOR_VERSION >= 3 return Module; #endif |
