{% set version = "1.8.0" %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-future
  version: {{ version|replace("-", "_") }}

source:
  fn: future_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/future_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/future/future_{{ version }}.tar.gz
  sha256: 8c5c28a6d005eef035026f3546fe52f8d7a1161148353c423521f3e81477d724

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-digest
    - r-globals >=0.11.0
    - r-listenv >=0.6.0

  run:
    - r-base
    - r-digest
    - r-globals >=0.11.0
    - r-listenv >=0.6.0

test:
  commands:
    - $R -e "library('future')"  # [not win]
    - "\"%R%\" -e \"library('future')\""  # [win]

about:
  home: https://github.com/HenrikBengtsson/future
  license: LGPL (>= 2.1)
  summary: The purpose of this package is to provide a lightweight and unified Future API for
    sequential and parallel processing of R expression via futures.  The simplest way
    to evaluate an expression in parallel is to use `x %<-% { expression }` with `plan(multiprocess)`.
    This package implements sequential, multicore, multisession, and cluster futures.  With
    these, R expressions can be evaluated on the local machine, on in parallel a set
    of local machines, or distributed on a mix of local and remote machines. Extensions
    to this package implements additional backends for processing futures via compute
    cluster schedulers etc. Because of its unified API, there is no need to modify code
    in order switch from sequential on the local machine to, say, distributed processing
    on a remote compute cluster. Another strength of this package is that global variables
    and functions are automatically identified and exported as needed, making it straightforward
    to tweak existing code to make use of futures.
  license_family: LGPL

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
