py-term-background: added version 1.0.1

Determine if shell has a light or dark background.

From Python you can call term_background.is_dark_background() which returns a
True if we think the background is dark.

The heuristics used is to try to query the background color using an xterm
control sequence.
This commit is contained in:
adam 2024-03-23 06:48:41 +00:00
parent bf7678eb0c
commit 28906e47ce
5 changed files with 55 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.137 2023/12/10 06:41:14 ryoon Exp $
# $NetBSD: Makefile,v 1.138 2024/03/23 06:48:41 adam Exp $
#
COMMENT= Telephony and serial communication utilities
@ -76,6 +76,7 @@ SUBDIR+= py-nodemcu-uploader
SUBDIR+= py-pastel
SUBDIR+= py-rich
SUBDIR+= py-serial
SUBDIR+= py-term-background
SUBDIR+= py-termstyle
SUBDIR+= qodem
SUBDIR+= qpage

View File

@ -0,0 +1,7 @@
Determine if shell has a light or dark background.
From Python you can call term_background.is_dark_background() which returns a
True if we think the background is dark.
The heuristics used is to try to query the background color using an xterm
control sequence.

View File

@ -0,0 +1,26 @@
# $NetBSD: Makefile,v 1.1 2024/03/23 06:48:41 adam Exp $
DISTNAME= term-background-1.0.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= comms python
# No source distfile on PyPI
#MASTER_SITES= ${MASTER_SITE_PYPI:=t/term-background/}
MASTER_SITES= ${MASTER_SITE_GITHUB:=rocky/}
GITHUB_PROJECT= shell-term-background
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/rocky/shell-term-background
COMMENT= Determine if shell has a light or dark background
LICENSE= gnu-gpl-v2
WRKSRC= ${WRKDIR}/shell-${DISTNAME}
TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
USE_LANGUAGES= # none
PYTHON_VERSIONS_INCOMPATIBLE= 27
.include "../../lang/python/wheel.mk"
.include "../../mk/bsd.pkg.mk"

View File

@ -0,0 +1,15 @@
@comment $NetBSD: PLIST,v 1.1 2024/03/23 06:48:41 adam Exp $
${PYSITELIB}/${WHEEL_INFODIR}/COPYING
${PYSITELIB}/${WHEEL_INFODIR}/METADATA
${PYSITELIB}/${WHEEL_INFODIR}/RECORD
${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
${PYSITELIB}/term_background/__init__.py
${PYSITELIB}/term_background/__init__.pyc
${PYSITELIB}/term_background/__init__.pyo
${PYSITELIB}/term_background/__main__.py
${PYSITELIB}/term_background/__main__.pyc
${PYSITELIB}/term_background/__main__.pyo
${PYSITELIB}/term_background/version.py
${PYSITELIB}/term_background/version.pyc
${PYSITELIB}/term_background/version.pyo

View File

@ -0,0 +1,5 @@
$NetBSD: distinfo,v 1.1 2024/03/23 06:48:41 adam Exp $
BLAKE2s (term-background-1.0.1.tar.gz) = 5bfd1773b508a123511180c06f2c90442736c67b87e02ce98455c5d67158b8b5
SHA512 (term-background-1.0.1.tar.gz) = 132718aae6a6270f36a18db0146ac3c9177f72e184106949fa88b115c1355a94415a5f3126325f938724278a626fb5036b9c647b8ff63320b9ab1a816c6415f9
Size (term-background-1.0.1.tar.gz) = 20302 bytes