It is not possilbe to use build profiles which has an include statemnt with a relative path. This happends becaus the the profile is directly copied into a tmp-folder. With in this folder the relative path is not invalid any more
Environment Details
Conan Package Tools Version: 0.36.0
Operating System: any
Conan version: conan 1.41.0
Python version: python 3.8.
Steps to reproduce (Include if Applicable)
install the following profiles:
vs2017:
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
os_target=Windows
arch_target=x86_64
compiler=Visual Studio
compiler.version=15
[options]
[build_requires]
[env]
Calling 'conan create'
+--------------------+----------------------------------------------------------------------------------+
| Configuration | value |
|--------------------+----------------------------------------------------------------------------------|
| name | ref16 |
| version | 0.9.2+26-ga7537f7-dirty |
| user | HOFF |
| channel | testing |
| build_modes | ['missing'] |
| profile_name | C:\Users\HOFF\AppData\Local\Temp\tmp4sto484xconan_package_tools_profiles\profile |
| profile_build_name | C:\Users\HOFF\AppData\Local\Temp\tmpquvb686fconan_package_tools_profiles\profile |
+--------------------+----------------------------------------------------------------------------------+
Traceback (most recent call last):
File "C:\Python38\lib\site-packages\conans\client\profile_loader.py", line 132, in read_profile
return _load_profile(text, profile_path, default_folder)
File "C:\Python38\lib\site-packages\conans\client\profile_loader.py", line 151, in _load_profile
profile, included_vars = read_profile(include, cwd, default_folder)
File "C:\Python38\lib\site-packages\conans\client\profile_loader.py", line 119, in read_profile
profile_path = get_profile_path(profile_name, default_folder, cwd)
File "C:\Python38\lib\site-packages\conans\client\profile_loader.py", line 98, in get_profile_path
return valid_path(profile_path, profile_name)
File "C:\Python38\lib\site-packages\conans\client\profile_loader.py", line 90, in valid_path
raise ConanException("Profile not found: {}".format(_profile_name or _profile_path))
conans.errors.ConanException: Profile not found: ./vs2017
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "Build\build.py", line 31, in
builder.run()
File "C:\Python38\lib\site-packages\cpt\packager.py", line 585, in run
self.run_builds(base_profile_name=base_profile_name,
File "C:\Python38\lib\site-packages\cpt\packager.py", line 698, in run_builds
r.run()
File "C:\Python38\lib\site-packages\cpt\runner.py", line 145, in run
self._results = self._conan_api.create(self._conanfile, name=name, version=version,
File "C:\Python38\lib\site-packages\conans\client\conan_api.py", line 93, in wrapper
return f(api, *args, **kwargs)
File "C:\Python38\lib\site-packages\conans\client\conan_api.py", line 363, in create
graph_info = get_graph_info(profile_host, profile_build, cwd, None,
File "C:\Python38\lib\site-packages\conans\client\conan_api.py", line 1577, in get_graph_info
pbuild = profile_from_args(profile_build.profiles, profile_build.settings,
File "C:\Python38\lib\site-packages\conans\client\profile_loader.py", line 267, in profile_fromargs
tmp, = read_profile(p, cwd, cache.profiles_path)
File "C:\Python38\lib\site-packages\conans\client\profile_loader.py", line 136, in read_profile
raise ConanException("Error reading '%s' profile: %s" % (profile_name, exc))
conans.errors.ConanException: Error reading 'C:\Users\HOFF\AppData\Local\Temp\tmpquvb686fconan_package_tools_profiles\profile' profile: Profile not found: ./vs2017
Description of Problem, Request, or Question
It is not possilbe to use build profiles which has an include statemnt with a relative path. This happends becaus the the profile is directly copied into a tmp-folder. With in this folder the relative path is not invalid any more
Environment Details
Steps to reproduce (Include if Applicable)
install the following profiles: vs2017: [settings] os=Windows os_build=Windows arch=x86_64 arch_build=x86_64 os_target=Windows arch_target=x86_64 compiler=Visual Studio compiler.version=15 [options] [build_requires] [env]
vs2017-release: include(./vs2017) [settings] build_type=Release
set CONAN_BASE_PROFILE and CONAN_BASE_PROFILE_BUILD to vs2017-release an try to build the package:
Build logs (Include if Available)
F:\git\ref16>python Build\build.py
/ | _ | / / / | | _ \ | | _ | |_ | | \ \ | | | |) || | | | | | / | ' \ / ` | ' \ | |) / ` |/ | |/ / ` |/ ` |/ \ | |/ \ / | / | | | | || / | | | | | || () | | | | (| | | | | | / (_| | (| < (| | (| | / | | () | () | _ \ | | ____|| || | | ____\/|| ||_,|| || || _,_|_||__,|_, |_| ||_/ \/|_|_/ | | _\ |_/ /_/
Version: 0.36.0
[local_vars] +---------------------------+--------------------------------------------+ | Configuration | value | |---------------------------+--------------------------------------------| | cwd | F:\git\ref16 | | skip_check_credentials | False | | upload_only_when_stable | False | | upload_only_when_tag | False | | upload_only_recipe | False | | upload_force | True | | stable_branch_pattern | master$ main$ release. stable. | | stable_channel | stable | | partial_reference | ref16/0.9.2+26-ga7537f7-dirty@HOFF/testing | | conanfile | conanfile.py | | use_docker | False | | docker_conan_home | /home/conan | | build_policy | missing | | sudo_docker_command | | | sudo_pip_command | | | pip_command | pip3 | | docker_pip_command | pip | | docker_shell | /bin/sh -c | | docker_platform_param | | | lcow_user_workaround | | | exclude_vcvars_precommand | False | | upload_dependencies | all | | update_dependencies | False | | docker_32_images | False | | force_selinux | False | | conan_pip_package | conan==1.41.0 | | vs10_x86_64_enabled | False | | builds_in_current_page | [] | | skip_recipe_export | False | +---------------------------+--------------------------------------------+
[pip_update] Page: 1/1 +-----+---------------+--------------+--------------------+--------------------+--------+----------------------+----------------+ | # | compiler | build_type | compiler.version | compiler.runtime | arch | ref16:build_client | ref16:shared | |-----+---------------+--------------+--------------------+--------------------+--------+----------------------+----------------| | 1 | Visual Studio | Release | 15 | MD | x86_64 | True | True | | 2 | Visual Studio | Release | 15 | MD | x86_64 | False | True | | 3 | Visual Studio | Release | 15 | MD | x86_64 | True | False | | 4 | Visual Studio | Release | 15 | MD | x86_64 | False | False | | 5 | Visual Studio | Debug | 15 | MDd | x86_64 | True | True | | 6 | Visual Studio | Debug | 15 | MDd | x86_64 | False | True | | 7 | Visual Studio | Debug | 15 | MDd | x86_64 | True | False | | 8 | Visual Studio | Debug | 15 | MDd | x86_64 | False | False | +-----+---------------+--------------+--------------------+--------------------+--------+----------------------+----------------+
+--------------------+
[conan_create]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "Build\build.py", line 31, in
builder.run()
File "C:\Python38\lib\site-packages\cpt\packager.py", line 585, in run
self.run_builds(base_profile_name=base_profile_name,
File "C:\Python38\lib\site-packages\cpt\packager.py", line 698, in run_builds
r.run()
File "C:\Python38\lib\site-packages\cpt\runner.py", line 145, in run
self._results = self._conan_api.create(self._conanfile, name=name, version=version,
File "C:\Python38\lib\site-packages\conans\client\conan_api.py", line 93, in wrapper
return f(api, *args, **kwargs)
File "C:\Python38\lib\site-packages\conans\client\conan_api.py", line 363, in create
graph_info = get_graph_info(profile_host, profile_build, cwd, None,
File "C:\Python38\lib\site-packages\conans\client\conan_api.py", line 1577, in get_graph_info
pbuild = profile_from_args(profile_build.profiles, profile_build.settings,
File "C:\Python38\lib\site-packages\conans\client\profile_loader.py", line 267, in profile_fromargs
tmp, = read_profile(p, cwd, cache.profiles_path)
File "C:\Python38\lib\site-packages\conans\client\profile_loader.py", line 136, in read_profile
raise ConanException("Error reading '%s' profile: %s" % (profile_name, exc))
conans.errors.ConanException: Error reading 'C:\Users\HOFF\AppData\Local\Temp\tmpquvb686fconan_package_tools_profiles\profile' profile: Profile not found: ./vs2017