From 8f162aebf9a031921bba326c70291b3aa60931e1 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Wed, 26 Jul 2017 17:02:08 -0400 Subject: Only patch conda-build 2.x for bugfix now in conda-build 3.x --- jenkins/dispatch.groovy | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index edd873b..24545a3 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -162,13 +162,18 @@ node(LABEL) { def cpkgs = "conda=${CONDA_VERSION} conda-build=${CONDA_BUILD_VERSION}" sh "conda install --quiet --yes ${cpkgs} python=${PY_VERSION}" - // Apply bugfix patch to conda_build 2.1.1 - 2.1.15 - (?) - def filename = "${env.WORKSPACE}/miniconda/lib/python${PY_VERSION}/" + - "site-packages/conda_build/config.py" - def patches_dir = "${env.WORKSPACE}/patches" - def patchname = "conda_build_2.1.1_substr_fix_py${this.py_maj_version}.patch" - def full_patchname = "${patches_dir}/${patchname}" - sh "patch ${filename} ${full_patchname}" + // Apply bugfix patch only to conda_build 2.1.1 - 2.1.15 - (?) + conda_build_version = sh(script: "conda-build --version", returnStdout: true) + conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0] + println("conda_build_maj_ver = ${conda_build_maj_ver}") + if (conda_build_major_ver == "2") { + def filename = "${env.WORKSPACE}/miniconda/lib/python${PY_VERSION}/" + + "site-packages/conda_build/config.py" + def patches_dir = "${env.WORKSPACE}/patches" + def patchname = "conda_build_2.1.1_substr_fix_py${this.py_maj_version}.patch" + def full_patchname = "${patches_dir}/${patchname}" + sh "patch ${filename} ${full_patchname}" + } // Install support tools dir(this.utils_dir) { -- cgit From f094f4fff2ef58d6b86a1ecadcb52e92d4d1f489 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Wed, 26 Jul 2017 17:07:03 -0400 Subject: Typo fix --- jenkins/dispatch.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index 24545a3..bc83beb 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -163,10 +163,10 @@ node(LABEL) { sh "conda install --quiet --yes ${cpkgs} python=${PY_VERSION}" // Apply bugfix patch only to conda_build 2.1.1 - 2.1.15 - (?) - conda_build_version = sh(script: "conda-build --version", returnStdout: true) - conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0] + def conda_build_version = sh(script: "conda-build --version", returnStdout: true) + def conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0] println("conda_build_maj_ver = ${conda_build_maj_ver}") - if (conda_build_major_ver == "2") { + if (conda_build_maj_ver == "2") { def filename = "${env.WORKSPACE}/miniconda/lib/python${PY_VERSION}/" + "site-packages/conda_build/config.py" def patches_dir = "${env.WORKSPACE}/patches" -- cgit From f76e160c08293e68a5c407fec24667acd769072a Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Wed, 26 Jul 2017 17:10:35 -0400 Subject: Better output --- jenkins/dispatch.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index bc83beb..f407d2e 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -162,11 +162,11 @@ node(LABEL) { def cpkgs = "conda=${CONDA_VERSION} conda-build=${CONDA_BUILD_VERSION}" sh "conda install --quiet --yes ${cpkgs} python=${PY_VERSION}" - // Apply bugfix patch only to conda_build 2.1.1 - 2.1.15 - (?) + // Apply bugfix patch only to conda_build 2.x def conda_build_version = sh(script: "conda-build --version", returnStdout: true) def conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0] - println("conda_build_maj_ver = ${conda_build_maj_ver}") if (conda_build_maj_ver == "2") { + println("conda_build_maj_ver ${conda_build_maj_ver} detected. Applying bugfix patch.") def filename = "${env.WORKSPACE}/miniconda/lib/python${PY_VERSION}/" + "site-packages/conda_build/config.py" def patches_dir = "${env.WORKSPACE}/patches" -- cgit From 4d3db8f8ac12dbb6baf00dc6afe15135ba8404ce Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Wed, 26 Jul 2017 17:12:46 -0400 Subject: Better output --- jenkins/dispatch.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/dispatch.groovy b/jenkins/dispatch.groovy index f407d2e..7dd09e0 100644 --- a/jenkins/dispatch.groovy +++ b/jenkins/dispatch.groovy @@ -166,7 +166,7 @@ node(LABEL) { def conda_build_version = sh(script: "conda-build --version", returnStdout: true) def conda_build_maj_ver = conda_build_version.tokenize()[1].tokenize('.')[0] if (conda_build_maj_ver == "2") { - println("conda_build_maj_ver ${conda_build_maj_ver} detected. Applying bugfix patch.") + println("conda-build major version ${conda_build_maj_ver} detected. Applying bugfix patch.") def filename = "${env.WORKSPACE}/miniconda/lib/python${PY_VERSION}/" + "site-packages/conda_build/config.py" def patches_dir = "${env.WORKSPACE}/patches" -- cgit