diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-10-02 18:31:32 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-10-02 18:31:32 +0300 |
commit | 8169bbde6934637ed7be58e18103330c1d5e4546 (patch) | |
tree | 0d9ca014d272addf6fc72c3f51486244eb64f9dc /python/rpm/__init__.py | |
parent | bc9b86ae5c14e093078506b533cede3c5f1f5ab9 (diff) | |
download | librpm-tizen-8169bbde6934637ed7be58e18103330c1d5e4546.tar.gz librpm-tizen-8169bbde6934637ed7be58e18103330c1d5e4546.tar.bz2 librpm-tizen-8169bbde6934637ed7be58e18103330c1d5e4546.zip |
Split rpmbuild dependencies to separate _rpmb module
- installers and the like dont need the pile of poo called librpmbuild for
anything, avoid dragging it in needlessly
- import _rpmb into rpm namespace if available but dont complain if
its not there
- arrange ts.parseSpec() compatibility on python side by dynamically
importing _rpmb if possible
Diffstat (limited to 'python/rpm/__init__.py')
-rw-r--r-- | python/rpm/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/rpm/__init__.py b/python/rpm/__init__.py index 4a0c9b641..9faee8e35 100644 --- a/python/rpm/__init__.py +++ b/python/rpm/__init__.py @@ -15,6 +15,12 @@ _RPMVSF_NOHEADER = _rpm._RPMVSF_NOHEADER _RPMVSF_NOPAYLOAD = _rpm._RPMVSF_NOPAYLOAD _RPMVSF_NOSIGNATURES = _rpm._RPMVSF_NOSIGNATURES +# try to import build bits but dont require it +try: + from _rpmb import * +except ImportError: + pass + # backwards compatibility + give the same class both ways ts = TransactionSet |