From 3dad8782d3f4e0979459f37883b428092f2528ec Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 6 Mar 2023 17:00:27 +0000 Subject: [PATCH 1/5] first crack at conda-build on chrisroadmap channel --- conda-build/build.bat | 2 ++ conda-build/build.sh | 1 + conda-build/conda_build_config.yaml | 7 ++++++ conda-build/meta.yaml | 36 +++++++++++++++++++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 conda-build/build.bat create mode 100644 conda-build/build.sh create mode 100644 conda-build/conda_build_config.yaml create mode 100644 conda-build/meta.yaml diff --git a/conda-build/build.bat b/conda-build/build.bat new file mode 100644 index 00000000..b9cd616c --- /dev/null +++ b/conda-build/build.bat @@ -0,0 +1,2 @@ +"%PYTHON%" setup.py install --single-version-externally-managed --record=record.txt +if errorlevel 1 exit 1 diff --git a/conda-build/build.sh b/conda-build/build.sh new file mode 100644 index 00000000..a6609066 --- /dev/null +++ b/conda-build/build.sh @@ -0,0 +1 @@ +$PYTHON setup.py install --single-version-externally-managed --record=record.txt diff --git a/conda-build/conda_build_config.yaml b/conda-build/conda_build_config.yaml new file mode 100644 index 00000000..8d657fe8 --- /dev/null +++ b/conda-build/conda_build_config.yaml @@ -0,0 +1,7 @@ +python: + - 3.6 + - 3.7 + - 3.8 + - 3.9 + - 3.10 + - 3.11 diff --git a/conda-build/meta.yaml b/conda-build/meta.yaml new file mode 100644 index 00000000..930e189a --- /dev/null +++ b/conda-build/meta.yaml @@ -0,0 +1,36 @@ +{% set version = GIT_DESCRIBE_TAG %} + +package: + name: fair + version: {{ version[1:] }} + +source: + git_url: ../ + +build: + noarch: python + +requirements: + host: + - python + - setuptools + build: + - python {{ python }} + run: + - python + - numpy + - pandas + - pooch + - scipy + - tqdm + - xarray + +about: + home: https://github.com/OMS-NetZero/FAIR + license: Apache-2.0 + license_file: LICENSE + summary: "Finite-amplitude Impulse Response simple climate model." + +extra: + recipe-maintainers: + - chrisroadmap From 0f266185247e384478d5d7be8d64e8489f38a772 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 6 Mar 2023 17:21:07 +0000 Subject: [PATCH 2/5] strip dirtyness --- conda-build/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-build/meta.yaml b/conda-build/meta.yaml index 930e189a..4ea34ab9 100644 --- a/conda-build/meta.yaml +++ b/conda-build/meta.yaml @@ -2,7 +2,7 @@ package: name: fair - version: {{ version[1:] }} + version: {{ version[1:].split("+")[0] }} source: git_url: ../ From 6180f120aa299f6a76ead836721a3fd567fdbe6a Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 6 Mar 2023 17:27:57 +0000 Subject: [PATCH 3/5] oddness --- conda-build/meta.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conda-build/meta.yaml b/conda-build/meta.yaml index 4ea34ab9..29015637 100644 --- a/conda-build/meta.yaml +++ b/conda-build/meta.yaml @@ -1,8 +1,12 @@ +# wow, this is faffy {% set version = GIT_DESCRIBE_TAG %} +{% set parts = version.split("+") %} +{% set clean = parts[0] %} +{% set naked_version = clean[1:] %} package: name: fair - version: {{ version[1:].split("+")[0] }} + version: {{ naked_version }} source: git_url: ../ From 74bfd3e47fc3e73fcad0dac30c61e05b585b4e05 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 6 Mar 2023 18:31:56 +0000 Subject: [PATCH 4/5] workaround --- conda-build/meta.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/conda-build/meta.yaml b/conda-build/meta.yaml index 29015637..63c28fe8 100644 --- a/conda-build/meta.yaml +++ b/conda-build/meta.yaml @@ -1,12 +1,8 @@ -# wow, this is faffy -{% set version = GIT_DESCRIBE_TAG %} -{% set parts = version.split("+") %} -{% set clean = parts[0] %} -{% set naked_version = clean[1:] %} +{% set version = environ.get('GIT_DESCRIBE_TAG', 'default').lstrip('v') %} package: name: fair - version: {{ naked_version }} + version: {{ version.split("+")[0] }} source: git_url: ../ From 19633fb49724cce3db7344c4bf682f7ccb0bec6a Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 27 Sep 2023 12:11:25 +0100 Subject: [PATCH 5/5] drop py3.6 from conda build --- conda-build/conda_build_config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/conda-build/conda_build_config.yaml b/conda-build/conda_build_config.yaml index 8d657fe8..e84601e9 100644 --- a/conda-build/conda_build_config.yaml +++ b/conda-build/conda_build_config.yaml @@ -1,5 +1,4 @@ python: - - 3.6 - 3.7 - 3.8 - 3.9