Skip to content

Commit

Permalink
Add termcolor python project
Browse files Browse the repository at this point in the history
  • Loading branch information
mtelka committed Dec 7, 2022
1 parent fb5dbc7 commit ccef159
Show file tree
Hide file tree
Showing 5 changed files with 211 additions and 0 deletions.
37 changes: 37 additions & 0 deletions components/python/termcolor/Makefile
@@ -0,0 +1,37 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# This file was automatically generated using the following command:
# $WS_TOOLS/python-integrate-project termcolor
#

BUILD_STYLE = pyproject

include ../../../make-rules/shared-macros.mk

COMPONENT_NAME = termcolor
COMPONENT_VERSION = 2.1.1
COMPONENT_SUMMARY = termcolor - ANSI color formatting for output in terminal
COMPONENT_PROJECT_URL = https://github.com/termcolor/termcolor
COMPONENT_ARCHIVE_URL = \
https://files.pythonhosted.org/packages/19/da/ff1f0906818a5bd2e69e773d88801ca3c9e92d0d7caa99db1665658819ea/termcolor-2.1.1.tar.gz
COMPONENT_ARCHIVE_HASH = \
sha256:67cee2009adc6449c650f6bcf3bdeed00c8ba53a8cda5362733c53e0a39fb70b
COMPONENT_LICENSE = MIT
COMPONENT_LICENSE_FILE = COPYING.txt

include $(WS_MAKE_RULES)/common.mk

# Auto-generated dependencies
PYTHON_REQUIRED_PACKAGES += library/python/hatch-vcs
PYTHON_REQUIRED_PACKAGES += library/python/hatchling
PYTHON_REQUIRED_PACKAGES += runtime/python
38 changes: 38 additions & 0 deletions components/python/termcolor/manifests/sample-manifest.p5m
@@ -0,0 +1,38 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2022 <contributor>
#

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'

file path=usr/lib/python$(PYVER)/vendor-packages/termcolor-$(COMPONENT_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor-$(COMPONENT_VERSION).dist-info/WHEEL
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor-$(COMPONENT_VERSION).dist-info/licenses/COPYING.txt
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor/__main__.py
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor/py.typed
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor/termcolor.py

# python modules are unusable without python runtime binary
depend type=require fmri=__TBD pkg.debug.depend.file=python$(PYVER) \
pkg.debug.depend.path=usr/bin

# Automatically generated dependencies based on distribution metadata
19 changes: 19 additions & 0 deletions components/python/termcolor/pkg5
@@ -0,0 +1,19 @@
{
"dependencies": [
"SUNWcs",
"library/python/hatch-vcs-37",
"library/python/hatch-vcs-39",
"library/python/hatchling-37",
"library/python/hatchling-39",
"runtime/python-37",
"runtime/python-39",
"shell/ksh93",
"system/library"
],
"fmris": [
"library/python/termcolor-37",
"library/python/termcolor-39",
"library/python/termcolor"
],
"name": "termcolor"
}
38 changes: 38 additions & 0 deletions components/python/termcolor/termcolor-PYVER.p5m
@@ -0,0 +1,38 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# This file was automatically generated using python-integrate-project
#

set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)-$(PYV)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
set name=pkg.human-version value=$(HUMAN_VERSION)
set name=pkg.summary value="$(COMPONENT_SUMMARY)"
set name=info.classification value="$(COMPONENT_CLASSIFICATION)"
set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
set name=org.opensolaris.consolidation value=$(CONSOLIDATION)

license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)'

file path=usr/lib/python$(PYVER)/vendor-packages/termcolor-$(COMPONENT_VERSION).dist-info/METADATA
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor-$(COMPONENT_VERSION).dist-info/WHEEL
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor-$(COMPONENT_VERSION).dist-info/licenses/COPYING.txt
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor/__init__.py
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor/__main__.py
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor/py.typed
file path=usr/lib/python$(PYVER)/vendor-packages/termcolor/termcolor.py

# python modules are unusable without python runtime binary
depend type=require fmri=__TBD pkg.debug.depend.file=python$(PYVER) \
pkg.debug.depend.path=usr/bin

