mirror of https://github.com/explosion/spaCy.git
* Fabfile changes
This commit is contained in:
parent
a179f1fc52
commit
e5d4b5faf4
|
@ -1,15 +1,67 @@
|
|||
from fabric.api import local, run, lcd, cd, env
|
||||
from os.path import exists as file_exists
|
||||
from fabtools.python import virtualenv
|
||||
from os import path
|
||||
import json
|
||||
|
||||
from fabric.api import local, run, lcd, cd, env
|
||||
|
||||
PWD = path.dirname(__file__)
|
||||
VENV_DIR = path.join(PWD, '.env')
|
||||
|
||||
|
||||
def sdist():
|
||||
if file_exists('dist/'):
|
||||
local('rm -rf dist/')
|
||||
local('mkdir dist')
|
||||
with virtualenv(VENV_DIR):
|
||||
local('pip install --upgrade setuptools')
|
||||
local('pip install murmurhash')
|
||||
local('pip install numpy')
|
||||
local('python setup.py sdist')
|
||||
|
||||
|
||||
def publish():
|
||||
with virtualenv(VENV_DIR):
|
||||
local('python setup.py register')
|
||||
local('twine upload dist/*.tar.gz')
|
||||
|
||||
|
||||
def setup():
|
||||
if file_exists('.env'):
|
||||
local('rm -rf .env')
|
||||
local('virtualenv .env')
|
||||
|
||||
|
||||
def install():
|
||||
with virtualenv(VENV_DIR):
|
||||
local('pip install dist/*.tar.gz')
|
||||
local('pip install pytest')
|
||||
|
||||
|
||||
def make():
|
||||
local('python setup.py build_ext --inplace > /dev/null 2> /tmp/err')
|
||||
with virtualenv(VENV_DIR):
|
||||
with lcd(path.dirname(__file__)):
|
||||
local('python dev_setup.py build_ext --inplace > /dev/null')
|
||||
|
||||
|
||||
def vmake():
|
||||
local('python setup.py build_ext --inplace')
|
||||
with virtualenv(VENV_DIR):
|
||||
with lcd(path.dirname(__file__)):
|
||||
local('python dev_setup.py build_ext --inplace')
|
||||
|
||||
|
||||
|
||||
def clean():
|
||||
with lcd(path.dirname(__file__)):
|
||||
local('python dev_setup.py clean --all')
|
||||
|
||||
|
||||
def test():
|
||||
with virtualenv(VENV_DIR):
|
||||
with lcd(path.dirname(__file__)):
|
||||
local('py.test -x')
|
||||
|
||||
|
||||
def clean():
|
||||
local('python setup.py clean --all')
|
||||
|
||||
|
@ -18,12 +70,11 @@ def docs():
|
|||
with lcd('docs'):
|
||||
local('make html')
|
||||
|
||||
def test():
|
||||
local('py.test -x')
|
||||
|
||||
def sbox():
|
||||
local('python sb_setup.py build_ext --inplace')
|
||||
|
||||
|
||||
def sbclean():
|
||||
local('python sb_setup.py clean --all')
|
||||
|
||||
|
|
Loading…
Reference in New Issue