Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/conda-package-build.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: build_publish_anaconda
name: OpenAlea CI

on:
push:
branches:
- '**'
- main
- master
tags:
- 'v*'
pull_request:
branches:
- '**'

types:
- opened
- synchronize
- reopened
release:
types:
- published

jobs:
build:
uses: openalea/github-action-conda-build/.github/workflows/conda-package-build.yml@label
with:
operating-system: '["ubuntu-latest"]'
build-options: ""
label: latest
python-minor-version: '[10]'
uses: openalea/action-build-publish-anaconda/.github/workflows/openalea_ci.yml@main
secrets:
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}

44 changes: 28 additions & 16 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,45 @@
{% set pyproject = load_file_data('../pyproject.toml', from_recipe_dir=True) %}
{% set name = pyproject.get('project').get('name') %}
{% set description = pyproject.get('project').get('description') %}
{% set version = environ.get('SETUPTOOLS_SCM_PRETEND_VERSION', "0.0.0.dev") %}
{% set license = pyproject.get('project').get('license') %}
{% set home = pyproject.get('project', {}).get('urls', {}).get('Homepage', '') %}
{% set build_deps = pyproject.get("build-system", {}).get("requires", []) %}
{% set deps = pyproject.get('project', {}).get('dependencies', []) %}
{% set conda_deps = pyproject.get('tool', {}).get('conda-environment', {}).get('dependencies',[]) %}

package:
name: {{ pyproject["project"]["name"] }}
version: {{ GIT_DESCRIBE_TAG | replace("v", "") }}
name: {{ name }}
version: {{ version }}

source:
path: ..

build:
noarch: python
number: 0
script: {{PYTHON}} -m pip install . -vv
preserve_egg_dir: True
string: py{{ PY_VER }}
script:
- {{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-build-isolation -vv

requirements:
host:
- python
{% for dep in build_deps %}
- {{ dep }}
{% endfor %}

build:
- python {{ pyproject["project"]["requires-python"] }}
{% for dep in pyproject["build-system"]["requires"] %}
- {{ dep.lower() }}
{% endfor %}
- {{ compiler("cxx") }}

run:
- python {{ pyproject["project"]["requires-python"] }}
{% for dep in pyproject["project"]["dependencies"] %}
- {{ dep.lower() }}
{% endfor %}
{% for dep in pyproject["tool"]["conda"]["environment"]["dependencies"] %}
- {{ dep.lower() }}
- python
{% for dep in deps + conda_deps %}
- {{ dep }}
{% endfor %}


test:
requires:
- pytest
Expand All @@ -41,6 +53,6 @@ test:
- pytest -v test_*.py

about:
summary: {{ pyproject["project"]["description"] }}
license: {{ pyproject["project"]["license"] }}
home: {{ pyproject["project"]["urls"]["Homepage"] }}
home: {{ home }}
summary: {{ description }}
license: {{ license }}
Loading