# Automatically generated dependencies based on distribution metadata
79 changes: 79 additions & 0 deletions components/python/termcolor/test/results-all.master
@@ -0,0 +1,79 @@
py$(PYV) create: $(@D)/.tox/py$(PYV)
py$(PYV) run-test: commands[0] | $(@D)/.tox/py$(PYV)/bin/python -m pytest --cov termcolor --cov tests --cov-report html --cov-report xml
============================= test session starts ==============================
platform sunos5 -- Python $(PYTHON_VERSION).X -- $(@D)/.tox/py$(PYV)/bin/python
cachedir: .tox/py$(PYV)/.pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('$(@D)/.hypothesis/examples')
rootdir: $(@D)
collecting ... collected 48 items

::project PASSED
tests/test_termcolor.py::test_all_deprecation PASSED
tests/test_termcolor.py::test_attrs[blink-\x1b[5mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_attrs[bold-\x1b[1mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_attrs[concealed-\x1b[8mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_attrs[dark-\x1b[2mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_attrs[reverse-\x1b[7mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_attrs[underline-\x1b[4mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_basic PASSED
tests/test_termcolor.py::test_color[blue-\x1b[34mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_color[cyan-\x1b[36mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_color[green-\x1b[32mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_color[grey-\x1b[30mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_color[magenta-\x1b[35mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_color[red-\x1b[31mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_color[white-\x1b[37mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_color[yellow-\x1b[33mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_environment_variables[test_env_vars0-False] PASSED
tests/test_termcolor.py::test_environment_variables[test_env_vars1-False] PASSED
tests/test_termcolor.py::test_environment_variables[test_env_vars2-True] PASSED
tests/test_termcolor.py::test_environment_variables[test_env_vars3-False] PASSED
tests/test_termcolor.py::test_environment_variables[test_env_vars4-False] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[-ANSI_COLORS_DISABLED] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[-NO_COLOR] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[0-ANSI_COLORS_DISABLED] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[0-NO_COLOR] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[1-ANSI_COLORS_DISABLED] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[1-NO_COLOR] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[false-ANSI_COLORS_DISABLED] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[false-NO_COLOR] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[true-ANSI_COLORS_DISABLED] PASSED
tests/test_termcolor.py::test_environment_variables_disable_color[true-NO_COLOR] PASSED
tests/test_termcolor.py::test_environment_variables_force_color[0] PASSED
tests/test_termcolor.py::test_environment_variables_force_color[1] PASSED
tests/test_termcolor.py::test_environment_variables_force_color[] PASSED
tests/test_termcolor.py::test_environment_variables_force_color[false] PASSED
tests/test_termcolor.py::test_environment_variables_force_color[true] PASSED
tests/test_termcolor.py::test_on_color[on_blue-\x1b[44mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_on_color[on_cyan-\x1b[46mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_on_color[on_green-\x1b[42mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_on_color[on_grey-\x1b[40mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_on_color[on_magenta-\x1b[45mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_on_color[on_red-\x1b[41mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_on_color[on_white-\x1b[47mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_on_color[on_yellow-\x1b[43mtext\x1b[0m] PASSED
tests/test_termcolor.py::test_sanity PASSED
tests/test_termcolor.py::test_tty[False-text] PASSED
tests/test_termcolor.py::test_tty[True-\x1b[36mtext\x1b[0m] PASSED

=============================== warnings summary ===============================
../../../../../../../..$(PYTHON_DIR)/vendor-packages/pytest_cov/plugin.py:256
$(PYTHON_DIR)/vendor-packages/pytest_cov/plugin.py:256: PytestDeprecationWarning: The hookimpl CovPlugin.pytest_configure_node uses old-style configuration options (marks or attributes).
Please use the pytest.hookimpl(optionalhook=True) decorator instead
to configure the hooks.
See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
def pytest_configure_node(self, node):

../../../../../../../..$(PYTHON_DIR)/vendor-packages/pytest_cov/plugin.py:265
$(PYTHON_DIR)/vendor-packages/pytest_cov/plugin.py:265: PytestDeprecationWarning: The hookimpl CovPlugin.pytest_testnodedown uses old-style configuration options (marks or attributes).
Please use the pytest.hookimpl(optionalhook=True) decorator instead
to configure the hooks.
See https://docs.pytest.org/en/latest/deprecations.html#configuring-hook-specs-impls-using-markers
def pytest_testnodedown(self, node, error):

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

======== 48 passed, 2 warnings ========
___________________________________ summary ____________________________________
py$(PYV): commands succeeded
congratulations :)

0 comments on commit ccef159

Please sign in to comment.