From a554828931dee19163caa3486560f5e7ee850c9c Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 22 Mar 2013 15:21:04 -0400 Subject: [PATCH] invoke! --- invokefile.py | 5 +++++ requirements.txt | 5 +++-- tasks.py | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 invokefile.py create mode 100644 tasks.py 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) -- 2.7.4