View | Details | Raw Unified | Return to bug 246679
Collapse All | Expand All

(-)textproc/py-jc/Makefile (+24 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	jc
4
DISTVERSION=	1.11.0
5
CATEGORIES=	textproc python
6
MASTER_SITES=	CHEESESHOP
7
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
9
MAINTAINER=	vulcan@wired.sh
10
COMMENT=	Converts output of popular command-line tools and file-types to JSON
11
12
LICENSE=	MIT
13
LICENSE_FILE=	${WRKSRC}/LICENSE.md
14
15
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pygments>=2.4.2:textproc/py-pygments@${PY_FLAVOR} \
16
		${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.15.0:devel/py-ruamel.yaml@${PY_FLAVOR} \
17
		${PYTHON_PKGNAMEPREFIX}xmltodict>=0.12.0:devel/py-xmltodict@${PY_FLAVOR}
18
19
USES=		python:3.6+
20
USE_PYTHON=	autoplist distutils
21
22
NO_ARCH=	yes
23
24
.include <bsd.port.mk>
(-)textproc/py-jc/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1590246208
2
SHA256 (jc-1.11.0.tar.gz) = b754e3e34b0b29db629d4340a13e09f4f50f74a932ba0a5203d42bfbd49f46a4
3
SIZE (jc-1.11.0.tar.gz) = 86873
(-)textproc/py-jc/files/patch-jc_utils.py (+26 lines)
Line 0 Link Here
1
Platform check fails as sys.platform returns 'freebsd' plus
2
the release version e.g., 'freebsd12' and so forth where the string
3
'freebsd' is only listed as compatible.
4
5
--- jc/utils.py.orig	2020-05-23 14:53:34 UTC
6
+++ jc/utils.py
7
@@ -1,8 +1,8 @@
8
 """jc - JSON CLI output utility utils"""
9
 import textwrap
10
 import sys
11
+import re
12
 
13
-
14
 def warning_message(message):
15
     """
16
     Prints a warning message for non-fatal issues
17
@@ -56,7 +56,8 @@ def compatibility(mod_name, compatible):
18
 
19
         no return, just prints output to STDERR
20
     """
21
-    if sys.platform not in compatible:
22
+    platform = re.sub(r'\d+', '', sys.platform)
23
+    if platform not in compatible:
24
         mod = mod_name.split('.')[-1]
25
         compat_list = ', '.join(compatible)
26
         warning_message(f'{mod} parser not compatible with your OS ({sys.platform}).\n         Compatible platforms: {compat_list}')
(-)textproc/py-jc/pkg-descr (+4 lines)
Line 0 Link Here
1
JSONifies the output of many CLI tools and file-types
2
for easier parsing in scripts.
3
4
WWW: https://pypi.python.org/pypi/jc

Return to bug 246679