diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-07-23 13:01:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-23 13:01:29 +0300 |
commit | 18aff92d7a9f110cc3c790c61c2ced85b8d81a26 (patch) | |
tree | ceae5df73681a1d844f49d283522d438fc3612f8 /mesonbuild/dependencies | |
parent | 587e159d6c96afd5ff32871e8ff99699b95f2802 (diff) | |
parent | 393d6e133d9abd584a2fc414971628e84ea48b7c (diff) | |
download | meson-18aff92d7a9f110cc3c790c61c2ced85b8d81a26.zip meson-18aff92d7a9f110cc3c790c61c2ced85b8d81a26.tar.gz meson-18aff92d7a9f110cc3c790c61c2ced85b8d81a26.tar.bz2 |
Merge pull request #7461 from mensinda/noMoreSetuptools
Remove the setuptools dependency with mesondata.py
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r-- | mesonbuild/dependencies/base.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py index 1bb71f7..c726a7e 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py @@ -29,8 +29,6 @@ import typing as T from enum import Enum from pathlib import Path, PurePath -import pkg_resources - from .. import mlog from .. import mesonlib from ..compilers import clib_langs @@ -40,6 +38,7 @@ from ..cmake import CMakeExecutor, CMakeTraceParser, CMakeException from ..mesonlib import MachineChoice, MesonException, OrderedSet, PerMachine from ..mesonlib import Popen_safe, version_compare_many, version_compare, listify, stringlistify, extract_as_list, split_args from ..mesonlib import Version, LibType +from ..mesondata import mesondata if T.TYPE_CHECKING: from ..compilers.compilers import CompilerType # noqa: F401 @@ -1522,8 +1521,7 @@ class CMakeDependency(ExternalDependency): build_dir = self._get_build_dir() # Insert language parameters into the CMakeLists.txt and write new CMakeLists.txt - # Per the warning in pkg_resources, this is *not* a path and os.path and Pathlib are *not* safe to use here. - cmake_txt = pkg_resources.resource_string('mesonbuild', 'dependencies/data/' + cmake_file).decode() + cmake_txt = mesondata['dependencies/data/' + cmake_file].data # In general, some Fortran CMake find_package() also require C language enabled, # even if nothing from C is directly used. An easy Fortran example that fails |