python compilation issue on pylint

Yaakov Selkowitz yselkowitz@cygwin.com
Wed Jan 2 04:29:00 GMT 2019


On Thu, 2018-12-20 at 06:19 +0100, Marco Atzeri wrote:
> I am trying to build a recent pylint with the attached cygport
> but the following error is puzzling me
> 
> /usr/lib/python3.6/assert_on_tuple.py:11: SyntaxWarning: assertion is
> always true, perhaps remove parentheses?
> *** Error compiling
> '/cygdrive/d/cyg_pub/devel/python-module/python3-pylint-2.2.2-1.x86_64/inst/usr/lib/python3.6/site-packages/pylint/test/functional/anomalous_unicode_escape_py2.py'...
>    File "/usr/lib/python3.6/anomalous_unicode_escape_py2.py", line 17
>      RAW_UNICODE = ur"\u0062\n"
>                               ^
> SyntaxError: invalid syntax

This appears to be a(n old?) Py2-specific test, which won't byte-
compile with Py3 because of the language changes in between.  However,
as this is simply a testcase, it doesn't really have to be installed at
all.  FWIW, Fedora just removes the tests entirely, and I would
recommend the same.  Presuming you are using python3-wheel (since
pylint 2.x does not support Py2), try the following:

src_install() {
    cd ${B}
    python3_wheel_install
    find ${D}${PYTHON3_SITELIB}/pylint/test/ -delete
}

--
Yaakov



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list