aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/rpm.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-12-14 22:13:38 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-12-15 04:12:23 +0530
commite6f48a03fc989119bb56ea5c7b748f99f0404b5b (patch)
tree513eeafe3c392ae4b01f7c844238b5f735b0e582 /mesonbuild/modules/rpm.py
parent330d9ba7fef6e3a9994eab66139af601741df379 (diff)
downloadmeson-e6f48a03fc989119bb56ea5c7b748f99f0404b5b.zip
meson-e6f48a03fc989119bb56ea5c7b748f99f0404b5b.tar.gz
meson-e6f48a03fc989119bb56ea5c7b748f99f0404b5b.tar.bz2
Allow all code to access module target classes
It is often useful to be able to check if a specific object is of a type defined in a module. To that end, define all such targets in modules/__init__.py so that everyone can refer to them without poking into module-specific code.
Diffstat (limited to 'mesonbuild/modules/rpm.py')
-rw-r--r--mesonbuild/modules/rpm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/modules/rpm.py b/mesonbuild/modules/rpm.py
index dca1ad6..a0f79aa 100644
--- a/mesonbuild/modules/rpm.py
+++ b/mesonbuild/modules/rpm.py
@@ -19,7 +19,7 @@ from .. import build
from .. import compilers
import datetime
from .. import mlog
-from ..modules import gnome
+from . import GirTarget, TypelibTarget
import os
@@ -65,9 +65,9 @@ class RPMModule:
to_delete.add('%%{buildroot}%%{_libdir}/%s' % target.get_filename())
mlog.warning('removing', mlog.bold(target.get_filename()),
'from package because packaging static libs not recommended')
- elif isinstance(target, gnome.GirTarget) and target.should_install():
+ elif isinstance(target, GirTarget) and target.should_install():
files_devel.add('%%{_datadir}/gir-1.0/%s' % target.get_filename()[0])
- elif isinstance(target, gnome.TypelibTarget) and target.should_install():
+ elif isinstance(target, TypelibTarget) and target.should_install():
files.add('%%{_libdir}/girepository-1.0/%s' % target.get_filename()[0])
for header in state.headers:
if len(header.get_install_subdir()) > 0: