{% set data = load_setup_py_data(setup_file='conda/_conda_vers.py') %}

package:
  name: psi4
  version: {{ data.get('version') }}

source:
  path: ../..

requirements:
  run:
    - deepdiff
    - intel-openmp={{ MKL_VERSION }}
    - mkl={{ MKL_VERSION }}
    - networkx
    - numpy
    - pytest
    - python={{ PY_VER }}
    - qcelemental

build:
  string: py{{ environ['PY_VER'].replace('.', '') }}_{{ 'debug' if environ['CMAKE_BUILD_TYPE'] == 'Debug' else '0' }}
  script:
    - copy /y {{ INSTALL_DIR }}\bin\psi4     {{ PREFIX }}\Scripts
    - copy /y {{ INSTALL_DIR }}\bin\psi4.bat {{ PREFIX }}\Scripts
    - echo __pycache__ > exclude.txt
    - xcopy /f /i /s /exclude:exclude.txt {{ INSTALL_DIR }}\lib\psi4 {{ SP_DIR }}\psi4
    - xcopy /f /i /s {{ INSTALL_DIR }}\share\psi4\basis       {{ PREFIX }}\Lib\share\psi4\basis
    - xcopy /f /i /s {{ INSTALL_DIR }}\share\psi4\plugin      {{ PREFIX }}\Lib\share\psi4\plugin
    - xcopy /f /i /s {{ INSTALL_DIR }}\share\psi4\quadratures {{ PREFIX }}\Lib\share\psi4\quadratures
    {% if environ['CMAKE_BUILD_TYPE'] == 'Debug' %}
    - copy /y {{ SYSTEMROOT }}\System32\msvcp140d.dll     {{ PREFIX }}
    - copy /y {{ SYSTEMROOT }}\System32\vcomp140d.dll     {{ PREFIX }}
    - copy /y {{ SYSTEMROOT }}\System32\vcruntime140d.dll {{ PREFIX }}
    - copy /y {{ SYSTEMROOT }}\System32\ucrtbased.dll     {{ PREFIX }}
    {% endif %}

test:
  commands:
    - python -c "import psi4; assert psi4.test('quick') == 0"
    - psi4 --test quick
