Skip to content

Commit

Permalink
Revert "FTS-1230 Use Rwquest as the default request class instead of …
Browse files Browse the repository at this point in the history
…PyCurl, also update setup.py in order not to install pycurl"

This reverts commit 7d39f24.
  • Loading branch information
andrea-manzi committed Aug 22, 2018
1 parent 6b83b2c commit c71f4ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
14 changes: 2 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ 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 setup.py install -e .[pycurl] should be called
install_pycurl = False
for arg in sys.argv:
if 'pycurl' in arg:
install_pycurl = True
break

# Ugly hack to pick a version that compiles in SLC6
pycurl_ver = '>=7.19'
dist = platform.dist()
Expand All @@ -57,8 +49,7 @@ def apply_pycurl_workaround():
os_major = dist[1].split('.')[0]
if os_major == '6':
pycurl_ver = '==7.19.0'
if install_pycurl:
apply_pycurl_workaround()
apply_pycurl_workaround()
elif os_major == '5':
pycurl_ver = '==7.15.5'

Expand Down Expand Up @@ -88,8 +79,7 @@ def apply_pycurl_workaround():
"Programming Language :: Python"
],

install_requires=['M2Crypto>=0.16', 'requests'],
extras_require={'pycurl': ['pycurl%s' % pycurl_ver]}
install_requires=['M2Crypto>=0.16', 'pycurl%s' % pycurl_ver, 'requests']
)

# Need to install these first so the dependencies can be built!
Expand Down
4 changes: 2 additions & 2 deletions src/fts3/rest/client/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import urllib

from exceptions import *
#from pycurlRequest import PycurlRequest
from pycurlRequest import PycurlRequest
from request import Request

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -146,7 +146,7 @@ def _validate_endpoint(self):
return endpoint_info

def __init__(self, endpoint, ucert=None, ukey=None, verify=True, access_token=None, no_creds=False, capath=None,
request_class=Request, connectTimeout=30, timeout=30):
request_class=PycurlRequest, connectTimeout=30, timeout=30):
self.passwd = None

self._set_endpoint(endpoint)
Expand Down

0 comments on commit c71f4ce

Please sign in to comment.