{% set version = '0.4-2' %}
{% set posix = 'm2-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/selectr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/selectr/selectr_{{ version }}.tar.gz
  sha256: 5588aed05f3f5ee63c0d29953ef53da5dac7afccfdd04b7b22ef24e1e3b0c127

build:
  number: 4
  noarch: generic
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-r6
    - r-stringr
  run:
    - r-base
    - r-r6
    - r-stringr

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

about:
  home: https://sjp.co.nz/projects/selectr
  license: BSD-3-Clause
  summary: Translates a CSS3 selector into an equivalent XPath expression. This allows us to
    use CSS selectors when working with the XML package as it can only evaluate XPath
    expressions. Also provided are convenience functions useful for using CSS selectors
    on XML nodes. This package is a port of the Python package 'cssselect' (<https://cssselect.readthedocs.io/>).
  license_family: BSD
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/BSD_3_clause'
    - LICENCE

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

# Package: selectr
# Type: Package
# Title: Translate CSS Selectors to XPath Expressions
# Version: 0.4-2
# Date: 2019-11-20
# Authors@R: c(person("Simon", "Potter", role = c("aut", "trl", "cre"), email = "simon@sjp.co.nz"), person("Simon", "Sapin", role = "aut"), person("Ian", "Bicking", role = "aut"))
# License: BSD_3_clause + file LICENCE
# Depends: R (>= 3.0)
# Imports: methods, stringr, R6
# Suggests: testthat, XML, xml2
# URL: https://sjp.co.nz/projects/selectr
# BugReports: https://github.com/sjp/selectr/issues
# Description: Translates a CSS3 selector into an equivalent XPath expression. This allows us to use CSS selectors when working with the XML package as it can only evaluate XPath expressions. Also provided are convenience functions useful for using CSS selectors on XML nodes. This package is a port of the Python package 'cssselect' (<https://cssselect.readthedocs.io/>).
# NeedsCompilation: no
# Packaged: 2019-11-20 06:04:49 UTC; simon
# Author: Simon Potter [aut, trl, cre], Simon Sapin [aut], Ian Bicking [aut]
# Maintainer: Simon Potter <simon@sjp.co.nz>
# Repository: CRAN
# Date/Publication: 2019-11-20 07:30:03 UTC
