This repository has been archived by the owner on Apr 2, 2020. It is now read-only.
forked from geertj/gruvi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks.py
48 lines (38 loc) · 1.47 KB
/
tasks.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#
# This file is part of Gruvi. Gruvi is free software available under the
# terms of the MIT license. See the file "LICENSE" that was provided
# together with this source file for the licensing terms.
#
# Copyright (c) 2012-2014 the Gruvi authors. See the file "AUTHORS" for a
# complete list.
from __future__ import absolute_import, print_function
from invoke import run, task
@task
def clean():
run('find . -name __pycache__ | xargs rm -rf || :', echo=True)
run('find . -name \*.so | xargs rm -f', echo=True)
run('find . -name \*.pyc | xargs rm -f', echo=True)
run('find . -name \*.egg-info | xargs rm -rf', echo=True)
run('rm -rf build dist', echo=True)
run('rm -rf docs/_build/*', echo=True)
@task(clean)
def develop():
run('python setup.py build', echo=True)
if develop:
run('python setup.py develop', echo=True)
@task
def checksdist():
from setup import version_info
run('git ls-files | sort > files.git')
run('rm -rf lib/*.egg-info')
run('python setup.py sdist >/dev/null 2>&1')
run('tar tfz dist/{name}-{version}.tar.gz'
' | sed -e \'s/^{name}-{version}\///\' -e \'/\/$/d\' -e \'/^$/d\''
' | sort > files.sdist'.format(**version_info))
run('diff -u files.git files.sdist || true')
run('rm files.git; rm files.sdist')
@task
def buildwheels():
run('tox -e py27 -- python setup.py bdist_wheel')
run('tox -e py33 -- python setup.py bdist_wheel')
run('tox -e py34 -- python setup.py bdist_wheel')