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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/import_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/import/import_{{ version }}.tar.gz
  sha256: 513268bf13e570e9eb26639703986d972caa519964e98f7865dcad9c46498e2e

build:
  merge_build_host: True  # [win]
  number: 1002
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:

  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://github.com/smbache/import
  license: MIT
  summary: This is an alternative mechanism for importing objects from packages. The syntax allows
    for importing multiple objects from a package with a single command in an expressive
    way. The import package bridges some of the gap between using library (or require)
    and direct (single-object) imports. Furthermore the imported objects are not placed
    in the current environment. It is also possible to import objects from stand-alone
    .R files. For more information, refer to the package vignette.
  license_family: MIT
  license_file:
   - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
   - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
