Project

General

Profile

Bug #8361

pycurl fails to build

Added by Alexander Pyhalov over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-06-10
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

pycurl fails to build with the following error:

Using curl-config (libcurl 7.54.0)
Traceback (most recent call last):
  File "./setup.py", line 823, in <module>
    ext = get_extension(sys.argv, split_extension_source=split_extension_source)
  File "./setup.py", line 497, in get_extension
    ext_config = ExtensionConfiguration(argv)
  File "./setup.py", line 71, in __init__
    self.configure()
  File "./setup.py", line 211, in configure_unix
    for arg in split_quoted(optbuf):
  File "/usr/lib/python2.7/distutils/util.py", line 257, in split_quoted
    if s[end] in string.whitespace: # unescaped, unquoted whitespace: now

The issue is that in C locale string.whitespace contain 0xa0 (160) symbol , nbsp. It shouldn't be there. It comes from strop module. The code in strop module seems to be correct:

    for (c = 0; c < 256; c++) {
        if (isspace(c))
            buf[n++] = c;
    }

and such code works correctly in C locale when compiled separately.
But when in Python it emits additional 160 symbol. So far to workaround an issue we don't import whitespace symbols from strop module.

History

#2

Updated by Alexander Pyhalov over 2 years ago

The issue is caused by #8362 . Workaround should be removed when build server is updated to version, which includes fix for #8362 .

Also available in: Atom PDF