diff --git a/conan/packager.py b/conan/packager.py index 51e886b7..b0aa6046 100644 --- a/conan/packager.py +++ b/conan/packager.py @@ -90,8 +90,8 @@ def __init__(self, args=None, username=None, channel=None, runner=None, self.default_apple_clang_versions self.mingw_configurations = mingw_configurations or get_mingw_config_from_env() - self.mingw_installer_reference = ConanFileReference.loads(os.getenv("CONAN_MINGW_INSTALLER_REFERENCE") or \ - "mingw_installer/0.1@lasote/testing") + self.mingw_installer_reference = ConanFileReference.loads(os.getenv("CONAN_MINGW_INSTALLER_REFERENCE") or + "mingw_installer/0.1@lasote/testing") self.archs = archs or \ list(filter(None, os.getenv("CONAN_ARCHS", "").split(","))) or \ diff --git a/conan/test_package_runner.py b/conan/test_package_runner.py index 13ede95f..557b68ec 100644 --- a/conan/test_package_runner.py +++ b/conan/test_package_runner.py @@ -42,9 +42,18 @@ def run(self): self._run_test_package(pre_command=pre_command) + def _detected_compiler_override(self): + """If the user has specified some env var with CC or CXX""" + data = self._profile.env_values.data + for _, dict_envs in data.items(): + if "CC" in dict_envs or "CXX" in dict_envs: + logger.debug("Override compiler by CC or CXX, skipping compiler check") + return True + return False + def _run_test_package(self, pre_command=None): settings = collections.OrderedDict(sorted(self.settings.items())) - if platform.system() != "Windows": + if not self._detected_compiler_override() and platform.system() != "Windows": if settings.get("compiler", None) and settings.get("compiler.version", None): conan_compiler, conan_compiler_version = self.conan_compiler_info() if conan_compiler != settings.get("compiler", None) or \ diff --git a/setup.py b/setup.py index 80be8e77..f1d268f8 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def get_requires(filename): # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version="0.3.0", + version="0.3.1", description='Packaging tools for Conan C/C++ package manager',