pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-lama py-lama: fix Python 3.7 compatibility



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d3ef07ff8749
branches:  trunk
changeset: 382486:d3ef07ff8749
user:      adam <adam%pkgsrc.org@localhost>
date:      Thu Jul 05 11:23:29 2018 +0000

description:
py-lama: fix Python 3.7 compatibility

diffstat:

 devel/py-lama/Makefile                       |   6 ++--
 devel/py-lama/distinfo                       |   4 ++-
 devel/py-lama/patches/patch-pylama_config.py |  37 ++++++++++++++++++++++++++++
 devel/py-lama/patches/patch-pylama_main.py   |  25 ++++++++++++++++++
 4 files changed, 68 insertions(+), 4 deletions(-)

diffs (106 lines):

diff -r 8c76da40758a -r d3ef07ff8749 devel/py-lama/Makefile
--- a/devel/py-lama/Makefile    Thu Jul 05 10:57:48 2018 +0000
+++ b/devel/py-lama/Makefile    Thu Jul 05 11:23:29 2018 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.3 2017/09/15 12:54:31 adam Exp $
+# $NetBSD: Makefile,v 1.4 2018/07/05 11:23:29 adam Exp $
 
 DISTNAME=      pylama-7.4.3
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/py//}
+PKGREVISION=   1
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pylama/}
 
@@ -16,8 +17,7 @@
 DEPENDS+=      ${PYPKGPREFIX}-mccabe>=0.5.2:../../devel/py-mccabe
 DEPENDS+=      ${PYPKGPREFIX}-py-[0-9]*:../../devel/py-py
 DEPENDS+=      ${PYPKGPREFIX}-radon-[0-9]*:../../devel/py-radon
-# TEST_DEPENDS
-BUILD_DEPENDS+=        ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
+TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
 
 post-install:
        cd ${DESTDIR}${PREFIX}/bin && ${MV} pylama pylama${PYVERSSUFFIX} || ${TRUE}
diff -r 8c76da40758a -r d3ef07ff8749 devel/py-lama/distinfo
--- a/devel/py-lama/distinfo    Thu Jul 05 10:57:48 2018 +0000
+++ b/devel/py-lama/distinfo    Thu Jul 05 11:23:29 2018 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.3 2017/09/15 12:54:31 adam Exp $
+$NetBSD: distinfo,v 1.4 2018/07/05 11:23:29 adam Exp $
 
 SHA1 (pylama-7.4.3.tar.gz) = 45e4780ea0d492df7c7a35ed358610f69f075fff
 RMD160 (pylama-7.4.3.tar.gz) = 122aae2985f3bd3402e394dc9ac41fa2e36e5728
 SHA512 (pylama-7.4.3.tar.gz) = 7d4ab9cb0a1390fa4d2dc96bd88cac52b4ec5a4a72e08e1e6dab913fea06e5bb19c761c1c23dcddf91a297f6688a1196e52cdd2f05dc9cb8564d3178a99e27b8
 Size (pylama-7.4.3.tar.gz) = 28631 bytes
+SHA1 (patch-pylama_config.py) = 0b2dd66c33b60d6c5da75aae421172dd4a3717ec
+SHA1 (patch-pylama_main.py) = 33b955fac19021faedc54b0dad3ff8c719268bd3
diff -r 8c76da40758a -r d3ef07ff8749 devel/py-lama/patches/patch-pylama_config.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-lama/patches/patch-pylama_config.py      Thu Jul 05 11:23:29 2018 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-pylama_config.py,v 1.1 2018/07/05 11:23:29 adam Exp $
+
+Fix Python 3.7 compatibility.
+https://github.com/klen/pylama/pull/120/commits/fb8cab00ab7881c1f5b01e0b541cde7957f65fb5
+
+--- pylama/config.py.orig      2017-09-13 14:15:27.000000000 +0000
++++ pylama/config.py
+@@ -128,7 +128,7 @@ PARSER.add_argument(
+     "--hook", action="store_true", help="Install Git (Mercurial) hook.")
+ 
+ PARSER.add_argument(
+-    "--async", action="store_true",
++    "--async", action="store_true", dest='async_mode',
+     help="Enable async mode. Useful for checking a lot of files. "
+     "Unsupported with pylint.")
+ 
+@@ -168,6 +168,8 @@ def parse_options(args=None, config=True
+     if config:
+         cfg = get_config(str(options.options), rootdir=rootdir)
+         for opt, val in cfg.default.items():
++            if opt == 'async':
++                opt = 'async_mode'
+             LOGGER.info('Find option %s (%s)', opt, val)
+             passed_value = getattr(options, opt, _Default())
+             if isinstance(passed_value, _Default):
+@@ -199,9 +201,9 @@ def parse_options(args=None, config=True
+         if isinstance(value, _Default):
+             setattr(options, name, process_value(name, value.value))
+ 
+-    if options.async and 'pylint' in options.linters:
++    if options.async_mode and 'pylint' in options.linters:
+         LOGGER.warning('Can\'t parse code asynchronously with pylint enabled.')
+-        options.async = False
++        options.async_mode = False
+ 
+     return options
+ 
diff -r 8c76da40758a -r d3ef07ff8749 devel/py-lama/patches/patch-pylama_main.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-lama/patches/patch-pylama_main.py        Thu Jul 05 11:23:29 2018 +0000
@@ -0,0 +1,25 @@
+$NetBSD: patch-pylama_main.py,v 1.1 2018/07/05 11:23:29 adam Exp $
+
+Fix Python 3.7 compatibility.
+https://github.com/klen/pylama/pull/120/commits/fb8cab00ab7881c1f5b01e0b541cde7957f65fb5
+
+--- pylama/main.py.orig        2016-10-25 17:22:56.000000000 +0000
++++ pylama/main.py
+@@ -7,7 +7,7 @@ from os import walk, path as op
+ 
+ from .config import parse_options, CURDIR, setup_logger
+ from .core import LOGGER, run
+-from .async import check_async
++from .async_mode import check_async
+ 
+ 
+ def check_path(options, rootdir=None, candidates=None, code=None):
+@@ -43,7 +43,7 @@ def check_path(options, rootdir=None, ca
+ 
+         paths.append(path)
+ 
+-    if options.async:
++    if options.async_mode:
+         return check_async(paths, options, rootdir)
+ 
+     errors = []



Home | Main Index | Thread Index | Old Index