Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
File Transfer Service
fts-rest
Commits
13787df4
Commit
13787df4
authored
Oct 05, 2018
by
Andrea Manzi
Browse files
FTS-1295
: apply workaround for pycurl on el7
parent
4c632dee
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
13787df4
...
...
@@ -40,13 +40,25 @@ def apply_pycurl_workaround():
os
.
system
(
'pip install --build %s %s/pycurl'
%
(
tmp_dir
,
tmp_dir
))
# On EL7, you will probably have trouble installing pycurl due to this:
# https://github.com/pycurl/pycurl/issues/526 which has not yet released
# so we need to install a previos version of pycurl with
# pip install build/pycurl
def
apply_pycurl_workaround_on_el7
():
print
"Applying workaround for pycurl in EL7"
is_pycurl_installed
=
(
os
.
system
(
'pip list | grep pycurl &> /dev/null'
)
==
0
)
if
not
is_pycurl_installed
:
os
.
system
(
'pip install pycurl%s --global-option="--with-nss"'
%
pycurl_ver
)
# Ugly hack to pick a version that compiles in SLC6
pycurl_ver
=
'>= 7.19, <= 7.43.0.1'
dist
=
platform
.
dist
()
if
dist
[
0
]
in
(
'redhat'
,
'centos'
):
apply_m2crypto_workaround
()
os_major
=
dist
[
1
].
split
(
'.'
)[
0
]
if
os_major
==
'7'
:
pycurl_ver
=
'==7.43.0.1'
apply_pycurl_workaround_on_el7
()
if
os_major
==
'6'
:
pycurl_ver
=
'==7.19.0'
apply_pycurl_workaround
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment