From: Kenneth Reitz Date: Fri, 22 Mar 2013 19:21:04 +0000 (-0400) Subject: invoke! X-Git-Tag: v1.2.0~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a554828931dee19163caa3486560f5e7ee850c9c;p=services%2Fpython-requests.git invoke! --- diff --git a/invokefile.py b/invokefile.py new file mode 100644 index 0000000..2c97ed5 --- /dev/null +++ b/invokefile.py @@ -0,0 +1,5 @@ +from invoke import run, task + +@task +def build(): + print("Building!") \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 657011a..c88bf43 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ -pytest -sphinx \ No newline at end of file +py==1.4.12 +pytest==2.3.4 +invoke==0.2.0 \ No newline at end of file diff --git a/tasks.py b/tasks.py new file mode 100644 index 0000000..8e12cc8 --- /dev/null +++ b/tasks.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- + +import requests +from invoke import run, task + +@task +def test(): + run('py.test', pty=True) + +@task +def deps(): + print('Vendoring urllib3...') + + run('rm -fr requests/packages/urllib3') + run('git clone https://github.com/shazow/urllib3.git') + run('mv urllib3/urllib3 requests/packages/') + run('rm -fr urllib3') + + print('Vendoring Charade...') + + run('rm -fr requests/packages/charade') + run('git clone https://github.com/sigmavirus24/charade.git') + run('mv charade/charade requests/packages/') + run('rm -fr charade') + +@task +def certs(): + print('Grabbing latest CA Bundle...') + r = requests.get('https://raw.github.com/kennethreitz/certifi/master/certifi/cacert.pem') + + with open('requests/cacert.pem', 'w') as f: + f.write(r.content)