Skip to content

Commit 2ce680b

Browse files
Marcus Hoffmannarnout
Marcus Hoffmann
authored andcommitted
package/python-jc: new package
All dependencies are optional, and thus only mentioned in the package help text. Signed-off-by: Marcus Hoffmann <[email protected]> [Arnout: - add to DEVELOPERS; - add BSD-3-Clause license for vendored pbPlist. ] Signed-off-by: Arnout Vandecappelle <[email protected]>
1 parent 4308c27 commit 2ce680b

File tree

6 files changed

+55
-0
lines changed

6 files changed

+55
-0
lines changed

Diff for: DEVELOPERS

+1
Original file line numberDiff line numberDiff line change
@@ -2092,6 +2092,7 @@ F: utils/config
20922092
F: utils/diffconfig
20932093

20942094
N: Marcus Hoffmann <[email protected]>
2095+
F: package/python-jc/
20952096
F: support/testing/tests/package/test_python_fastapi.py
20962097
F: support/testing/tests/package/sample_python_fastapi.py
20972098

Diff for: package/Config.in

+1
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,7 @@ menu "External python modules"
11501150
source "package/python-janus/Config.in"
11511151
source "package/python-jaraco-classes/Config.in"
11521152
source "package/python-jaraco-functools/Config.in"
1153+
source "package/python-jc/Config.in"
11531154
source "package/python-jedi/Config.in"
11541155
source "package/python-jeepney/Config.in"
11551156
source "package/python-jinja2/Config.in"

Diff for: package/python-jc/Config.in

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
config BR2_PACKAGE_PYTHON_JC
2+
bool "python-jc"
3+
help
4+
Converts the output of popular command-line tools and file-
5+
types to JSON.
6+
7+
Optionally requires python-pygments for syntax highlighting,
8+
python-ruamel-yaml for yaml parsing and output and
9+
python-xmltodict for xml parsing. PYTHON3_PYEXPAT is required
10+
for xml and plist parsers.
11+
12+
https://github.com/kellyjonbrazil/jc

Diff for: package/python-jc/python-jc.hash

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# md5, sha256 from https://pypi.org/pypi/jc/json
2+
md5 80e4c7d46ec856255577c6b364e7f931 jc-1.25.1.tar.gz
3+
sha256 683352e903ece9a86eae0c3232188e40178139e710c740a466ef91ed87c4cc7e jc-1.25.1.tar.gz
4+
# Locally computed sha256 checksums
5+
sha256 6493f2db400f4166ca0956cf192a41aa092bd1396ff463e7fdaf51f257c10497 LICENSE.md

Diff for: package/python-jc/python-jc.mk

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
################################################################################
2+
#
3+
# python-jc
4+
#
5+
################################################################################
6+
7+
PYTHON_JC_VERSION = 1.25.1
8+
PYTHON_JC_SOURCE = jc-$(PYTHON_JC_VERSION).tar.gz
9+
PYTHON_JC_SITE = https://files.pythonhosted.org/packages/53/a6/065f0796a0a21bc040bc88c8a33410c12729a2a6f4c269d0349f685796da
10+
PYTHON_JC_SETUP_TYPE = setuptools
11+
PYTHON_JC_LICENSE = MIT, BSD-3-Clause (bundled pbPlist)
12+
PYTHON_JC_LICENSE_FILES = LICENSE.md
13+
14+
$(eval $(python-package))

Diff for: support/testing/tests/package/test_python_jc.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from tests.package.test_python import TestPythonPackageBase
2+
3+
4+
class TestPythonPy3Jc(TestPythonPackageBase):
5+
__test__ = True
6+
# We deliberately run the test without the optional dependencies,
7+
# as this configuration is less tested upstream.
8+
config = TestPythonPackageBase.config + \
9+
"""
10+
BR2_PACKAGE_PYTHON3=y
11+
BR2_PACKAGE_PYTHON_JC=y
12+
"""
13+
timeout = 60
14+
15+
def test_run(self):
16+
self.login()
17+
cmd = "jc -h > /dev/null 2>&1"
18+
self.assertRunOk(cmd, timeout=self.timeout)
19+
cmd = "jc id | grep -q root"
20+
self.assertRunOk(cmd, timeout=self.timeout)
21+
cmd = "jc env | grep -q PATH"
22+
self.assertRunOk(cmd, self.timeout)

0 commit comments

Comments
 (0)