misc: Use relative imports everywhere

Using 'mesonbuild' as the module can cause it to use the
system-installed module and can also break if we rename the directory,
so avoid that by always using relative imports.
pull/1149/head
Nirbheek Chauhan 8 years ago
parent 7b8f41ce31
commit b9a7c0cf39
  1. 11
      mesonbuild/backend/vs2010backend.py
  2. 8
      mesonbuild/interpreter.py
  3. 2
      mesonbuild/scripts/gettext.py
  4. 4
      mesonbuild/scripts/gtkdochelper.py
  5. 4
      mesonbuild/scripts/meson_install.py
  6. 2
      mesonbuild/scripts/regen_checker.py
  7. 6
      mesonbuild/scripts/yelphelper.py

@ -15,17 +15,16 @@
import os, sys import os, sys
import pickle import pickle
import re import re
import xml.dom.minidom
import xml.etree.ElementTree as ET
from mesonbuild import compilers
from mesonbuild.build import BuildTarget
from mesonbuild.mesonlib import File
from . import backends from . import backends
from .. import build from .. import build
from .. import dependencies from .. import dependencies
from .. import mlog from .. import mlog
import xml.etree.ElementTree as ET from .. import compilers
import xml.dom.minidom from ..build import BuildTarget
from ..mesonlib import MesonException from ..mesonlib import MesonException, File
from ..environment import Environment from ..environment import Environment
def split_o_flags_args(args): def split_o_flags_args(args):

@ -23,10 +23,10 @@ from . import compilers
from .wrap import wrap from .wrap import wrap
from . import mesonlib from . import mesonlib
from .dependencies import InternalDependency, Dependency from .dependencies import InternalDependency, Dependency
from mesonbuild.interpreterbase import InterpreterBase from .interpreterbase import InterpreterBase
from mesonbuild.interpreterbase import check_stringlist, noPosargs, noKwargs, stringArgs from .interpreterbase import check_stringlist, noPosargs, noKwargs, stringArgs
from mesonbuild.interpreterbase import InterpreterException, InvalidArguments, InvalidCode from .interpreterbase import InterpreterException, InvalidArguments, InvalidCode
from mesonbuild.interpreterbase import InterpreterObject, MutableInterpreterObject from .interpreterbase import InterpreterObject, MutableInterpreterObject
import os, sys, subprocess, shutil, uuid, re import os, sys, subprocess, shutil, uuid, re

@ -16,7 +16,7 @@ import os
import shutil import shutil
import argparse import argparse
import subprocess import subprocess
from mesonbuild.scripts import destdir_join from . import destdir_join
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('command') parser.add_argument('command')

@ -17,8 +17,8 @@ import sys, os
import subprocess import subprocess
import shutil import shutil
import argparse import argparse
from mesonbuild.mesonlib import MesonException from ..mesonlib import MesonException
from mesonbuild.scripts import destdir_join from . import destdir_join
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()

@ -16,8 +16,8 @@
import sys, pickle, os, shutil, subprocess, gzip, platform import sys, pickle, os, shutil, subprocess, gzip, platform
from glob import glob from glob import glob
from mesonbuild.scripts import depfixer from . import depfixer
from mesonbuild.scripts import destdir_join from . import destdir_join
install_log_file = None install_log_file = None

@ -29,7 +29,7 @@ def need_regen(regeninfo, regen_timestamp):
# We must make sure to recreate it, even if we do not regenerate the solution. # We must make sure to recreate it, even if we do not regenerate the solution.
# Otherwise, Visual Studio will always consider the REGEN project out of date. # Otherwise, Visual Studio will always consider the REGEN project out of date.
print("Everything is up-to-date, regeneration of build files is not needed.") print("Everything is up-to-date, regeneration of build files is not needed.")
from mesonbuild.backend.vs2010backend import Vs2010Backend from ..backend.vs2010backend import Vs2010Backend
Vs2010Backend.touch_regen_timestamp(regeninfo.build_dir) Vs2010Backend.touch_regen_timestamp(regeninfo.build_dir)
return False return False

@ -16,9 +16,9 @@ import sys, os
import subprocess import subprocess
import shutil import shutil
import argparse import argparse
from mesonbuild import mlog from .. import mlog
from mesonbuild.mesonlib import MesonException from ..mesonlib import MesonException
from mesonbuild.scripts import destdir_join from . import destdir_join
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('command') parser.add_argument('command')

Loading…
Cancel
Save