<commit_before>{% set name = "cppe" %}
{% set version = "0.3.1" %}
{% set sha256 = "38d4230ba3ace78936049c23ad4b1fe9e704fd250ec57cc9733cb3904b62cf7c" %}
{% set pyver = PY_VER.replace(".", "") %}
{% set build = 0 %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://github.com/maxscheurer/cppe/archive/v{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: {{ build }}
  skip: true  # [win and vc<14]
  binary_relocation: true
  run_exports:
    - {{ pin_subpackage('cppe', max_pin='x.x') }}

requirements:
  build:
    - cmake >=3.5
    - {{ compiler('cxx') }}
    - ninja
  host:
    - pybind11 =*=*py{{ pyver }}*
    - python >=3.6
  run:
    - numpy
    - {{ pin_compatible('python', max_pin='x.x') }}

test:
  commands:
    # Verify C++ library
    - test -f $PREFIX/lib/libcppe$SHLIB_EXT                 # [not win]
    - if not exist %PREFIX%\\Library\\bin\\cppe.dll exit 1  # [win]
    - if not exist %PREFIX%\\Library\\lib\\cppe.lib exit 1  # [win]
    # Inspect linkage
    - ldd -r -u $PREFIX/lib/libcppe$SHLIB_EXT     # [linux]
    - ldd -v $PREFIX/lib/libcppe$SHLIB_EXT        # [linux]
    - otool -L $PREFIX/lib/libcppe$SHLIB_EXT      # [osx]
    - conda inspect objects -p $PREFIX $PKG_NAME  # [osx]
    - conda inspect linkages --show-files --groupby=dependency cppe
    # Verify Python extension library
    - export PYLIB_EXT=`$PYTHON -c 'from numpy import distutils; print(distutils.misc_util.get_shared_lib_extension(is_python_ext=True))'`
    - test -f $SP_DIR/cppe$PYLIB_EXT                                      # [not win]
    - if not exist %PREFIX%\\Lib\\site-packages\\cppe%PYLIB_EXT% exit 1  # [win]
    # Inspect linkage
    - ldd -v $SP_DIR/cppe$PYLIB_EXT                                     # [linux]
    - otool -L $SP_DIR/cppe$PYLIB_EXT                                   # [osx]
  imports:
    - cppe<commit_msg>Add OpenMP<commit_after>{% set name = "cppe" %}
{% set version = "0.3.1" %}
{% set sha256 = "38d4230ba3ace78936049c23ad4b1fe9e704fd250ec57cc9733cb3904b62cf7c" %}
{% set pyver = PY_VER.replace(".", "") %}
{% set build = 0 %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://github.com/maxscheurer/cppe/archive/v{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: {{ build }}
  skip: true  # [win and vc<14]
  binary_relocation: true
  run_exports:
    - {{ pin_subpackage('cppe', max_pin='x.x') }}

requirements:
  build:
    - cmake >=3.5
    - {{ compiler('cxx') }}
    - ninja
  host:
    - llvm-openmp  # [osx]
    - libgomp      # [linux]
    - pybind11-abi
    - python >=3.6
  run:
    - {{ pin_compatible('python', max_pin='x.x') }}

test:
  commands:
    # Verify C++ library
    - test -f $PREFIX/lib/libcppe$SHLIB_EXT                 # [not win]
    - if not exist %PREFIX%\\Library\\bin\\cppe.dll exit 1  # [win]
    - if not exist %PREFIX%\\Library\\lib\\cppe.lib exit 1  # [win]
    # Inspect linkage
    - ldd -r -u $PREFIX/lib/libcppe$SHLIB_EXT     # [linux]
    - ldd -v $PREFIX/lib/libcppe$SHLIB_EXT        # [linux]
    - otool -L $PREFIX/lib/libcppe$SHLIB_EXT      # [osx]
    - conda inspect objects -p $PREFIX $PKG_NAME  # [osx]
    - conda inspect linkages --show-files --groupby=dependency cppe
    # Verify Python extension library
    - export PYLIB_EXT=`$PYTHON -c 'from numpy import distutils; print(distutils.misc_util.get_shared_lib_extension(is_python_ext=True))'`
    - test -f $SP_DIR/cppe$PYLIB_EXT                                      # [not win]
    - if not exist %PREFIX%\\Lib\\site-packages\\cppe%PYLIB_EXT% exit 1  # [win]
    # Inspect linkage
    - ldd -v $SP_DIR/cppe$PYLIB_EXT                                     # [linux]
    - otool -L $SP_DIR/cppe$PYLIB_EXT                                   # [osx]
  imports:
    - cppe
{'fraction_non_alphanumeric': 0.15481832543443919, 'fraction_numerical': 0.03317535545023697, 'mean_word_length': 2.2304421768707483, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7449863', 'n_tokens_mistral': 1513, 'n_tokens_neox': 1422, 'n_words': 291}