<commit_before>{% set version = "58.2" %}
{% set version_under = version.replace(".", "_") %}

package:
  name: icu
  version: {{ version }}

source:
  url: http://download.icu-project.org/files/icu4c/{{ version }}/icu4c-{{ version_under }}-src.tgz
  sha256: 2b0a4410153a9b20de0e20c7d8b66049a72aef244b53683d0d7521371683da0c
  patches:
    # Include an extra header when using mingw.
    - icu4c-4_9_1-mingw-w64-mkdir-compatibility.patch  # [win]
    # Omit lib prefix on libraries.
    - icu-config.patch  # [win]

build:
  number: 0
  skip: True  # [win and py36]
  features:
    - vc9  # [win and py27]
    - vc14  # [win and (py35 or py36)]

requirements:
  build:
    - python  # [win]
    - m2-base  # [win]
    - m2-make  # [win]
    - toolchain
    - vc 9  # [win and py27]
    - vc 14  # [win and (py35 or py36)]
  run:
    - vc 9  # [win and py27]
    - vc 14  # [win and (py35 or py36)]

test:
  files:
    # From http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/gb-18030-2000.ucm
    - gb-18030-2000.ucm
    # From ICU's data folder.
    - de.txt
  commands:
    # Libraries
    {% set libs = [
       "libicudata",
       "libicui18n",
       "libicuio",
       "libicutest",
       "libicutu",
       "libicuuc"
     ] %}
    {% for each_lib in libs %}
    - test -f $PREFIX/lib/{{ each_lib }}.a  # [not win]
    - test -f $PREFIX/lib/{{ each_lib }}.{{ version }}.dylib   # [osx]
    - test -f $PREFIX/lib/{{ each_lib }}.so.{{ version }}  # [linux]
    {% endfor %}

    # CLI tests
    - genbrk --help
    - gencfu --help
    - gencnval --help
    - gendict --help
    - icuinfo --help
    - icu-config --help  # [not win]
    - makeconv gb-18030-2000.ucm
    - conda inspect linkages -p $PREFIX $PKG_NAME  # [not win]
    - conda inspect objects -p $PREFIX $PKG_NAME  # [osx]

about:
  home: http://site.icu-project.org/
  license: MIT
  license_file: LICENSE
  summary: 'International Components for Unicode.'

extra:
  recipe-maintainers:
    - ccordoba12
    - jakirkham
    - msarahan
    - ocefpaf
<commit_msg>migrated to Jinja2 compiler syntax build<commit_after>{% set version = "58.2" %}
{% set version_under = version.replace(".", "_") %}

package:
  name: icu
  version: {{ version }}

source:
  url: http://download.icu-project.org/files/icu4c/{{ version }}/icu4c-{{ version_under }}-src.tgz
  sha256: 2b0a4410153a9b20de0e20c7d8b66049a72aef244b53683d0d7521371683da0c
  patches:
    # Include an extra header when using mingw.
    - icu4c-4_9_1-mingw-w64-mkdir-compatibility.patch  # [win]
    # Omit lib prefix on libraries.
    - icu-config.patch  # [win]

build:
  number: 0

requirements:
  build:
    - m2-base  # [win]
    - m2-make  # [win]
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
  run:

test:
  files:
    # From http://source.icu-project.org/repos/icu/data/trunk/charset/data/ucm/gb-18030-2000.ucm
    - gb-18030-2000.ucm
    # From ICU's data folder.
    - de.txt
  commands:
    # Libraries
    {% set libs = [
       "libicudata",
       "libicui18n",
       "libicuio",
       "libicutest",
       "libicutu",
       "libicuuc"
     ] %}
    {% for each_lib in libs %}
    - test -f $PREFIX/lib/{{ each_lib }}.a  # [not win]
    - test -f $PREFIX/lib/{{ each_lib }}.{{ version }}.dylib   # [osx]
    - test -f $PREFIX/lib/{{ each_lib }}.so.{{ version }}  # [linux]
    {% endfor %}

    # CLI tests
    - genbrk --help
    - gencfu --help
    - gencnval --help
    - gendict --help
    - icuinfo --help
    - icu-config --help  # [not win]
    - makeconv gb-18030-2000.ucm
    - conda inspect linkages -p $PREFIX $PKG_NAME  # [not win]
    - conda inspect objects -p $PREFIX $PKG_NAME  # [osx]

about:
  home: http://site.icu-project.org/
  license: MIT
  license_file: LICENSE
  summary: 'International Components for Unicode.'

extra:
  recipe-maintainers:
    - ccordoba12
    - jakirkham
    - msarahan
    - ocefpaf

{'fraction_non_alphanumeric': 0.15201230453729814, 'fraction_numerical': 0.05485772878749039, 'mean_word_length': 2.2462562396006653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1498175', 'n_tokens_mistral': 1718, 'n_tokens_neox': 1565, 'n_words': 341}