<commit_before>version: 1.0.{build}
environment:
  BARST_BUILD_DIR: C:\barst_build
  BARST_RELEASE: https://github.com/matham/barst/releases/download/v2.1/
  DEPLOY_DIR: deploy
  access_token:
    secure: <KEY>
  matrix:
  - PYVER: 27
    BITTNESS: 32
  - PYVER: 34
    BITTNESS: 32
  - PYVER: 27
    BITTNESS: 64
  - PYVER: 34
    BITTNESS: 64
build_script:
- ps: >-
    function Check-Error

    {
      param([int]$SuccessVal = 0)
      if ($SuccessVal -ne $LastExitCode) {
        throw "Failed with exit code $LastExitCode"
      }
    }

    $old_path = "$env:PYTHONPATH"

    $env:PYTHONPATH = "$env:APPVEYOR_BUILD_FOLDER;$env:PYTHONPATH"

    $env:BARST_INCLUDE = "$env:BARST_BUILD_DIR\include"

    $env:PYBARST_BINARIES = "$env:BARST_BUILD_DIR\bin"

    if ($env:BITTNESS -eq "64") {
      $PYTHON_ROOT = "C:\Python$env:PYVER-x64"
    } else {
      $PYTHON_ROOT = "C:\Python$env:PYVER"
    }

    $env:PATH = "$PYTHON_ROOT;$PYTHON_ROOT\Scripts;$env:PATH;C:\Program Files\7-Zip"


    python -c "import sys;print('Python version is {}'.format(sys.version))"

    Check-Error


    mkdir "$env:BARST_BUILD_DIR"

    Check-Error

    mkdir "$env:BARST_INCLUDE"

    Check-Error

    mkdir "$env:PYBARST_BINARIES"

    Check-Error

    mkdir "$env:DEPLOY_DIR"

    Check-Error

    python -c "with open(r'$PYTHON_ROOT\Lib\distutils\distutils.cfg', 'wb') as fh: fh.write(b'[build]\ncompiler = mingw32\n')"

    Check-Error

    python -m pip install pip wheel setuptools --upgrade

    Check-Error

    pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy

    Check-Error

    pip install cython nose

    Check-Error



    cd "$env:BARST_INCLUDE"

    Invoke-WebRequest "$BARST_RELEASE`cpl.defs.h" -OutFile "cpl defs.h"

    Check-Error

    cd "$env:PYBARST_BINARIES"

    if ($env:BITTNESS -eq "64") {
        Invoke-WebRequest "$BARST_RELEASE`barst64.exe" -OutFile "barst64.exe"
        Check-Error
        Invoke-WebRequest "$BARST_RELEASE`cbw64.dll" -OutFile "cbw64.dll"
        Check-Error
    } else {
        Invoke-WebRequest "$BARST_RELEASE`barst.exe" -OutFile "barst.exe"
        Check-Error
        Invoke-WebRequest "$BARST_RELEASE`cbw32.dll" -OutFile "cbw32.dll"
        Check-Error
    }



    cd "$env:APPVEYOR_BUILD_FOLDER"

    python setup.py bdist_wheel -d "$env:DEPLOY_DIR"

    Check-Error

    if ($env:BITTNESS -eq "64" -and $env:PYVER -eq "34") {
      python setup.py sdist -d "$env:DEPLOY_DIR"
      Check-Error
    }
<commit_msg>Fix appveyor env variable.<commit_after>version: 1.0.{build}
environment:
  BARST_BUILD_DIR: C:\barst_build
  BARST_RELEASE: https://github.com/matham/barst/releases/download/v2.1/
  DEPLOY_DIR: deploy
  access_token:
    <KEY>
  matrix:
  - PYVER: 27
    BITTNESS: 32
  - PYVER: 34
    BITTNESS: 32
  - PYVER: 27
    BITTNESS: 64
  - PYVER: 34
    BITTNESS: 64
build_script:
- ps: >-
    function Check-Error

    {
      param([int]$SuccessVal = 0)
      if ($SuccessVal -ne $LastExitCode) {
        throw "Failed with exit code $LastExitCode"
      }
    }

    $old_path = "$env:PYTHONPATH"

    $env:PYTHONPATH = "$env:APPVEYOR_BUILD_FOLDER;$env:PYTHONPATH"

    $env:BARST_INCLUDE = "$env:BARST_BUILD_DIR\include"

    $env:PYBARST_BINARIES = "$env:BARST_BUILD_DIR\bin"

    if ($env:BITTNESS -eq "64") {
      $PYTHON_ROOT = "C:\Python$env:PYVER-x64"
    } else {
      $PYTHON_ROOT = "C:\Python$env:PYVER"
    }

    $env:PATH = "$PYTHON_ROOT;$PYTHON_ROOT\Scripts;$env:PATH;C:\Program Files\7-Zip"


    python -c "import sys;print('Python version is {}'.format(sys.version))"

    Check-Error


    mkdir "$env:BARST_BUILD_DIR"

    Check-Error

    mkdir "$env:BARST_INCLUDE"

    Check-Error

    mkdir "$env:PYBARST_BINARIES"

    Check-Error

    mkdir "$env:DEPLOY_DIR"

    Check-Error

    python -c "with open(r'$PYTHON_ROOT\Lib\distutils\distutils.cfg', 'wb') as fh: fh.write(b'[build]\ncompiler = mingw32\n')"

    Check-Error

    python -m pip install pip wheel setuptools --upgrade

    Check-Error

    pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy

    Check-Error

    pip install cython nose

    Check-Error



    cd "$env:BARST_INCLUDE"

    Invoke-WebRequest "$env:BARST_RELEASE`cpl.defs.h" -OutFile "cpl defs.h"

    Check-Error

    cd "$env:PYBARST_BINARIES"

    if ($env:BITTNESS -eq "64") {
        Invoke-WebRequest "$env:BARST_RELEASE`barst64.exe" -OutFile "barst64.exe"
        Check-Error
        Invoke-WebRequest "$env:BARST_RELEASE`cbw64.dll" -OutFile "cbw64.dll"
        Check-Error
    } else {
        Invoke-WebRequest "$env:BARST_RELEASE`barst.exe" -OutFile "barst.exe"
        Check-Error
        Invoke-WebRequest "$env:BARST_RELEASE`cbw32.dll" -OutFile "cbw32.dll"
        Check-Error
    }



    cd "$env:APPVEYOR_BUILD_FOLDER"

    python setup.py bdist_wheel -d "$env:DEPLOY_DIR"

    Check-Error

    if ($env:BITTNESS -eq "64" -and $env:PYVER -eq "34") {
      python setup.py sdist -d "$env:DEPLOY_DIR"
      Check-Error
    }

{'fraction_non_alphanumeric': 0.13235589475798354, 'fraction_numerical': 0.018477605944968868, 'mean_word_length': 2.7957317073170733, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '4685510', 'n_tokens_mistral': 2150, 'n_tokens_neox': 1895, 'n_words': 346}