aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
authorMax <maktrefa@gmail.com>2020-02-05 22:16:26 +0300
committerGitHub <noreply@github.com>2020-02-05 21:16:26 +0200
commit3d70e3bc63e1d207138d9664283e19444ec1c35a (patch)
tree7b78c798f6ddcafff6ef71de5f963035ade6047e /mesonbuild/dependencies/base.py
parentdc8d2415836953a8e7fbb06931d34caab1bb2bfb (diff)
downloadmeson-3d70e3bc63e1d207138d9664283e19444ec1c35a.zip
meson-3d70e3bc63e1d207138d9664283e19444ec1c35a.tar.gz
meson-3d70e3bc63e1d207138d9664283e19444ec1c35a.tar.bz2
Fix import dependency from dub
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index d014415..a83e3d6 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -1661,6 +1661,14 @@ class DubDependency(ExternalDependency):
lib_file_name = os.path.basename(default_path)
module_build_path = os.path.join(module_path, '.dub', 'build')
+ # If default_path is a path to lib file and
+ # directory of lib don't have subdir '.dub/build'
+ if not os.path.isdir(module_build_path) and os.path.isfile(default_path):
+ if folder_only:
+ return module_path
+ else:
+ return default_path
+
# Get D version implemented in the compiler
# gdc doesn't support this
ret, res = self._call_dubbin(['--version'])