Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly extract output name in presence of interpolations.
Browse files Browse the repository at this point in the history
whitequark committed Nov 27, 2017
1 parent 80a93a2 commit b6c2555
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions master.cfg
Original file line number Diff line number Diff line change
@@ -153,49 +153,49 @@ def addCondaBuildSteps(factory, project, package, is_xilinx=False, test=True):
locks = default_locks +
[conda_lock.access('exclusive')]))

build_cls = (XilinxCommand if is_xilinx else ShellCommand)
build_cmd = ['conda', 'build', '--python', '3.5',
WithProperties('%(dirsep)s'.join(['conda', package]))]
if not test:
build_cmd.append('--no-test')
factory.addStep(
build_cls(
name = 'conda_build',
command = build_cmd,
description = ['building', WithProperties(package)],
descriptionDone = ['build', WithProperties(package)],
haltOnFailure = True,
timeout = 60*60*4,
env = condaEnv(),
locks = default_locks +
[conda_lock.access('exclusive')]))

def extract_output_names(rc, stdout, stderr):
output_filename = stdout.strip()
output_version = output_filename. \
def extractOutputNames(rc, stdout, stderr):
filename = stdout.strip()
name, version, build = output_filename. \
split('/')[-1]. \
replace('.tar.bz2', ''). \
replace(package + '-', ''). \
replace('-', '=')
output_name = package + '=' + output_version
rsplit('-', 2)
return {
'output_version': output_version,
'output_name': output_name,
'output_filename': output_filename,
'output_filename': filename,
'output_name': name,
'output_version': version,
'output_build': build,
}

factory.addStep(
SetPropertyFromCommand(
name = 'conda_build_output',
command = build_cmd + ['--output'],
extract_fn = extract_output_names,
extract_fn = extractOutputNames,
description = 'querying',
descriptionSuffix = 'output name',
haltOnFailure = True,
env = condaEnv(),
locks = default_locks +
[conda_lock.access('exclusive')]))

build_cls = (XilinxCommand if is_xilinx else ShellCommand)
factory.addStep(
build_cls(
name = 'conda_build',
command = build_cmd,
description = ['building', WithProperties(package)],
descriptionDone = ['build', WithProperties(package)],
haltOnFailure = True,
timeout = 60*60*4,
env = condaEnv(),
locks = default_locks +
[conda_lock.access('exclusive')]))

def addCondaUploadSteps(factory, channels, force=False):
factory.addStep(
ShellCommand(

0 comments on commit b6c2555

Please sign in to comment.