forked from psf/requests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tasks.py
32 lines (24 loc) · 802 Bytes
/
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
# -*- 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)