public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* python compilation issue on pylint
@ 2018-12-20  9:42 Marco Atzeri
  2019-01-02  4:29 ` Yaakov Selkowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Marco Atzeri @ 2018-12-20  9:42 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]


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

[-- Attachment #2: python3-pylint.cygport --]
[-- Type: text/plain, Size: 952 bytes --]

inherit python3-wheel

NAME="python3-pylint"
VERSION=2.2.2
RELEASE=1
CATEGORY="Python"
SUMMARY="Python static code checker"
DESCRIPTION="Analyzes source code for programming errors, helps enforcing a coding
standard and sniffs for some code smells (as defined in Martin
Fowler's Refactoring book). Pylint can be seen as another PyChecker
since nearly all tests you can do with PyChecker can also be done with
Pylint. However, Pylint offers some more features, like checking
length of lines of code, checking if variable names are well-formed
according to your coding standard, or checking if declared interfaces
are truly implemented, and much more."

HOMEPAGE="https://github.com/PyCQA/pylint"
SRC_URI="https://github.com/PyCQA/pylint/archive/pylint-${VERSION}.tar.gz"
SRC_DIR="pylint-pylint-${VERSION}"

# interferes with get_flags_linker_so in numpy.distutils.fcompiler
unset LDFLAGS

python3_pylint_CONTENTS="usr/bin/*3 ${python3_pylint_CONTENTS}"

[-- Attachment #3: Type: text/plain, Size: 219 bytes --]


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: python compilation issue on pylint
  2018-12-20  9:42 python compilation issue on pylint Marco Atzeri
@ 2019-01-02  4:29 ` Yaakov Selkowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Yaakov Selkowitz @ 2019-01-02  4:29 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-02  4:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-20  9:42 python compilation issue on pylint Marco Atzeri
2019-01-02  4:29 ` Yaakov Selkowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).