python compilation issue on pylint

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

python compilation issue on pylint

marco atzeri-4

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


changing in
   RAW_UNICODE = ur'\u0062\n'
or
   RAW_UNICODE = ur"\u0062"

make no difference.

Any clue what can cause it ?
For what I see the code was always there
https://github.com/PyCQA/pylint/commits/master/pylint/test/functional/anomalous_unicode_escape_py2.py

so it seems a cygwin build issue only.

Regards
Marco


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren gepr├╝ft.
https://www.avast.com/antivirus


--
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

python3-pylint.cygport (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: python compilation issue on pylint

Yaakov Selkowitz
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