Skip to content

Commit 930ea5c

Browse files
committed
Merge branch 'release/0.38.1' into release/0.38
2 parents 015f2fa + 69087b5 commit 930ea5c

File tree

3 files changed

+25
-21
lines changed

3 files changed

+25
-21
lines changed

cpt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
__version__ = '0.38.0'
2+
__version__ = '0.38.1'
33

44

55
def get_client_version():

cpt/packager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@ def run_builds(self, curpage=None, total_pages=None, base_profile_name=None,
709709
r.run()
710710
self._packages_summary.append({"configuration": build, "package" : r.results})
711711
else:
712+
if not base_profile_build_text:
713+
profile_build_text = None
712714
docker_image = self._get_docker_image(build)
713715
r = DockerCreateRunner(profile_text, base_profile_text, base_profile_name,
714716
build.reference,

cpt/profiles.py

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ def get_profiles(client_cache, build_config, base_profile_name=None, is_build_pr
1515
base_profile_path = os.path.join(client_cache.profiles_path, base_profile_name)
1616
base_profile_text = tools.load(base_profile_path)
1717
base_profile_name = base_profile_name or "default"
18-
tmp = """
18+
19+
if is_build_profile:
20+
profile_text = "include(%s)" % (base_profile_name)
21+
else:
22+
tmp = """
1923
include(%s)
2024
2125
[settings]
@@ -28,27 +32,25 @@ def get_profiles(client_cache, build_config, base_profile_name=None, is_build_pr
2832
%s
2933
"""
3034

31-
def pairs_lines(items):
32-
return "\n".join(["%s=%s" % (k, v) for k, v in items])
33-
if is_build_profile:
34-
settings=""
35-
options=""
36-
else:
35+
def pairs_lines(items):
36+
return "\n".join(["%s=%s" % (k, v) for k, v in items])
37+
3738
settings = pairs_lines(sorted(build_config.settings.items()))
3839
options = pairs_lines(build_config.options.items())
39-
env_vars = pairs_lines(build_config.env_vars.items())
40-
br_lines = ""
41-
for pattern, build_requires in build_config.build_requires.items():
42-
br_lines += "\n".join(["%s:%s" % (pattern, br) for br in build_requires])
43-
44-
if os.getenv("CONAN_BUILD_REQUIRES"):
45-
brs = os.getenv("CONAN_BUILD_REQUIRES").split(",")
46-
brs = ['*:%s' % br.strip() if ":" not in br else br for br in brs]
47-
if br_lines:
48-
br_lines += "\n"
49-
br_lines += "\n".join(brs)
50-
51-
profile_text = tmp % (base_profile_name, settings, options, env_vars, br_lines)
40+
env_vars = pairs_lines(build_config.env_vars.items())
41+
br_lines = ""
42+
for pattern, build_requires in build_config.build_requires.items():
43+
br_lines += "\n".join(["%s:%s" % (pattern, br) for br in build_requires])
44+
45+
if os.getenv("CONAN_BUILD_REQUIRES"):
46+
brs = os.getenv("CONAN_BUILD_REQUIRES").split(",")
47+
brs = ['*:%s' % br.strip() if ":" not in br else br for br in brs]
48+
if br_lines:
49+
br_lines += "\n"
50+
br_lines += "\n".join(brs)
51+
52+
profile_text = tmp % (base_profile_name, settings, options, env_vars, br_lines)
53+
5254
return profile_text, base_profile_text
5355

5456

0 commit comments

Comments
 (0)