Skip to content

Commit c71f4ce

Browse files
committed
Revert "FTS-1230 Use Rwquest as the default request class instead of PyCurl, also update setup.py in order not to install pycurl"
This reverts commit 7d39f24.
1 parent 6b83b2c commit c71f4ce

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

setup.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ def apply_pycurl_workaround():
4040
os.system('pip install --build %s %s/pycurl' % (tmp_dir, tmp_dir))
4141

4242

43-
# Due to FTS-1230, PYCURL is now an optional dependency, so look for it in the arguments
44-
# python setup.py install -e .[pycurl] should be called
45-
install_pycurl = False
46-
for arg in sys.argv:
47-
if 'pycurl' in arg:
48-
install_pycurl = True
49-
break
50-
5143
# Ugly hack to pick a version that compiles in SLC6
5244
pycurl_ver = '>=7.19'
5345
dist = platform.dist()
@@ -57,8 +49,7 @@ def apply_pycurl_workaround():
5749
os_major = dist[1].split('.')[0]
5850
if os_major == '6':
5951
pycurl_ver = '==7.19.0'
60-
if install_pycurl:
61-
apply_pycurl_workaround()
52+
apply_pycurl_workaround()
6253
elif os_major == '5':
6354
pycurl_ver = '==7.15.5'
6455

@@ -88,8 +79,7 @@ def apply_pycurl_workaround():
8879
"Programming Language :: Python"
8980
],
9081

91-
install_requires=['M2Crypto>=0.16', 'requests'],
92-
extras_require={'pycurl': ['pycurl%s' % pycurl_ver]}
82+
install_requires=['M2Crypto>=0.16', 'pycurl%s' % pycurl_ver, 'requests']
9383
)
9484

9585
# Need to install these first so the dependencies can be built!

src/fts3/rest/client/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import urllib
3333

3434
from exceptions import *
35-
#from pycurlRequest import PycurlRequest
35+
from pycurlRequest import PycurlRequest
3636
from request import Request
3737

3838
log = logging.getLogger(__name__)
@@ -146,7 +146,7 @@ def _validate_endpoint(self):
146146
return endpoint_info
147147

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

152152
self._set_endpoint(endpoint)

0 commit comments

Comments
 (0)