mirror of https://github.com/explosion/spaCy.git
get buildbot running
This commit is contained in:
parent
7be54fb52f
commit
710877c90f
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import sys
|
||||
from subprocess import call
|
||||
|
||||
|
||||
def x(cmd):
|
||||
print('$ '+cmd)
|
||||
res = call(cmd, shell=True)
|
||||
if res != 0:
|
||||
sys.exit(res)
|
||||
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print('usage: %s <install-mode> [<pip-date>]')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
install_mode = sys.argv[1]
|
||||
pip_date = len(sys.argv) > 2 and sys.argv[2]
|
||||
|
||||
|
||||
x('pip install -U pip')
|
||||
if pip_date:
|
||||
x('python pip-date.py %s pip setuptools wheel six' % pip_date)
|
||||
x('pip install -r requirements.txt')
|
||||
|
||||
if install_mode == 'pip':
|
||||
x('python setup.py sdist')
|
||||
x('pip install dist/*')
|
||||
|
||||
elif install_mode == 'setup-install':
|
||||
x('python setup.py install')
|
||||
|
||||
elif install_mode == 'setup-develop':
|
||||
x('python setup.py develop')
|
||||
x('pip install -e .')
|
||||
|
||||
x('pip install pytest')
|
||||
x('pip list')
|
||||
|
||||
if not os.path.exists('tmp'):
|
||||
os.mkdir('tmp')
|
||||
|
||||
try:
|
||||
old = os.getcwd()
|
||||
os.chdir('tmp')
|
||||
|
||||
x('python -m spacy.en.download')
|
||||
x('python -m pytest ../spacy/ -x --models --vectors --slow')
|
||||
|
||||
finally:
|
||||
os.chdir(old)
|
39
build.sh
39
build.sh
|
@ -1,39 +0,0 @@
|
|||
#!/bin/bash -x
|
||||
set -e
|
||||
|
||||
if [[ $# < 2 ]]; then
|
||||
echo "usage: $0 <python-path> <install-mode> [<pip-date>]"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -d ".build" ]; then
|
||||
virtualenv .build --python $1
|
||||
fi
|
||||
. .build/bin/activate
|
||||
|
||||
# install
|
||||
pip install -U pip
|
||||
|
||||
if [ -n "${3+1}" ]; then
|
||||
python pip-date.py $3 pip setuptools wheel six
|
||||
fi
|
||||
|
||||
pip install -r requirements.txt
|
||||
if [[ "$2" == "pip" ]]; then
|
||||
python setup.py sdist;
|
||||
pip install dist/*;
|
||||
fi
|
||||
if [[ "$2" == "setup-install" ]]; then
|
||||
python setup.py install;
|
||||
fi
|
||||
if [[ "$2" == "setup-develop" ]]; then
|
||||
python setup.py develop;
|
||||
pip install -e .;
|
||||
fi
|
||||
pip install pytest
|
||||
pip list
|
||||
|
||||
# script
|
||||
cd .build
|
||||
python -m spacy.en.download
|
||||
python -m pytest ../spacy/ -x --models --vectors --slow
|
|
@ -0,0 +1,13 @@
|
|||
param (
|
||||
[string]$python = $(throw "-python is required."),
|
||||
[string]$install_mode = $(throw "-install_mode is required."),
|
||||
[string]$pip_date
|
||||
)
|
||||
|
||||
if(!(Test-Path -Path ".build"))
|
||||
{
|
||||
virtualenv .build --python $python
|
||||
}
|
||||
.build\Scripts\activate.ps1
|
||||
|
||||
python build.py $python $install_mode $pip_date
|
Loading…
Reference in New Issue