From owner-svn-ports-head@freebsd.org Sat May 23 21:13:47 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 879442DE1B7; Sat, 23 May 2020 21:13:47 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Tx172z2Dz3S4h; Sat, 23 May 2020 21:13:47 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 612B116340; Sat, 23 May 2020 21:13:47 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 04NLDlBe072600; Sat, 23 May 2020 21:13:47 GMT (envelope-from ehaupt@FreeBSD.org) Received: (from ehaupt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 04NLDkbp072595; Sat, 23 May 2020 21:13:46 GMT (envelope-from ehaupt@FreeBSD.org) Message-Id: <202005232113.04NLDkbp072595@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ehaupt set sender to ehaupt@FreeBSD.org using -f From: Emanuel Haupt Date: Sat, 23 May 2020 21:13:46 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r536352 - in head/textproc: . py-jc py-jc/files X-SVN-Group: ports-head X-SVN-Commit-Author: ehaupt X-SVN-Commit-Paths: in head/textproc: . py-jc py-jc/files X-SVN-Commit-Revision: 536352 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2020 21:13:47 -0000 Author: ehaupt Date: Sat May 23 21:13:46 2020 New Revision: 536352 URL: https://svnweb.freebsd.org/changeset/ports/536352 Log: JSONifies the output of many CLI tools and file-types for easier parsing in scripts. WWW: https://pypi.python.org/pypi/jc PR: 246679 Submitted by: vulcan@wired.sh Added: head/textproc/py-jc/ head/textproc/py-jc/Makefile (contents, props changed) head/textproc/py-jc/distinfo (contents, props changed) head/textproc/py-jc/files/ head/textproc/py-jc/files/patch-jc_utils.py (contents, props changed) head/textproc/py-jc/pkg-descr (contents, props changed) Modified: head/textproc/Makefile Modified: head/textproc/Makefile ============================================================================== --- head/textproc/Makefile Sat May 23 21:07:57 2020 (r536351) +++ head/textproc/Makefile Sat May 23 21:13:46 2020 (r536352) @@ -1264,6 +1264,7 @@ SUBDIR += py-isbnlib SUBDIR += py-isbntools SUBDIR += py-iso-639 + SUBDIR += py-jc SUBDIR += py-jinja2-cli SUBDIR += py-jsonslicer SUBDIR += py-jsx-lexer Added: head/textproc/py-jc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/py-jc/Makefile Sat May 23 21:13:46 2020 (r536352) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +PORTNAME= jc +DISTVERSION= 1.11.0 +CATEGORIES= textproc python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= vulcan@wired.sh +COMMENT= Converts output of popular command-line tools and file-types to JSON + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pygments>=2.4.2:textproc/py-pygments@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}ruamel.yaml>=0.15.0:devel/py-ruamel.yaml@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}xmltodict>=0.12.0:devel/py-xmltodict@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= autoplist distutils + +NO_ARCH= yes + +.include Added: head/textproc/py-jc/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/py-jc/distinfo Sat May 23 21:13:46 2020 (r536352) @@ -0,0 +1,3 @@ +TIMESTAMP = 1590246208 +SHA256 (jc-1.11.0.tar.gz) = b754e3e34b0b29db629d4340a13e09f4f50f74a932ba0a5203d42bfbd49f46a4 +SIZE (jc-1.11.0.tar.gz) = 86873 Added: head/textproc/py-jc/files/patch-jc_utils.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/py-jc/files/patch-jc_utils.py Sat May 23 21:13:46 2020 (r536352) @@ -0,0 +1,26 @@ +Platform check fails as sys.platform returns 'freebsd' plus +the release version e.g., 'freebsd12' and so forth where the string +'freebsd' is only listed as compatible. + +--- jc/utils.py.orig 2020-05-23 14:53:34 UTC ++++ jc/utils.py +@@ -1,8 +1,8 @@ + """jc - JSON CLI output utility utils""" + import textwrap + import sys ++import re + +- + def warning_message(message): + """ + Prints a warning message for non-fatal issues +@@ -56,7 +56,8 @@ def compatibility(mod_name, compatible): + + no return, just prints output to STDERR + """ +- if sys.platform not in compatible: ++ platform = re.sub(r'\d+', '', sys.platform) ++ if platform not in compatible: + mod = mod_name.split('.')[-1] + compat_list = ', '.join(compatible) + warning_message(f'{mod} parser not compatible with your OS ({sys.platform}).\n Compatible platforms: {compat_list}') Added: head/textproc/py-jc/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/py-jc/pkg-descr Sat May 23 21:13:46 2020 (r536352) @@ -0,0 +1,4 @@ +JSONifies the output of many CLI tools and file-types +for easier parsing in scripts. + +WWW: https://pypi.python.org/pypi/jc