Commit 7d39f24e authored by Aris Angelogiannopoulos's avatar Aris Angelogiannopoulos
Browse files

FTS-1230 Use Rwquest as the default request class instead of PyCurl, also...

FTS-1230 Use Rwquest as the default request class instead of PyCurl, also update in order not to install pycurl
parent c0f8a54a
Pipeline #414776 passed with stage
in 6 minutes and 33 seconds
......@@ -40,6 +40,14 @@ def apply_pycurl_workaround():
os.system('pip install --build %s %s/pycurl' % (tmp_dir, tmp_dir))
# Due to FTS-1230, PYCURL is now an optional dependency, so look for it in the arguments
# python install -e .[pycurl] should be called
install_pycurl = False
for arg in sys.argv:
if 'pycurl' in arg:
install_pycurl = True
# Ugly hack to pick a version that compiles in SLC6
pycurl_ver = '>=7.19'
dist = platform.dist()
......@@ -49,7 +57,8 @@ if dist[0] in ('redhat', 'centos'):
os_major = dist[1].split('.')[0]
if os_major == '6':
pycurl_ver = '==7.19.0'
if install_pycurl:
elif os_major == '5':
pycurl_ver = '==7.15.5'
......@@ -79,7 +88,8 @@ setup(
"Programming Language :: Python"
install_requires=['M2Crypto>=0.16', 'pycurl%s' % pycurl_ver, 'requests']
install_requires=['M2Crypto>=0.16', 'requests'],
extras_require={'pycurl': ['pycurl%s' % pycurl_ver]}
# Need to install these first so the dependencies can be built!
......@@ -32,7 +32,7 @@ import sys
import urllib
from exceptions import *
from pycurlRequest import PycurlRequest
#from pycurlRequest import PycurlRequest
from request import Request
log = logging.getLogger(__name__)
......@@ -146,7 +146,7 @@ class Context(object):
return endpoint_info
def __init__(self, endpoint, ucert=None, ukey=None, verify=True, access_token=None, no_creds=False, capath=None,
request_class=PycurlRequest, connectTimeout=30, timeout=30):
request_class=Request, connectTimeout=30, timeout=30):
self.passwd = None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment