From 6542e4833b9d3ffbe518b28d2b45d11f829503d8 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 14 Feb 2020 15:10:54 -0600 Subject: [PATCH 01/69] Use git url --- build_tools/azure/meta_template.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 53f887d00..31f41af8e 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -5,7 +5,7 @@ package: {# Path where setup.py lies from root/conda (since that is where this will be rendered) #} source: - path: ../ + git_url: ../ build: string: 'py{{ py_version }}' From 1e68d9742743a16238ca9f486dcdb5c8b582d144 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 14 Feb 2020 15:13:06 -0600 Subject: [PATCH 02/69] Change windows --- build_tools/azure/meta_template.yml.j2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 31f41af8e..9979bd79e 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -8,9 +8,11 @@ source: git_url: ../ build: - string: 'py{{ py_version }}' + {% raw %}} + number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} + {% endraw %} script: 'python -m pip install dist/{{ wheel }} --no-deps -vv' # [not win] - script: 'python setup.py install' # [win] + script: 'python -m pip install --no-deps --ignore-installed .' # [win] ignore_run_exports: - pip - statsmodels From 9040f5b4dc64ba7cad8b349d1f6de4d5209e04ef Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Fri, 14 Feb 2020 15:17:18 -0600 Subject: [PATCH 03/69] Remove extra curly brace --- build_tools/azure/meta_template.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 9979bd79e..34aa5c2bd 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -8,7 +8,7 @@ source: git_url: ../ build: - {% raw %}} + {% raw %} number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} script: 'python -m pip install dist/{{ wheel }} --no-deps -vv' # [not win] From 7a0be70dbd03d575eb12ae9b93e6b8ae3bf53c1c Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 08:46:20 -0600 Subject: [PATCH 04/69] Temp changes for local testing --- build_tools/azure/meta_template.yml.j2 | 4 ++-- build_tools/azure/render_meta.py | 15 +++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 34aa5c2bd..3c3a81d74 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -10,9 +10,9 @@ source: build: {% raw %} number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} + string: py{{ PY_VER }}{{ environ.get('GIT_DESCRIBE_TAG', '') }} {% endraw %} - script: 'python -m pip install dist/{{ wheel }} --no-deps -vv' # [not win] - script: 'python -m pip install --no-deps --ignore-installed .' # [win] + script: 'python -m pip install --no-deps --ignore-installed .' ignore_run_exports: - pip - statsmodels diff --git a/build_tools/azure/render_meta.py b/build_tools/azure/render_meta.py index 1163c6c14..170d5601e 100644 --- a/build_tools/azure/render_meta.py +++ b/build_tools/azure/render_meta.py @@ -5,7 +5,7 @@ from pathlib import Path # Since conda is only on Azure Pipelines, we can use their env variables -ROOT_DIRECTORY = Path(os.getenv('BUILD_SOURCESDIRECTORY')) +ROOT_DIRECTORY = Path('/pmdarima') #Path(os.getenv('BUILD_SOURCESDIRECTORY')) DIST_PATH = ROOT_DIRECTORY / 'dist' VERSION_FILE = ROOT_DIRECTORY / 'pmdarima' / 'VERSION' REQUIREMENTS_FILE = ROOT_DIRECTORY / 'requirements.txt' @@ -31,12 +31,12 @@ with open(str(REQUIREMENTS_FILE.resolve())) as file: requirements = [line.strip() for line in file.readlines()] -# We build from source on windows, otherwise, we looks for a wheel -if sys.platform != 'win32': - wheel = next(file for file in os.listdir(str(DIST_PATH.resolve())) - if file.endswith('.whl')) -else: - wheel = None +# # We build from source on windows, otherwise, we looks for a wheel +# if sys.platform != 'win32': +# wheel = next(file for file in os.listdir(str(DIST_PATH.resolve())) +# if file.endswith('.whl')) +# else: +# wheel = None # Numpy version is used for building numpy_version = next(package for package in requirements if 'numpy' in package) @@ -46,7 +46,6 @@ 'requirements': requirements, 'numpy_version': numpy_version, 'VERSION': VERSION, - 'wheel': wheel, 'py_version': '{0.major}{0.minor}'.format(sys.version_info) } From b062293284056f4323f852d603faef12380d87b1 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 09:05:05 -0600 Subject: [PATCH 05/69] Specify python version --- build_tools/azure/meta_template.yml.j2 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 3c3a81d74..420878b77 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -10,7 +10,6 @@ source: build: {% raw %} number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} - string: py{{ PY_VER }}{{ environ.get('GIT_DESCRIBE_TAG', '') }} {% endraw %} script: 'python -m pip install --no-deps --ignore-installed .' ignore_run_exports: @@ -26,6 +25,9 @@ build: requirements: build: + {% raw %} + - python {{ PY_VER }} + (% endraw %) - {{ numpy_version }} {% raw %} - {{ compiler('c') }} @@ -33,13 +35,17 @@ build: host: - pip - - python + {% raw %} + - python {{ PY_VER }} + (% endraw %) {% for package in requirements %} - {{ package }} {% endfor %} run: - - python + {% raw %} + - python {{ PY_VER }} + (% endraw %) {% for package in requirements %} - {{ package }} {% endfor %} From 340739213d9142e87961077546c59d35aa3daeca Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 09:06:57 -0600 Subject: [PATCH 06/69] Use curly braces... --- build_tools/azure/meta_template.yml.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 420878b77..25ad6f9fd 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -27,7 +27,7 @@ build: build: {% raw %} - python {{ PY_VER }} - (% endraw %) + {% endraw %} - {{ numpy_version }} {% raw %} - {{ compiler('c') }} @@ -37,7 +37,7 @@ build: - pip {% raw %} - python {{ PY_VER }} - (% endraw %) + {% endraw %} {% for package in requirements %} - {{ package }} {% endfor %} @@ -45,7 +45,7 @@ build: run: {% raw %} - python {{ PY_VER }} - (% endraw %) + {% endraw %} {% for package in requirements %} - {{ package }} {% endfor %} From aa99a5887153aed87a0e17484e14adfc9449e469 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 09:11:24 -0600 Subject: [PATCH 07/69] Add root path back --- build_tools/azure/render_meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/render_meta.py b/build_tools/azure/render_meta.py index 170d5601e..3beb5de28 100644 --- a/build_tools/azure/render_meta.py +++ b/build_tools/azure/render_meta.py @@ -5,7 +5,7 @@ from pathlib import Path # Since conda is only on Azure Pipelines, we can use their env variables -ROOT_DIRECTORY = Path('/pmdarima') #Path(os.getenv('BUILD_SOURCESDIRECTORY')) +ROOT_DIRECTORY = Path(os.getenv('BUILD_SOURCESDIRECTORY')) DIST_PATH = ROOT_DIRECTORY / 'dist' VERSION_FILE = ROOT_DIRECTORY / 'pmdarima' / 'VERSION' REQUIREMENTS_FILE = ROOT_DIRECTORY / 'requirements.txt' From 06ae23f7644d586ac227445dc9d5a6e12252652e Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 09:22:56 -0600 Subject: [PATCH 08/69] Add string back --- build_tools/azure/meta_template.yml.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 25ad6f9fd..ba2c240e5 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -10,6 +10,7 @@ source: build: {% raw %} number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} + string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }} {% endraw %} script: 'python -m pip install --no-deps --ignore-installed .' ignore_run_exports: From d32b9b459ee4ba6f7e5c8b2c934abdf2d6a337d6 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 09:31:20 -0600 Subject: [PATCH 09/69] Add check step --- build_tools/azure/conda/windows.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 76fbb3daf..3190175ce 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -31,3 +31,12 @@ steps: conda install --use-local pmdarima --yes python -c "import pmdarima; pmdarima.show_versions()" displayName: 'Testing conda installation' + + - bash: | + output_file=$(conda-build --output --python=$(python.version) conda/) + tar xjf $output_file + local_file=$(find . -type f -iname "pmdarima-0.0.0*") + cd $local_file + ls + displayName: 'Looking for lib folder' + From 2519b0ae613596f0cd7d8c02006748112f705be2 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 10:10:47 -0600 Subject: [PATCH 10/69] Activate env --- build_tools/azure/conda/windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 3190175ce..2f83d0c5a 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -33,6 +33,7 @@ steps: displayName: 'Testing conda installation' - bash: | + source activate build-env output_file=$(conda-build --output --python=$(python.version) conda/) tar xjf $output_file local_file=$(find . -type f -iname "pmdarima-0.0.0*") From 476f8740dd26c545e8b3a5943d6bb2891d1af615 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 10:17:15 -0600 Subject: [PATCH 11/69] Update string --- build_tools/azure/meta_template.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index ba2c240e5..1bcc8ca06 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -10,7 +10,7 @@ source: build: {% raw %} number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} - string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }} + string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} script: 'python -m pip install --no-deps --ignore-installed .' ignore_run_exports: From 18c430e24cc1b5bcb36bf664605c567754418e13 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 10:20:19 -0600 Subject: [PATCH 12/69] Try double quotes --- build_tools/azure/conda/windows.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 2f83d0c5a..c61bbe89b 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -35,9 +35,9 @@ steps: - bash: | source activate build-env output_file=$(conda-build --output --python=$(python.version) conda/) - tar xjf $output_file + tar xjf "$output_file" local_file=$(find . -type f -iname "pmdarima-0.0.0*") - cd $local_file + cd "$local_file" ls displayName: 'Looking for lib folder' From 12ca1c6188d55ff450e0b002ef580f30f11a5240 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 10:28:55 -0600 Subject: [PATCH 13/69] Add echo --- build_tools/azure/conda/windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index c61bbe89b..3e5b0ed42 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -35,6 +35,7 @@ steps: - bash: | source activate build-env output_file=$(conda-build --output --python=$(python.version) conda/) + echo "$output_file" tar xjf "$output_file" local_file=$(find . -type f -iname "pmdarima-0.0.0*") cd "$local_file" From 3bdf928cf3deb7be11936ff6fe75acb869658900 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 10:39:28 -0600 Subject: [PATCH 14/69] Try adding ls to mac --- build_tools/azure/conda/mac.yml | 10 ++++++++++ build_tools/azure/conda/windows.yml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/conda/mac.yml b/build_tools/azure/conda/mac.yml index 1b9219da9..661db5658 100644 --- a/build_tools/azure/conda/mac.yml +++ b/build_tools/azure/conda/mac.yml @@ -37,3 +37,13 @@ steps: conda install --use-local pmdarima --yes python -c "import pmdarima; pmdarima.show_versions()" displayName: 'Testing conda installation' + + - bash: | + source activate build-env + output_file=$(conda-build --output --python=$(python.version) conda/) + echo "$output_file" + tar xjvf "$output_file" + local_file=$(find . -type f -iname "pmdarima-0.0.0*") + cd "$local_file" + ls + displayName: 'Looking for lib folder' diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 3e5b0ed42..ec6ee0f82 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -36,7 +36,7 @@ steps: source activate build-env output_file=$(conda-build --output --python=$(python.version) conda/) echo "$output_file" - tar xjf "$output_file" + tar xjvf "$output_file" local_file=$(find . -type f -iname "pmdarima-0.0.0*") cd "$local_file" ls From 646c1894c2ae5852c2fc9b5d2d16801c01fa2ed0 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 10:52:16 -0600 Subject: [PATCH 15/69] Change gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3675d9552..6936270af 100644 --- a/.gitignore +++ b/.gitignore @@ -128,4 +128,4 @@ ENV/ VERSION # Since we use a Jinja Template, we only want this to be created as build time -/conda/ +meta.yaml From 7021c641374bfcfa362d9d4f0d7fbfa7873f3a66 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 10:54:20 -0600 Subject: [PATCH 16/69] Try bld files? --- conda/bld.bat | 2 ++ conda/bld.sh | 1 + 2 files changed, 3 insertions(+) create mode 100644 conda/bld.bat create mode 100644 conda/bld.sh diff --git a/conda/bld.bat b/conda/bld.bat new file mode 100644 index 000000000..b3fdf9b0b --- /dev/null +++ b/conda/bld.bat @@ -0,0 +1,2 @@ +python setup.py install +if errorlevel 1 exit 1 \ No newline at end of file diff --git a/conda/bld.sh b/conda/bld.sh new file mode 100644 index 000000000..aa8a1fc34 --- /dev/null +++ b/conda/bld.sh @@ -0,0 +1 @@ +python setup.py install \ No newline at end of file From 3b1fd2fdf16c13f3ea21490e24630d1a7cec83d0 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Sat, 15 Feb 2020 11:25:04 -0600 Subject: [PATCH 17/69] Try removing ignore installed --- build_tools/azure/meta_template.yml.j2 | 2 +- conda/bld.bat | 2 -- conda/bld.sh | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 conda/bld.bat delete mode 100644 conda/bld.sh diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 1bcc8ca06..8fcdb5891 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,7 +12,7 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - script: 'python -m pip install --no-deps --ignore-installed .' + script: 'python -m pip install --no-deps .' ignore_run_exports: - pip - statsmodels diff --git a/conda/bld.bat b/conda/bld.bat deleted file mode 100644 index b3fdf9b0b..000000000 --- a/conda/bld.bat +++ /dev/null @@ -1,2 +0,0 @@ -python setup.py install -if errorlevel 1 exit 1 \ No newline at end of file diff --git a/conda/bld.sh b/conda/bld.sh deleted file mode 100644 index aa8a1fc34..000000000 --- a/conda/bld.sh +++ /dev/null @@ -1 +0,0 @@ -python setup.py install \ No newline at end of file From 09bdd8c2ccc94ff02c4edcb628619921dec8fa01 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 07:41:39 -0600 Subject: [PATCH 18/69] Use double quotes --- build_tools/azure/meta_template.yml.j2 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 8fcdb5891..902cc4d52 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -1,7 +1,7 @@ {# This is a Jinja2 template that will render out to $ROOT/conda/meta.yaml #} package: - name: 'pmdarima' - version: '{{ VERSION }}' + name: "pmdarima" + version: "{{ VERSION }}" {# Path where setup.py lies from root/conda (since that is where this will be rendered) #} source: @@ -12,7 +12,7 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - script: 'python -m pip install --no-deps .' + script: "python -m pip install --no-deps --ignore-installed ." ignore_run_exports: - pip - statsmodels @@ -57,6 +57,7 @@ test: - pip install pytest pytest-mpl pytest-benchmark {# Cannot use `make` in the meta.yaml file #} - pytest --showlocals --durations=20 --pyargs pmdarima --benchmark-skip + - python -c "import pmdarima; pmdarima.show_versions()" about: home: https://github.com/alkaline-ml/pmdarima From 16036ba985e02bedc079bfbebbc04812c3c54a52 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 07:43:10 -0600 Subject: [PATCH 19/69] Update Conda --- build_tools/azure/conda/mac.yml | 3 +++ build_tools/azure/conda/windows.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/build_tools/azure/conda/mac.yml b/build_tools/azure/conda/mac.yml index 661db5658..0f2b1460a 100644 --- a/build_tools/azure/conda/mac.yml +++ b/build_tools/azure/conda/mac.yml @@ -4,6 +4,9 @@ steps: sudo chown -R $USER $CONDA displayName: 'Add conda to PATH' + - script: conda update conda + displayName: 'Updating Conda' + - script: conda install python=$(python.version) --yes displayName: 'Fixing conda Python version' diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index ec6ee0f82..840d8def4 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -2,6 +2,9 @@ steps: - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" displayName: 'Add conda to PATH' + - script: conda update conda + displayName: 'Updating Conda' + - script: conda install conda-build anaconda-client --yes displayName: 'Installing conda-build and anaconda-client' From dcca62db433f73172ba207e79cf0816b6f72ba08 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 07:45:15 -0600 Subject: [PATCH 20/69] Add yes flag --- build_tools/azure/conda/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 840d8def4..b41441591 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -2,7 +2,7 @@ steps: - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" displayName: 'Add conda to PATH' - - script: conda update conda + - script: conda update conda --yes displayName: 'Updating Conda' - script: conda install conda-build anaconda-client --yes From df676518b59d24310de2150624f13816cb2aaf5f Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 07:47:09 -0600 Subject: [PATCH 21/69] Add it on mac build too... --- build_tools/azure/conda/mac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/mac.yml b/build_tools/azure/conda/mac.yml index 0f2b1460a..46d2e1be6 100644 --- a/build_tools/azure/conda/mac.yml +++ b/build_tools/azure/conda/mac.yml @@ -4,7 +4,7 @@ steps: sudo chown -R $USER $CONDA displayName: 'Add conda to PATH' - - script: conda update conda + - script: conda update conda --yes displayName: 'Updating Conda' - script: conda install python=$(python.version) --yes From e82cd68ec92c69a60f9363ac86d8f410de008ef3 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 08:01:18 -0600 Subject: [PATCH 22/69] Try dollar python --- build_tools/azure/meta_template.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 902cc4d52..9b49dbb35 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,7 +12,7 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - script: "python -m pip install --no-deps --ignore-installed ." + script: "$PYTHON -m pip install --no-deps --ignore-installed ." ignore_run_exports: - pip - statsmodels From dccd5b4cdf3599102884d829e26e36e59706c56a Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 08:18:10 -0600 Subject: [PATCH 23/69] Try dollar prefix --- build_tools/azure/meta_template.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 9b49dbb35..fd2620d87 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,7 +12,7 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - script: "$PYTHON -m pip install --no-deps --ignore-installed ." + script: "python -m pip install --prefix $PREFIX --no-deps --ignore-installed ." ignore_run_exports: - pip - statsmodels From bcfbebfac44a27e5e06fca0f9df6c8f8f8215b07 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 08:39:25 -0600 Subject: [PATCH 24/69] Revert previous change --- build_tools/azure/meta_template.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index fd2620d87..902cc4d52 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,7 +12,7 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - script: "python -m pip install --prefix $PREFIX --no-deps --ignore-installed ." + script: "python -m pip install --no-deps --ignore-installed ." ignore_run_exports: - pip - statsmodels From ef3f4dd0b1ade80099e9dc112ef28115301a8396 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 08:48:21 -0600 Subject: [PATCH 25/69] Try setup.py --- build_tools/azure/meta_template.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 902cc4d52..fe46ba371 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,7 +12,7 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - script: "python -m pip install --no-deps --ignore-installed ." + script: "python setup.py install" ignore_run_exports: - pip - statsmodels From cf52a44c587297a8e78f1b030bc4138a7634b366 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 08:51:25 -0600 Subject: [PATCH 26/69] Remove preprocessing on mac --- build_tools/azure/conda/mac.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/build_tools/azure/conda/mac.yml b/build_tools/azure/conda/mac.yml index 46d2e1be6..5942eba12 100644 --- a/build_tools/azure/conda/mac.yml +++ b/build_tools/azure/conda/mac.yml @@ -13,16 +13,16 @@ steps: - script: conda install conda-build anaconda-client --yes displayName: 'Installing conda-build and anaconda-client' - - script: python -m pip install --upgrade pip - displayName: 'Updating pip' - - - script: | - python -m pip install -r build_tools/build_requirements.txt - make requirements - displayName: 'Installing requirements' - - - script: make bdist_wheel - displayName: 'Building wheel file' +# - script: python -m pip install --upgrade pip +# displayName: 'Updating pip' +# +# - script: | +# python -m pip install -r build_tools/build_requirements.txt +# make requirements +# displayName: 'Installing requirements' +# +# - script: make bdist_wheel +# displayName: 'Building wheel file' - bash: | mkdir conda From f53006290a23444c6dcdbfa365069df34c3537db Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 09:01:48 -0600 Subject: [PATCH 27/69] Try setting INLCUDE and LIBRARY paths --- build_tools/azure/meta_template.yml.j2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index fe46ba371..8801da49e 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,7 +12,10 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - script: "python setup.py install" + script: | + INCLUDE_PATH="${PREFIX}/include" + LIBRARY_PATH="${PREFIX}/lib" + python -m pip install --no-deps --ignore-installed . ignore_run_exports: - pip - statsmodels From 95c111e897f336f00900995320f59b51913cf945 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 09:36:08 -0600 Subject: [PATCH 28/69] Consolidate a bunch of stuff --- azure-pipelines.yml | 12 ++++++++++-- build_tools/azure/conda/unix.yml | 24 ++++++++++++++++++++++++ build_tools/azure/conda/windows.yml | 24 ------------------------ 3 files changed, 34 insertions(+), 26 deletions(-) create mode 100644 build_tools/azure/conda/unix.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1a412a279..15bae0968 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -50,7 +50,10 @@ jobs: architecture: '$(architecture)' displayName: 'Setting Python version and system architecture' - - template: build_tools/azure/conda/linux.yml + - bash: echo "##vso[task.prependpath]$CONDA/bin" + displayName: 'Adding conda to PATH' + + - template: build_tools/azure/conda/unix.yml - template: build_tools/azure/conda/deploy.yml - job: Mac @@ -75,7 +78,12 @@ jobs: architecture: '$(architecture)' displayName: 'Setting Python version and system architecture' - - template: build_tools/azure/conda/mac.yml + - bash: | + echo "##vso[task.prependpath]$CONDA/bin" + sudo chown -R $USER $CONDA + displayName: 'Adding conda to PATH' + + - template: build_tools/azure/conda/unix.yml - template: build_tools/azure/conda/deploy.yml - job: Windows diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml new file mode 100644 index 000000000..a5880f938 --- /dev/null +++ b/build_tools/azure/conda/unix.yml @@ -0,0 +1,24 @@ +steps: + - script: conda update conda --yes + displayName: 'Updating Conda' + + - script: conda install python=$(python.version) --yes + displayName: 'Fixing conda Python version' + + - script: conda install conda-build anaconda-client --yes + displayName: 'Installing conda-build and anaconda-client' + + - bash: | + mkdir conda + python -m pip install jinja2 + python build_tools/azure/render_meta.py + displayName: 'Rendering meta.yaml file' + + - bash: conda-build --python=$(python.version) conda/ + displayName: 'Building and testing conda distribution' + + - bash: | + output_file=$(conda-build --output --python=$(python.version) conda/) + echo "$output_file" + tar xjvf "$output_file" + displayName: 'Looking for lib folder' diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index b41441591..9726401cf 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -8,10 +8,6 @@ steps: - script: conda install conda-build anaconda-client --yes displayName: 'Installing conda-build and anaconda-client' - - script: make version - displayName: 'Ensuring VERSION file is created' - condition: contains(variables['Build.SourceBranch'], 'refs/tags') - - bash: | mkdir conda python -m pip install jinja2 @@ -25,23 +21,3 @@ steps: pip install -r requirements.txt conda-build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' - - # Run pmdarima.show_versions() because I don't 100% trust the conda builder - # Have to cd .. because pmdarima doesn't like importing from own dir - - bash: | - source activate build-env - cd .. - conda install --use-local pmdarima --yes - python -c "import pmdarima; pmdarima.show_versions()" - displayName: 'Testing conda installation' - - - bash: | - source activate build-env - output_file=$(conda-build --output --python=$(python.version) conda/) - echo "$output_file" - tar xjvf "$output_file" - local_file=$(find . -type f -iname "pmdarima-0.0.0*") - cd "$local_file" - ls - displayName: 'Looking for lib folder' - From 479d381650d832606959d681c94de59fb2a36f5f Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 09:55:55 -0600 Subject: [PATCH 29/69] Try bld.sh --- azure-pipelines.yml | 48 +++++++++++++------------- build_tools/azure/meta_template.yml.j2 | 5 +-- conda/bld.bat | 0 conda/bld.sh | 17 +++++++++ 4 files changed, 42 insertions(+), 28 deletions(-) create mode 100644 conda/bld.bat create mode 100644 conda/bld.sh diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 15bae0968..fc000db82 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -86,30 +86,30 @@ jobs: - template: build_tools/azure/conda/unix.yml - template: build_tools/azure/conda/deploy.yml -- job: Windows - - pool: - vmImage: 'vs2017-win2016' - - strategy: - matrix: - Python36: - python.version: '3.6' - architecture: 'x64' - - Python37: - python.version: '3.7' - architecture: 'x64' - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: '$(architecture)' - displayName: 'Setting Python version and system architecture' - - - template: build_tools/azure/conda/windows.yml - - template: build_tools/azure/conda/deploy.yml +#- job: Windows +# +# pool: +# vmImage: 'vs2017-win2016' +# +# strategy: +# matrix: +# Python36: +# python.version: '3.6' +# architecture: 'x64' +# +# Python37: +# python.version: '3.7' +# architecture: 'x64' +# +# steps: +# - task: UsePythonVersion@0 +# inputs: +# versionSpec: '$(python.version)' +# architecture: '$(architecture)' +# displayName: 'Setting Python version and system architecture' +# +# - template: build_tools/azure/conda/windows.yml +# - template: build_tools/azure/conda/deploy.yml - job: test_tagging diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 8801da49e..1f9969fe8 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,10 +12,7 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - script: | - INCLUDE_PATH="${PREFIX}/include" - LIBRARY_PATH="${PREFIX}/lib" - python -m pip install --no-deps --ignore-installed . +# script: python -m pip install --no-deps --ignore-installed . ignore_run_exports: - pip - statsmodels diff --git a/conda/bld.bat b/conda/bld.bat new file mode 100644 index 000000000..e69de29bb diff --git a/conda/bld.sh b/conda/bld.sh new file mode 100644 index 000000000..563f50ebc --- /dev/null +++ b/conda/bld.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# This is run from the root directory, so we treat it as such + +# Build our distribution first +python -m pip install --no-deps --ignore-installed . + +# Find where the package was installed +site_packages=$(python -c 'import site; print(site.getsitepackages()[0])') + +# Make the output directory +output_dir=${PREFIX}/lib/python${PY_VER}/site-packages/ +mkdir $output_dir + +# Copy the build artifacts to the conda output directory +cp ${site_packages}/${PKG_NAME} $output_dir +cp ${site_packages}/${PKG_NAME}-${PKG_VERSION}.dist-info $output_dir From 6be43642f2380ceb27d8fda8fd1199591f44ddd5 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 10:02:46 -0600 Subject: [PATCH 30/69] Added echo statements --- conda/bld.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/conda/bld.sh b/conda/bld.sh index 563f50ebc..2814e2317 100644 --- a/conda/bld.sh +++ b/conda/bld.sh @@ -2,16 +2,24 @@ # This is run from the root directory, so we treat it as such +echo "In bld.sh" + # Build our distribution first python -m pip install --no-deps --ignore-installed . +echo "Installed pmdarima" + # Find where the package was installed site_packages=$(python -c 'import site; print(site.getsitepackages()[0])') +echo "Found site_packages: ${site_packages}" + # Make the output directory output_dir=${PREFIX}/lib/python${PY_VER}/site-packages/ mkdir $output_dir +echo "Made output_dir: ${output_dir}" + # Copy the build artifacts to the conda output directory cp ${site_packages}/${PKG_NAME} $output_dir cp ${site_packages}/${PKG_NAME}-${PKG_VERSION}.dist-info $output_dir From 2fb05e6fbeba4e2b59633cc5ce2c9c043b7a0d32 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 10:07:04 -0600 Subject: [PATCH 31/69] Apparently it is build.sh --- conda/{bld.sh => build.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename conda/{bld.sh => build.sh} (100%) diff --git a/conda/bld.sh b/conda/build.sh similarity index 100% rename from conda/bld.sh rename to conda/build.sh From c308a787485d1a0e66d05ddca51e449b1afc7aaa Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 10:09:29 -0600 Subject: [PATCH 32/69] Install dependencies --- conda/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conda/build.sh b/conda/build.sh index 2814e2317..641ea3940 100644 --- a/conda/build.sh +++ b/conda/build.sh @@ -2,7 +2,10 @@ # This is run from the root directory, so we treat it as such -echo "In bld.sh" +echo "In build.sh" + +# Install our dependencies +python -m pip install -r requirements.txt # Build our distribution first python -m pip install --no-deps --ignore-installed . From 1fe3ed47dabd58dd5eb95276085371715cba1377 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 10:13:53 -0600 Subject: [PATCH 33/69] Try dollar python --- conda/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda/build.sh b/conda/build.sh index 641ea3940..7f58fd0d6 100644 --- a/conda/build.sh +++ b/conda/build.sh @@ -5,15 +5,15 @@ echo "In build.sh" # Install our dependencies -python -m pip install -r requirements.txt +$PYTHON -m pip install -r requirements.txt # Build our distribution first -python -m pip install --no-deps --ignore-installed . +$PYTHON -m pip install --no-deps --ignore-installed . echo "Installed pmdarima" # Find where the package was installed -site_packages=$(python -c 'import site; print(site.getsitepackages()[0])') +site_packages=$($PYTHON -c 'import site; print(site.getsitepackages()[0])') echo "Found site_packages: ${site_packages}" From 32ce1b34ade6b62059ec52b5f50f18d112bd6d59 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 10:29:56 -0600 Subject: [PATCH 34/69] Add cat step --- build_tools/azure/conda/unix.yml | 1 + build_tools/azure/meta_template.yml.j2 | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index a5880f938..832da1d7b 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -12,6 +12,7 @@ steps: mkdir conda python -m pip install jinja2 python build_tools/azure/render_meta.py + cat conda/meta.yaml displayName: 'Rendering meta.yaml file' - bash: conda-build --python=$(python.version) conda/ diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 1f9969fe8..6cfbce9c6 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -35,7 +35,6 @@ build: {% endraw %} host: - - pip {% raw %} - python {{ PY_VER }} {% endraw %} From cc0ca7680e19a6ad7e436929b45a88f88f5955f3 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 10:36:31 -0600 Subject: [PATCH 35/69] Try removing stuff from build section --- build_tools/azure/meta_template.yml.j2 | 3 --- 1 file changed, 3 deletions(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 6cfbce9c6..b4d62c796 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -26,9 +26,6 @@ build: requirements: build: - {% raw %} - - python {{ PY_VER }} - {% endraw %} - {{ numpy_version }} {% raw %} - {{ compiler('c') }} From 84033fa9d16204bd12cb79919f78318a957216fc Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 10:41:18 -0600 Subject: [PATCH 36/69] Add conda render step --- build_tools/azure/conda/unix.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 832da1d7b..59445226f 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -5,7 +5,7 @@ steps: - script: conda install python=$(python.version) --yes displayName: 'Fixing conda Python version' - - script: conda install conda-build anaconda-client --yes + - script: conda install conda-build anaconda-client conda-render --yes displayName: 'Installing conda-build and anaconda-client' - bash: | @@ -15,6 +15,8 @@ steps: cat conda/meta.yaml displayName: 'Rendering meta.yaml file' + - bash: conda render --python=$(python.version) conda/ + - bash: conda-build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' From 37a3faf1f225911b9881a972149962e5ac0a299e Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 10:59:10 -0600 Subject: [PATCH 37/69] Use conda's versioning --- build_tools/azure/conda/unix.yml | 2 +- build_tools/azure/render_meta.py | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 59445226f..e3fae1a9a 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -5,7 +5,7 @@ steps: - script: conda install python=$(python.version) --yes displayName: 'Fixing conda Python version' - - script: conda install conda-build anaconda-client conda-render --yes + - script: conda install conda-build anaconda-client --yes displayName: 'Installing conda-build and anaconda-client' - bash: | diff --git a/build_tools/azure/render_meta.py b/build_tools/azure/render_meta.py index 3beb5de28..782689f03 100644 --- a/build_tools/azure/render_meta.py +++ b/build_tools/azure/render_meta.py @@ -1,11 +1,12 @@ import os +import re import sys from jinja2 import Environment, FileSystemLoader from pathlib import Path # Since conda is only on Azure Pipelines, we can use their env variables -ROOT_DIRECTORY = Path(os.getenv('BUILD_SOURCESDIRECTORY')) +ROOT_DIRECTORY = Path('/Users/asmith/Documents/projects/alkaline-ml/pmdarima') #Path(os.getenv('BUILD_SOURCESDIRECTORY')) DIST_PATH = ROOT_DIRECTORY / 'dist' VERSION_FILE = ROOT_DIRECTORY / 'pmdarima' / 'VERSION' REQUIREMENTS_FILE = ROOT_DIRECTORY / 'requirements.txt' @@ -28,8 +29,16 @@ VERSION = '0.0.0' # Find the requirements and versions +# conda puts a space between packages and versions, so we have to match that +requirements = [] with open(str(REQUIREMENTS_FILE.resolve())) as file: - requirements = [line.strip() for line in file.readlines()] + for line in file: + requirement = line.strip() + match = re.match(r'^([A-Za-z\-0-9]+)', requirement) + _, match_end = match.span() + package = match.group(0) + version = requirement[match_end:].replace('==', '') + requirements.append(f'{package} {version}') # # We build from source on windows, otherwise, we looks for a wheel # if sys.platform != 'win32': From d4ab79a8470234bc1b268142542f1dfe1c64522e Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 11:01:46 -0600 Subject: [PATCH 38/69] Fix render_meta --- build_tools/azure/conda/unix.yml | 1 + build_tools/azure/render_meta.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index e3fae1a9a..a63b4b83e 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -16,6 +16,7 @@ steps: displayName: 'Rendering meta.yaml file' - bash: conda render --python=$(python.version) conda/ + displayName: 'Debugging rendered recipe' - bash: conda-build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' diff --git a/build_tools/azure/render_meta.py b/build_tools/azure/render_meta.py index 782689f03..f8bbb088d 100644 --- a/build_tools/azure/render_meta.py +++ b/build_tools/azure/render_meta.py @@ -6,7 +6,7 @@ from pathlib import Path # Since conda is only on Azure Pipelines, we can use their env variables -ROOT_DIRECTORY = Path('/Users/asmith/Documents/projects/alkaline-ml/pmdarima') #Path(os.getenv('BUILD_SOURCESDIRECTORY')) +ROOT_DIRECTORY = Path(os.getenv('BUILD_SOURCESDIRECTORY')) DIST_PATH = ROOT_DIRECTORY / 'dist' VERSION_FILE = ROOT_DIRECTORY / 'pmdarima' / 'VERSION' REQUIREMENTS_FILE = ROOT_DIRECTORY / 'requirements.txt' From 668d097ff6a3fd4f5c076cdc73ff5b7197754be7 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 11:04:02 -0600 Subject: [PATCH 39/69] Try overwriting? --- build_tools/azure/conda/unix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index a63b4b83e..39dc26889 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -15,7 +15,7 @@ steps: cat conda/meta.yaml displayName: 'Rendering meta.yaml file' - - bash: conda render --python=$(python.version) conda/ + - bash: conda render --python=$(python.version) conda/ -f conda/meta.yaml displayName: 'Debugging rendered recipe' - bash: conda-build --python=$(python.version) conda/ From 594c4d1eeb612804b3137d014ce3de249cf7b0b4 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 11:15:40 -0600 Subject: [PATCH 40/69] Remove numpy from build section --- build_tools/azure/meta_template.yml.j2 | 1 - build_tools/azure/render_meta.py | 1 - 2 files changed, 2 deletions(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index b4d62c796..ae0827cc2 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -26,7 +26,6 @@ build: requirements: build: - - {{ numpy_version }} {% raw %} - {{ compiler('c') }} {% endraw %} diff --git a/build_tools/azure/render_meta.py b/build_tools/azure/render_meta.py index f8bbb088d..e20b14951 100644 --- a/build_tools/azure/render_meta.py +++ b/build_tools/azure/render_meta.py @@ -53,7 +53,6 @@ # Render and write the meta.yaml file to $ROOT/conda/meta.yaml context = { 'requirements': requirements, - 'numpy_version': numpy_version, 'VERSION': VERSION, 'py_version': '{0.major}{0.minor}'.format(sys.version_info) } From 95edd5d4b26112a67c159a2e4ad9294b53dfaf8e Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 11:16:21 -0600 Subject: [PATCH 41/69] Don't use dollar python --- conda/build.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/conda/build.sh b/conda/build.sh index 7f58fd0d6..506650532 100644 --- a/conda/build.sh +++ b/conda/build.sh @@ -4,16 +4,18 @@ echo "In build.sh" +echo "PYTHON: $(which python)" + # Install our dependencies -$PYTHON -m pip install -r requirements.txt +python -m pip install -r requirements.txt # Build our distribution first -$PYTHON -m pip install --no-deps --ignore-installed . +python -m pip install --no-deps --ignore-installed . echo "Installed pmdarima" # Find where the package was installed -site_packages=$($PYTHON -c 'import site; print(site.getsitepackages()[0])') +site_packages=$(python -c 'import site; print(site.getsitepackages()[0])') echo "Found site_packages: ${site_packages}" From 1094259aed09084bbe1481b71161f7657a80b074 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 11:24:09 -0600 Subject: [PATCH 42/69] Add set flags --- conda/build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conda/build.sh b/conda/build.sh index 506650532..f6373d4e3 100644 --- a/conda/build.sh +++ b/conda/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x -e + # This is run from the root directory, so we treat it as such echo "In build.sh" From da053d283c33b6f4103fca0b9733eff8adeeb840 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 11:35:01 -0600 Subject: [PATCH 43/69] Don't use build.sh --- build_tools/azure/conda/unix.yml | 4 ++-- build_tools/azure/meta_template.yml.j2 | 2 +- conda/bld.bat | 0 conda/build.sh | 32 -------------------------- 4 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 conda/bld.bat delete mode 100644 conda/build.sh diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 39dc26889..5be898c02 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -15,10 +15,10 @@ steps: cat conda/meta.yaml displayName: 'Rendering meta.yaml file' - - bash: conda render --python=$(python.version) conda/ -f conda/meta.yaml + - bash: conda render --python=$(python.version) conda/ displayName: 'Debugging rendered recipe' - - bash: conda-build --python=$(python.version) conda/ + - bash: conda build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' - bash: | diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index ae0827cc2..4bedca69b 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,7 +12,7 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} -# script: python -m pip install --no-deps --ignore-installed . + script: python -m pip install --no-deps --ignore-installed . ignore_run_exports: - pip - statsmodels diff --git a/conda/bld.bat b/conda/bld.bat deleted file mode 100644 index e69de29bb..000000000 diff --git a/conda/build.sh b/conda/build.sh deleted file mode 100644 index f6373d4e3..000000000 --- a/conda/build.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -set -x -e - -# This is run from the root directory, so we treat it as such - -echo "In build.sh" - -echo "PYTHON: $(which python)" - -# Install our dependencies -python -m pip install -r requirements.txt - -# Build our distribution first -python -m pip install --no-deps --ignore-installed . - -echo "Installed pmdarima" - -# Find where the package was installed -site_packages=$(python -c 'import site; print(site.getsitepackages()[0])') - -echo "Found site_packages: ${site_packages}" - -# Make the output directory -output_dir=${PREFIX}/lib/python${PY_VER}/site-packages/ -mkdir $output_dir - -echo "Made output_dir: ${output_dir}" - -# Copy the build artifacts to the conda output directory -cp ${site_packages}/${PKG_NAME} $output_dir -cp ${site_packages}/${PKG_NAME}-${PKG_VERSION}.dist-info $output_dir From 8a46ede155c1781e96ace121aa41199c12f997bb Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 11:42:54 -0600 Subject: [PATCH 44/69] Make build env before building... --- build_tools/azure/conda/unix.yml | 9 ++++++++- build_tools/azure/render_meta.py | 14 +------------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 5be898c02..5451c37c2 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -18,7 +18,14 @@ steps: - bash: conda render --python=$(python.version) conda/ displayName: 'Debugging rendered recipe' - - bash: conda build --python=$(python.version) conda/ + - bash: | + conda create --name build-env python=$(python.version) --yes + python -m pip install -r requirements.txt + displayName: 'Creating build environment' + + - bash: | + conda activate build-env + conda build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' - bash: | diff --git a/build_tools/azure/render_meta.py b/build_tools/azure/render_meta.py index e20b14951..66f9a4848 100644 --- a/build_tools/azure/render_meta.py +++ b/build_tools/azure/render_meta.py @@ -1,6 +1,5 @@ import os import re -import sys from jinja2 import Environment, FileSystemLoader from pathlib import Path @@ -40,21 +39,10 @@ version = requirement[match_end:].replace('==', '') requirements.append(f'{package} {version}') -# # We build from source on windows, otherwise, we looks for a wheel -# if sys.platform != 'win32': -# wheel = next(file for file in os.listdir(str(DIST_PATH.resolve())) -# if file.endswith('.whl')) -# else: -# wheel = None - -# Numpy version is used for building -numpy_version = next(package for package in requirements if 'numpy' in package) - # Render and write the meta.yaml file to $ROOT/conda/meta.yaml context = { 'requirements': requirements, - 'VERSION': VERSION, - 'py_version': '{0.major}{0.minor}'.format(sys.version_info) + 'VERSION': VERSION } # Ensure output directory exists From 5ac50d00a3cb2b05eda10802612d63b8a85887d0 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 11:45:17 -0600 Subject: [PATCH 45/69] Try source activate --- build_tools/azure/conda/unix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 5451c37c2..3ea0cb342 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -24,7 +24,7 @@ steps: displayName: 'Creating build environment' - bash: | - conda activate build-env + source activate build-env conda build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' From f12426268bb8906df07fab64c6d2dd1d9b75be7b Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 11:57:34 -0600 Subject: [PATCH 46/69] Try isntalling twice? --- build_tools/azure/meta_template.yml.j2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 4bedca69b..a8a08391d 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,7 +12,9 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - script: python -m pip install --no-deps --ignore-installed . + script: | + python -m pip install --no-deps --ignore-installed . + python -m pip install --prefix $PREFIX --no-deps --ignore-installed . ignore_run_exports: - pip - statsmodels @@ -31,6 +33,7 @@ build: {% endraw %} host: + - pip {% raw %} - python {{ PY_VER }} {% endraw %} From 7e8f37456a28faf5dfc85380981c3b6cd34b51e8 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 12:24:12 -0600 Subject: [PATCH 47/69] Bring windows back --- azure-pipelines.yml | 54 ++++++++++++++++------------- build_tools/azure/conda/common.yml | 17 +++++++++ build_tools/azure/conda/linux.yml | 37 -------------------- build_tools/azure/conda/mac.yml | 52 --------------------------- build_tools/azure/conda/unix.yml | 21 ++--------- build_tools/azure/conda/windows.yml | 23 ++++-------- 6 files changed, 55 insertions(+), 149 deletions(-) create mode 100644 build_tools/azure/conda/common.yml delete mode 100644 build_tools/azure/conda/linux.yml delete mode 100644 build_tools/azure/conda/mac.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fc000db82..933cbbf2d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -53,6 +53,7 @@ jobs: - bash: echo "##vso[task.prependpath]$CONDA/bin" displayName: 'Adding conda to PATH' + - template: build_tools/azure/conda/common.yml - template: build_tools/azure/conda/unix.yml - template: build_tools/azure/conda/deploy.yml @@ -83,33 +84,38 @@ jobs: sudo chown -R $USER $CONDA displayName: 'Adding conda to PATH' + - template: build_tools/azure/conda/common.yml - template: build_tools/azure/conda/unix.yml - template: build_tools/azure/conda/deploy.yml -#- job: Windows -# -# pool: -# vmImage: 'vs2017-win2016' -# -# strategy: -# matrix: -# Python36: -# python.version: '3.6' -# architecture: 'x64' -# -# Python37: -# python.version: '3.7' -# architecture: 'x64' -# -# steps: -# - task: UsePythonVersion@0 -# inputs: -# versionSpec: '$(python.version)' -# architecture: '$(architecture)' -# displayName: 'Setting Python version and system architecture' -# -# - template: build_tools/azure/conda/windows.yml -# - template: build_tools/azure/conda/deploy.yml +- job: Windows + + pool: + vmImage: 'vs2017-win2016' + + strategy: + matrix: + Python36: + python.version: '3.6' + architecture: 'x64' + + Python37: + python.version: '3.7' + architecture: 'x64' + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: '$(architecture)' + displayName: 'Setting Python version and system architecture' + + - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" + displayName: 'Adding conda to PATH' + + - template: build_tools/azure/conda/common.yml + - template: build_tools/azure/conda/windows.yml + - template: build_tools/azure/conda/deploy.yml - job: test_tagging diff --git a/build_tools/azure/conda/common.yml b/build_tools/azure/conda/common.yml new file mode 100644 index 000000000..1e0bce51e --- /dev/null +++ b/build_tools/azure/conda/common.yml @@ -0,0 +1,17 @@ +steps: + - script: conda update conda --yes + displayName: 'Updating Conda' + + - script: conda install python=$(python.version) --yes + displayName: 'Fixing conda Python version' + + - script: conda install conda-build anaconda-client --yes + displayName: 'Installing conda-build and anaconda-client' + + - bash: | + mkdir conda + python -m pip install jinja2 + python build_tools/azure/render_meta.py + # This line is purely for debugging + conda render --python=$(python.version) conda/ + displayName: 'Rendering meta.yaml file' \ No newline at end of file diff --git a/build_tools/azure/conda/linux.yml b/build_tools/azure/conda/linux.yml deleted file mode 100644 index 6e3fc1d3a..000000000 --- a/build_tools/azure/conda/linux.yml +++ /dev/null @@ -1,37 +0,0 @@ -steps: - - bash: echo "##vso[task.prependpath]$CONDA/bin" - displayName: 'Add conda to PATH' - - - script: conda install python=$(python.version) --yes - displayName: 'Fixing conda Python version' - - - script: conda install conda-build anaconda-client --yes - displayName: 'Installing conda-build and anaconda-client' - - - script: python -m pip install --upgrade pip - displayName: 'Updating pip' - - - script: | - python -m pip install -r build_tools/build_requirements.txt - make requirements - displayName: 'Installing requirements' - - - script: make bdist_wheel - displayName: 'Building wheel file' - - - bash: | - mkdir conda - python -m pip install jinja2 - python build_tools/azure/render_meta.py - displayName: 'Rendering meta.yaml file' - - - bash: conda-build --python=$(python.version) conda/ - displayName: 'Building and testing conda distribution' - - # Run pmdarima.show_versions() because I don't 100% trust the conda builder - # Have to cd .. because pmdarima doesn't like importing from own dir - - bash: | - cd .. - conda install --use-local pmdarima --yes - python -c "import pmdarima; pmdarima.show_versions()" - displayName: 'Testing conda installation' diff --git a/build_tools/azure/conda/mac.yml b/build_tools/azure/conda/mac.yml deleted file mode 100644 index 5942eba12..000000000 --- a/build_tools/azure/conda/mac.yml +++ /dev/null @@ -1,52 +0,0 @@ -steps: - - bash: | - echo "##vso[task.prependpath]$CONDA/bin" - sudo chown -R $USER $CONDA - displayName: 'Add conda to PATH' - - - script: conda update conda --yes - displayName: 'Updating Conda' - - - script: conda install python=$(python.version) --yes - displayName: 'Fixing conda Python version' - - - script: conda install conda-build anaconda-client --yes - displayName: 'Installing conda-build and anaconda-client' - -# - script: python -m pip install --upgrade pip -# displayName: 'Updating pip' -# -# - script: | -# python -m pip install -r build_tools/build_requirements.txt -# make requirements -# displayName: 'Installing requirements' -# -# - script: make bdist_wheel -# displayName: 'Building wheel file' - - - bash: | - mkdir conda - python -m pip install jinja2 - python build_tools/azure/render_meta.py - displayName: 'Rendering meta.yaml file' - - - bash: conda-build --python=$(python.version) conda/ - displayName: 'Building and testing conda distribution' - - # Run pmdarima.show_versions() because I don't 100% trust the conda builder - # Have to cd .. because pmdarima doesn't like importing from own dir - - bash: | - cd .. - conda install --use-local pmdarima --yes - python -c "import pmdarima; pmdarima.show_versions()" - displayName: 'Testing conda installation' - - - bash: | - source activate build-env - output_file=$(conda-build --output --python=$(python.version) conda/) - echo "$output_file" - tar xjvf "$output_file" - local_file=$(find . -type f -iname "pmdarima-0.0.0*") - cd "$local_file" - ls - displayName: 'Looking for lib folder' diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 3ea0cb342..c3cb6253b 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -1,25 +1,8 @@ steps: - - script: conda update conda --yes - displayName: 'Updating Conda' - - - script: conda install python=$(python.version) --yes - displayName: 'Fixing conda Python version' - - - script: conda install conda-build anaconda-client --yes - displayName: 'Installing conda-build and anaconda-client' - - - bash: | - mkdir conda - python -m pip install jinja2 - python build_tools/azure/render_meta.py - cat conda/meta.yaml - displayName: 'Rendering meta.yaml file' - - - bash: conda render --python=$(python.version) conda/ - displayName: 'Debugging rendered recipe' - + # A lot of our requirements don't exist on conda (scipy>1.3.3, for instance), so we pip install all of them - bash: | conda create --name build-env python=$(python.version) --yes + source activate build-env python -m pip install -r requirements.txt displayName: 'Creating build environment' diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 9726401cf..252acd29b 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -1,23 +1,12 @@ steps: - - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" - displayName: 'Add conda to PATH' - - - script: conda update conda --yes - displayName: 'Updating Conda' - - - script: conda install conda-build anaconda-client --yes - displayName: 'Installing conda-build and anaconda-client' - + # A lot of our requirements don't exist on conda (scipy>1.3.3, for instance), so we pip install all of them - bash: | - mkdir conda - python -m pip install jinja2 - python build_tools/azure/render_meta.py - displayName: 'Rendering meta.yaml file' + conda create --name build-env python=$(python.version) --yes + call activate build-env + python -m pip install -r requirements.txt + displayName: 'Creating build environment' - # A lot of our requirements don't exist on conda (scipy>1.3.3, for instance), so we pip install all of them - script: | - conda create --name build-env python=$(python.version) --yes call activate build-env - pip install -r requirements.txt - conda-build --python=$(python.version) conda/ + conda build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' From 4a9ec3f9ac6fad7fbc7230aa26664742075dda5e Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 12:27:50 -0600 Subject: [PATCH 48/69] Don't activate on unix for some reason --- build_tools/azure/conda/unix.yml | 1 - build_tools/azure/meta_template.yml.j2 | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index c3cb6253b..2e8d831aa 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -2,7 +2,6 @@ steps: # A lot of our requirements don't exist on conda (scipy>1.3.3, for instance), so we pip install all of them - bash: | conda create --name build-env python=$(python.version) --yes - source activate build-env python -m pip install -r requirements.txt displayName: 'Creating build environment' diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index a8a08391d..937907439 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,6 +12,7 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} + {# The first one here i #} script: | python -m pip install --no-deps --ignore-installed . python -m pip install --prefix $PREFIX --no-deps --ignore-installed . From a15fcfd8ff9a9ac84196bcefeb37fb031a295fca Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 12:29:46 -0600 Subject: [PATCH 49/69] Add comment --- build_tools/azure/meta_template.yml.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/meta_template.yml.j2 b/build_tools/azure/meta_template.yml.j2 index 937907439..4dc45d350 100644 --- a/build_tools/azure/meta_template.yml.j2 +++ b/build_tools/azure/meta_template.yml.j2 @@ -12,7 +12,11 @@ build: number: {{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} string: py{{ CONDA_PY }}{{ environ.get('GIT_DESCRIBE_HASH', '') }}_{{ environ.get('GIT_DESCRIBE_NUMBER', 0) }} {% endraw %} - {# The first one here i #} + {# + The first one here installs to the default location (which is where testing happens) + and the second one installs to $PREFIX, which is set by conda-build and is necessary + for the `lib` folder to end up in the tar.bz2 + #} script: | python -m pip install --no-deps --ignore-installed . python -m pip install --prefix $PREFIX --no-deps --ignore-installed . From f51a814c5d014a5add5fdd6c9be620ee05c46162 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 12:35:09 -0600 Subject: [PATCH 50/69] Remove activate on windows --- build_tools/azure/conda/windows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 252acd29b..3295d6da0 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -2,7 +2,6 @@ steps: # A lot of our requirements don't exist on conda (scipy>1.3.3, for instance), so we pip install all of them - bash: | conda create --name build-env python=$(python.version) --yes - call activate build-env python -m pip install -r requirements.txt displayName: 'Creating build environment' From d9063715ad2e587201ca221194b6ed604da95906 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 12:43:09 -0600 Subject: [PATCH 51/69] Try conda-build --- build_tools/azure/conda/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 3295d6da0..1bdcccb44 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -7,5 +7,5 @@ steps: - script: | call activate build-env - conda build --python=$(python.version) conda/ + conda-build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' From 3aa0a829ec8526069ca7ffe4ec17b2ff11aab444 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 12:43:19 -0600 Subject: [PATCH 52/69] Add check for lib on unix --- build_tools/azure/conda/unix.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 2e8d831aa..fe90e185a 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -12,6 +12,13 @@ steps: - bash: | output_file=$(conda-build --output --python=$(python.version) conda/) - echo "$output_file" - tar xjvf "$output_file" + if [ tar xjvf "$output_file" | grep lib ]; then + echo "##vso[task.setvariable variable=LIB_CREATED]true" + echo "Lib directory created properly" + else + # Dump what is in the output file and exit + tar xjvf "$output_file" + echo "Lib directory not created" + exit 1 + fi displayName: 'Looking for lib folder' From 2f3c19e7b6c0a20909d3c275c40e5a6758509a75 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 12:51:12 -0600 Subject: [PATCH 53/69] Fix check for lib --- build_tools/azure/conda/unix.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index fe90e185a..863554533 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -12,12 +12,12 @@ steps: - bash: | output_file=$(conda-build --output --python=$(python.version) conda/) - if [ tar xjvf "$output_file" | grep lib ]; then + if [ tar xjvf "$output_file" -O | grep "lib" ]; then echo "##vso[task.setvariable variable=LIB_CREATED]true" echo "Lib directory created properly" else # Dump what is in the output file and exit - tar xjvf "$output_file" + tar xjvf "$output_file" -O echo "Lib directory not created" exit 1 fi From 8c3ec245325b3c48c27a773ab20fba2dec2abdc9 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 12:54:20 -0600 Subject: [PATCH 54/69] Try fix windows --- build_tools/azure/conda/windows.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 1bdcccb44..0c9b3291e 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -1,11 +1,13 @@ steps: # A lot of our requirements don't exist on conda (scipy>1.3.3, for instance), so we pip install all of them - - bash: | - conda create --name build-env python=$(python.version) --yes - python -m pip install -r requirements.txt - displayName: 'Creating build environment' +# - bash: | +# conda create --name build-env python=$(python.version) --yes +# python -m pip install -r requirements.txt +# displayName: 'Creating build environment' - script: | + conda create --name build-env python=$(python.version) --yes call activate build-env + python -m pip install -r requirements.txt conda-build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' From 7e27634bd87db23e955ee685492e2edbd243ccce Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 12:57:40 -0600 Subject: [PATCH 55/69] Ditch lib check --- build_tools/azure/conda/unix.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 863554533..70b3e2bd1 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -9,16 +9,3 @@ steps: source activate build-env conda build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' - - - bash: | - output_file=$(conda-build --output --python=$(python.version) conda/) - if [ tar xjvf "$output_file" -O | grep "lib" ]; then - echo "##vso[task.setvariable variable=LIB_CREATED]true" - echo "Lib directory created properly" - else - # Dump what is in the output file and exit - tar xjvf "$output_file" -O - echo "Lib directory not created" - exit 1 - fi - displayName: 'Looking for lib folder' From 651e321968a75cda9972f52320fd17f4e8f3d3f1 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 13:00:32 -0600 Subject: [PATCH 56/69] Ensure VERSION is created before building --- build_tools/azure/conda/common.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/conda/common.yml b/build_tools/azure/conda/common.yml index 1e0bce51e..76d03bc87 100644 --- a/build_tools/azure/conda/common.yml +++ b/build_tools/azure/conda/common.yml @@ -14,4 +14,8 @@ steps: python build_tools/azure/render_meta.py # This line is purely for debugging conda render --python=$(python.version) conda/ - displayName: 'Rendering meta.yaml file' \ No newline at end of file + displayName: 'Rendering meta.yaml file' + + - bash: make version + condition: contains(variables['Build.SourceBranch'], 'refs/tags') + displayName: 'Ensuring VERSION file is created' \ No newline at end of file From 79729107071e31e04aa58cd0a8d673408e2a9eb8 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 13:01:31 -0600 Subject: [PATCH 57/69] Clarifiying comment --- build_tools/azure/conda/windows.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 0c9b3291e..52de74288 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -1,10 +1,5 @@ steps: - # A lot of our requirements don't exist on conda (scipy>1.3.3, for instance), so we pip install all of them -# - bash: | -# conda create --name build-env python=$(python.version) --yes -# python -m pip install -r requirements.txt -# displayName: 'Creating build environment' - + # Windows is weird and fails if we try to do these as separate steps - script: | conda create --name build-env python=$(python.version) --yes call activate build-env From de031d489fd23128fe4e2f9d23550952895db713 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 13:05:18 -0600 Subject: [PATCH 58/69] Add lib check back in --- build_tools/azure/conda/unix.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 70b3e2bd1..af0effcb0 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -9,3 +9,14 @@ steps: source activate build-env conda build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' + + - bash: | + output_file=$(conda-build --output --python=$(python.version) conda/) + if [ tar -tf "$output_file" | grep "lib" ]; then + echo "##vso[task.setvariable variable=LIB_CREATED]true" + echo "Lib directory created properly" + else + echo "Lib directory not created" + exit 1 + fi + displayName: 'Looking for lib folder' From 5a60d476c27202ca64e0763a24dd94077ff9aba3 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 13:17:09 -0600 Subject: [PATCH 59/69] Remove brackets --- build_tools/azure/conda/unix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index af0effcb0..ba7864e4b 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -12,7 +12,7 @@ steps: - bash: | output_file=$(conda-build --output --python=$(python.version) conda/) - if [ tar -tf "$output_file" | grep "lib" ]; then + if tar -tf "$output_file" | grep "lib"; then echo "##vso[task.setvariable variable=LIB_CREATED]true" echo "Lib directory created properly" else From f6296b7ad264599687633d85acb6767f84b95910 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 13:19:11 -0600 Subject: [PATCH 60/69] Add lib check on all three platforms --- azure-pipelines.yml | 9 ++++++--- build_tools/azure/conda/common_post.yml | 11 +++++++++++ .../azure/conda/{common.yml => common_pre.yml} | 0 build_tools/azure/conda/unix.yml | 11 ----------- 4 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 build_tools/azure/conda/common_post.yml rename build_tools/azure/conda/{common.yml => common_pre.yml} (100%) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 933cbbf2d..4910c9922 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -53,8 +53,9 @@ jobs: - bash: echo "##vso[task.prependpath]$CONDA/bin" displayName: 'Adding conda to PATH' - - template: build_tools/azure/conda/common.yml + - template: build_tools/azure/conda/common_pre.yml - template: build_tools/azure/conda/unix.yml + - template: build_tools/azure/conda/common_post.yml - template: build_tools/azure/conda/deploy.yml - job: Mac @@ -84,8 +85,9 @@ jobs: sudo chown -R $USER $CONDA displayName: 'Adding conda to PATH' - - template: build_tools/azure/conda/common.yml + - template: build_tools/azure/conda/common_pre.yml - template: build_tools/azure/conda/unix.yml + - template: build_tools/azure/conda/common_post.yml - template: build_tools/azure/conda/deploy.yml - job: Windows @@ -113,8 +115,9 @@ jobs: - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" displayName: 'Adding conda to PATH' - - template: build_tools/azure/conda/common.yml + - template: build_tools/azure/conda/common_pre.yml - template: build_tools/azure/conda/windows.yml + - template: build_tools/azure/conda/common_post.yml - template: build_tools/azure/conda/deploy.yml - job: test_tagging diff --git a/build_tools/azure/conda/common_post.yml b/build_tools/azure/conda/common_post.yml new file mode 100644 index 000000000..abcb87ac1 --- /dev/null +++ b/build_tools/azure/conda/common_post.yml @@ -0,0 +1,11 @@ +steps: + - bash: | + output_file=$(conda-build --output --python=$(python.version) conda/) + if tar -tf "$output_file" | grep "lib"; then + echo "##vso[task.setvariable variable=LIB_CREATED]true" + echo "Lib directory created properly" + else + echo "Lib directory not created" + exit 1 + fi + displayName: 'Looking for lib folder' \ No newline at end of file diff --git a/build_tools/azure/conda/common.yml b/build_tools/azure/conda/common_pre.yml similarity index 100% rename from build_tools/azure/conda/common.yml rename to build_tools/azure/conda/common_pre.yml diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index ba7864e4b..70b3e2bd1 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -9,14 +9,3 @@ steps: source activate build-env conda build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' - - - bash: | - output_file=$(conda-build --output --python=$(python.version) conda/) - if tar -tf "$output_file" | grep "lib"; then - echo "##vso[task.setvariable variable=LIB_CREATED]true" - echo "Lib directory created properly" - else - echo "Lib directory not created" - exit 1 - fi - displayName: 'Looking for lib folder' From ac4ba811b217e6b3d0b55e06fa3eef567ea13d70 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 13:33:56 -0600 Subject: [PATCH 61/69] Fix deploy variable --- build_tools/azure/conda/deploy.sh | 3 +-- build_tools/azure/conda/deploy.yml | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build_tools/azure/conda/deploy.sh b/build_tools/azure/conda/deploy.sh index ae34875cd..9f14db1c0 100755 --- a/build_tools/azure/conda/deploy.sh +++ b/build_tools/azure/conda/deploy.sh @@ -1,7 +1,6 @@ #!/bin/bash -# This looks like it is running `conda build` again, but it just returns the output file -output_file=$(conda-build --output --python=$(python.version) conda/) +output_file=$1 # Check our VERSION. Basically, if it contains letters, it is a pre-release. Otherwise, # it has to match X.Y or X.Y.Z diff --git a/build_tools/azure/conda/deploy.yml b/build_tools/azure/conda/deploy.yml index 36688b50d..22c65b3ae 100644 --- a/build_tools/azure/conda/deploy.yml +++ b/build_tools/azure/conda/deploy.yml @@ -9,7 +9,10 @@ steps: fi displayName: Checking for VERSION file - - bash: build_tools/azure/conda/deploy.sh + - bash: | + # This looks like it is running `conda build` again, but it just returns the output file + output_file=$(conda-build --output --python=$(python.version) conda/) + build_tools/azure/conda/deploy.sh $output_file condition: and(succeeded(), eq(variables['VERSION_EXISTS'], 'true'), contains(variables['Build.SourceBranch'], 'refs/tags')) displayName: Deploying to conda env: From 85c296e15ec1e5f218c8db0ecbbfdd8bf0b7fc5f Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 13:38:04 -0600 Subject: [PATCH 62/69] Fix for windows --- build_tools/azure/conda/common_post.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/conda/common_post.yml b/build_tools/azure/conda/common_post.yml index abcb87ac1..4d3caf49e 100644 --- a/build_tools/azure/conda/common_post.yml +++ b/build_tools/azure/conda/common_post.yml @@ -1,7 +1,8 @@ steps: - bash: | output_file=$(conda-build --output --python=$(python.version) conda/) - if tar -tf "$output_file" | grep "lib"; then + TAR=$(whereis tar) + if $TAR -tf "$output_file" | grep "lib"; then echo "##vso[task.setvariable variable=LIB_CREATED]true" echo "Lib directory created properly" else From 2d13d0c70d23fda54a326f05fc45e8bf148e9859 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 13:45:09 -0600 Subject: [PATCH 63/69] Try which --- build_tools/azure/conda/common_post.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/common_post.yml b/build_tools/azure/conda/common_post.yml index 4d3caf49e..696bf4ff0 100644 --- a/build_tools/azure/conda/common_post.yml +++ b/build_tools/azure/conda/common_post.yml @@ -1,7 +1,7 @@ steps: - bash: | output_file=$(conda-build --output --python=$(python.version) conda/) - TAR=$(whereis tar) + TAR=$(which tar) if $TAR -tf "$output_file" | grep "lib"; then echo "##vso[task.setvariable variable=LIB_CREATED]true" echo "Lib directory created properly" From 1d8959ccbca1e87196411a40f83b89ab118501b4 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 14:09:09 -0600 Subject: [PATCH 64/69] Try 7zip on windows --- azure-pipelines.yml | 9 +++------ .../azure/conda/{common_pre.yml => common.yml} | 0 build_tools/azure/conda/common_post.yml | 12 ------------ build_tools/azure/conda/unix.yml | 11 +++++++++++ build_tools/azure/conda/windows.yml | 11 +++++++++++ 5 files changed, 25 insertions(+), 18 deletions(-) rename build_tools/azure/conda/{common_pre.yml => common.yml} (100%) delete mode 100644 build_tools/azure/conda/common_post.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4910c9922..933cbbf2d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -53,9 +53,8 @@ jobs: - bash: echo "##vso[task.prependpath]$CONDA/bin" displayName: 'Adding conda to PATH' - - template: build_tools/azure/conda/common_pre.yml + - template: build_tools/azure/conda/common.yml - template: build_tools/azure/conda/unix.yml - - template: build_tools/azure/conda/common_post.yml - template: build_tools/azure/conda/deploy.yml - job: Mac @@ -85,9 +84,8 @@ jobs: sudo chown -R $USER $CONDA displayName: 'Adding conda to PATH' - - template: build_tools/azure/conda/common_pre.yml + - template: build_tools/azure/conda/common.yml - template: build_tools/azure/conda/unix.yml - - template: build_tools/azure/conda/common_post.yml - template: build_tools/azure/conda/deploy.yml - job: Windows @@ -115,9 +113,8 @@ jobs: - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" displayName: 'Adding conda to PATH' - - template: build_tools/azure/conda/common_pre.yml + - template: build_tools/azure/conda/common.yml - template: build_tools/azure/conda/windows.yml - - template: build_tools/azure/conda/common_post.yml - template: build_tools/azure/conda/deploy.yml - job: test_tagging diff --git a/build_tools/azure/conda/common_pre.yml b/build_tools/azure/conda/common.yml similarity index 100% rename from build_tools/azure/conda/common_pre.yml rename to build_tools/azure/conda/common.yml diff --git a/build_tools/azure/conda/common_post.yml b/build_tools/azure/conda/common_post.yml deleted file mode 100644 index 696bf4ff0..000000000 --- a/build_tools/azure/conda/common_post.yml +++ /dev/null @@ -1,12 +0,0 @@ -steps: - - bash: | - output_file=$(conda-build --output --python=$(python.version) conda/) - TAR=$(which tar) - if $TAR -tf "$output_file" | grep "lib"; then - echo "##vso[task.setvariable variable=LIB_CREATED]true" - echo "Lib directory created properly" - else - echo "Lib directory not created" - exit 1 - fi - displayName: 'Looking for lib folder' \ No newline at end of file diff --git a/build_tools/azure/conda/unix.yml b/build_tools/azure/conda/unix.yml index 70b3e2bd1..ba7864e4b 100644 --- a/build_tools/azure/conda/unix.yml +++ b/build_tools/azure/conda/unix.yml @@ -9,3 +9,14 @@ steps: source activate build-env conda build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' + + - bash: | + output_file=$(conda-build --output --python=$(python.version) conda/) + if tar -tf "$output_file" | grep "lib"; then + echo "##vso[task.setvariable variable=LIB_CREATED]true" + echo "Lib directory created properly" + else + echo "Lib directory not created" + exit 1 + fi + displayName: 'Looking for lib folder' diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 52de74288..1400847d8 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -6,3 +6,14 @@ steps: python -m pip install -r requirements.txt conda-build --python=$(python.version) conda/ displayName: 'Building and testing conda distribution' + + - bash: | + output_file=$(conda-build --output --python=$(python.version) conda/) + if 7zip -tbzip2 l "$output_file" | grep "lib"; then + echo "##vso[task.setvariable variable=LIB_CREATED]true" + echo "Lib directory created properly" + else + echo "Lib directory not created" + exit 1 + fi + displayName: 'Looking for lib folder' From 0d7380f566c8426e57d93a68f784b3937b4e30b0 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 14:19:49 -0600 Subject: [PATCH 65/69] Use 7z instead of 7zip --- build_tools/azure/conda/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 1400847d8..c1ad02ec5 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -9,7 +9,7 @@ steps: - bash: | output_file=$(conda-build --output --python=$(python.version) conda/) - if 7zip -tbzip2 l "$output_file" | grep "lib"; then + if 7z -tbzip2 l "$output_file" | grep "lib"; then echo "##vso[task.setvariable variable=LIB_CREATED]true" echo "Lib directory created properly" else From 77b211ce41e04f4e9453b9f2cf9ab037314dca08 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 14:33:08 -0600 Subject: [PATCH 66/69] Try force-local --- build_tools/azure/conda/windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index c1ad02ec5..19be7fa92 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -9,7 +9,7 @@ steps: - bash: | output_file=$(conda-build --output --python=$(python.version) conda/) - if 7z -tbzip2 l "$output_file" | grep "lib"; then + if tar -tf "$output_file" --force-local | grep "lib"; then echo "##vso[task.setvariable variable=LIB_CREATED]true" echo "Lib directory created properly" else From 3943e9a3926fe6c8ebdc9bbca02ea3712a68485f Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 14:45:48 -0600 Subject: [PATCH 67/69] lib -> Lib --- build_tools/azure/conda/windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_tools/azure/conda/windows.yml b/build_tools/azure/conda/windows.yml index 19be7fa92..85d32d7e8 100644 --- a/build_tools/azure/conda/windows.yml +++ b/build_tools/azure/conda/windows.yml @@ -9,7 +9,8 @@ steps: - bash: | output_file=$(conda-build --output --python=$(python.version) conda/) - if tar -tf "$output_file" --force-local | grep "lib"; then + # Windows has to use --force-local to ignore colons, and `Lib` has to be capitalized + if tar -tf "$output_file" --force-local | grep "Lib"; then echo "##vso[task.setvariable variable=LIB_CREATED]true" echo "Lib directory created properly" else From cd6b1ea601ffd7b493e77713b8abf748a0988822 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 14:46:15 -0600 Subject: [PATCH 68/69] Ensure lib is created before deploying --- build_tools/azure/conda/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/deploy.yml b/build_tools/azure/conda/deploy.yml index 22c65b3ae..05bbd0d95 100644 --- a/build_tools/azure/conda/deploy.yml +++ b/build_tools/azure/conda/deploy.yml @@ -13,7 +13,7 @@ steps: # This looks like it is running `conda build` again, but it just returns the output file output_file=$(conda-build --output --python=$(python.version) conda/) build_tools/azure/conda/deploy.sh $output_file - condition: and(succeeded(), eq(variables['VERSION_EXISTS'], 'true'), contains(variables['Build.SourceBranch'], 'refs/tags')) + condition: and(succeeded(), eq(variables['LIB_CREATED'], 'true'), eq(variables['VERSION_EXISTS'], 'true'), contains(variables['Build.SourceBranch'], 'refs/tags')) displayName: Deploying to conda env: ANACONDA_API_TOKEN: $(anacondaToken) From e711cf644e781062606b7305c28d3973f4fa9235 Mon Sep 17 00:00:00 2001 From: Aaron Smith Date: Mon, 17 Feb 2020 15:33:03 -0600 Subject: [PATCH 69/69] Execute file, now that we have a previous step --- build_tools/azure/conda/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/conda/deploy.yml b/build_tools/azure/conda/deploy.yml index 05bbd0d95..3d5a85bad 100644 --- a/build_tools/azure/conda/deploy.yml +++ b/build_tools/azure/conda/deploy.yml @@ -12,7 +12,7 @@ steps: - bash: | # This looks like it is running `conda build` again, but it just returns the output file output_file=$(conda-build --output --python=$(python.version) conda/) - build_tools/azure/conda/deploy.sh $output_file + ./build_tools/azure/conda/deploy.sh $output_file condition: and(succeeded(), eq(variables['LIB_CREATED'], 'true'), eq(variables['VERSION_EXISTS'], 'true'), contains(variables['Build.SourceBranch'], 'refs/tags')) displayName: Deploying to conda env: