forked from dbr/tvnamer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfabfile.py
42 lines (28 loc) · 972 Bytes
/
fabfile.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
from fabric.api import task, local
from fabric.contrib.console import confirm
pylint_disable = ",".join(["R0903", "C0103", "R0903", "F0401", "C0301"])
pep8_disable = ",".join(["E501"])
@task
def pyflakes():
local("pyflakes .")
@task
def pep8():
local("python tools/pep8.py --ignore={pep8_disable} --repeat *.py tvnamer/*.py tests/*.py".format(pep8_disable = pep8_disable))
@task
def pylint():
local("pylint --reports=n --disable-msg={pylint_disable} *.py tvnamer/*.py tests/*.py".format(pylint_disable = pylint_disable))
@task(default=True)
def test():
local("nosetests")
@task
def topypi():
import sys
sys.path.insert(0, ".")
import tvnamer
version = tvnamer.__version__
tvnamer_version = ".".join(str(x) for x in version)
msg = "Upload tvnamer {0} to PyPi?".format(tvnamer_version)
if not confirm(msg, default = False):
print "Cancelled"
return
local("python setup.py sdist register upload")