{% set version = "2.1.1" %}

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

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

source:
  fn: withr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/withr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/withr/withr_{{ version }}.tar.gz


  sha256: bd5fae3846b8f89081a0991375402266dccf49bfa5d614690deea1b03ba5eb9e

build:
  number: 0

  rpaths:
    - lib/R/lib/
    - lib/
  skip: True  # [win32]

requirements:
  build:
    - r-base

  run:
    - r-base

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



about:
  home: http://github.com/jimhester/withr
  license: GPL (>= 2)
  summary: A set of functions to run code 'with' safely and temporarily modified global state.
    Many of these functions were originally a part of the 'devtools' package, this provides
    a simple package with limited dependencies to provide access to these functions.
  license_family: GPL3



extra:
  recipe-maintainers:
    - croth1
