aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/py-termcolor-whl/Makefile8
-rw-r--r--devel/py-termcolor-whl/files/patch-pyproject.toml10
-rw-r--r--devel/py-termcolor-whl/files/setup.py25
3 files changed, 14 insertions, 29 deletions
diff --git a/devel/py-termcolor-whl/Makefile b/devel/py-termcolor-whl/Makefile
index fd7646db526c..7516415149f3 100644
--- a/devel/py-termcolor-whl/Makefile
+++ b/devel/py-termcolor-whl/Makefile
@@ -1,5 +1,6 @@
PORTNAME= termcolor-whl
PORTVERSION= 1.1.2
+PORTREVISION= 1
CATEGORIES= devel python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -9,8 +10,10 @@ COMMENT= ANSI Color formatting for output in terminal, successor to termcolor
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=0.12:devel/py-poetry-core@${PY_FLAVOR}
+
USES= python:3.7+
-USE_PYTHON= autoplist concurrent distutils
+USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
@@ -19,7 +22,4 @@ GH_ACCOUNT= matthewdeanmartin
GH_PROJECT= termcolor
GH_TAGNAME= 4ecd396
-post-patch:
- @${CP} ${FILESDIR}/setup.py ${WRKSRC}/
-
.include <bsd.port.mk>
diff --git a/devel/py-termcolor-whl/files/patch-pyproject.toml b/devel/py-termcolor-whl/files/patch-pyproject.toml
new file mode 100644
index 000000000000..2e9d3af5949b
--- /dev/null
+++ b/devel/py-termcolor-whl/files/patch-pyproject.toml
@@ -0,0 +1,10 @@
+--- pyproject.toml.orig 2021-12-04 20:56:25 UTC
++++ pyproject.toml
+@@ -52,5 +52,5 @@ python = ">=2.6 || >=3.0"
+ pytest = "==6.0.1"
+
+ [build-system]
+-requires = ["poetry>=0.12"]
+-build-backend = "poetry.masonry.api"
++requires = ["poetry-core>=0.12"]
++build-backend = "poetry.core.masonry.api"
diff --git a/devel/py-termcolor-whl/files/setup.py b/devel/py-termcolor-whl/files/setup.py
deleted file mode 100644
index 2f844ada3540..000000000000
--- a/devel/py-termcolor-whl/files/setup.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup
-
-packages = \
-['termcolor']
-
-package_data = \
-{'': ['*']}
-
-setup_kwargs = {
- 'name': 'termcolor-whl',
- 'version': '1.1.2',
- 'description': 'ANSI Color formatting for output in terminal, successor to termcolor (has wheels!)',
- 'long_description': '# termcolor\nColorize your console output.\n\nThis is the successor to `termcolor`\n \n### Example\n\n import sys\n from termcolor import colored, cprint\n\n text = colored(\'Hello, World!\', \'red\', attrs=[\'reverse\', \'blink\'])\n print(text)\n cprint(\'Hello, World!\', \'green\', \'on_red\')\n\n print_red_on_cyan = lambda x: cprint(x, \'red\', \'on_cyan\')\n print_red_on_cyan(\'Hello, World!\')\n print_red_on_cyan(\'Hello, Universe!\')\n\n for i in range(10):\n cprint(i, \'magenta\', end=\' \')\n\n cprint("Attention!", \'red\', attrs=[\'bold\'], file=sys.stderr)\n\n### Disabling\nAny value in the environment variable `ANSI_COLORS_DISABLED` will disable colors.\n\n### Text Properties\nText colors:\n\n> - grey\n> - red\n> - green\n> - yellow\n> - blue\n> - magenta\n> - cyan\n> - white\n\nText highlights:\n> - on\\_grey\n> - on\\_red\n> - on\\_green\n> - on\\_yellow\n> - on\\_blue\n> - on\\_magenta\n> - on\\_cyan\n> - on\\_white\n\n> Attributes:\n> - bold\n> - dark\n> - underline\n> - blink\n> - reverse\n> - concealed\n\n### Terminal properties\n\n Terminal bold dark underline blink reverse concealed\n -------------- --------- ------ ----------- ------------ --------- -----------\n xterm yes no yes bold yes yes\n linux yes yes bold yes yes no\n rxvt yes no yes bold/black yes no\n dtterm yes yes yes reverse yes yes\n teraterm reverse no yes rev/red yes no\n aixterm normal no yes no yes yes\n PuTTY color no yes no yes no\n Windows no no no no yes no\n Cygwin SSH yes no color color color yes\n Mac Terminal yes no yes yes yes yes\n\n### License and Authorship\nOriginal author: Konstantin Lepa <konstantin.lepa@gmail.com>, Copyright (c) 2008-2011 Volvox Development Team\nOriginal license: MIT.\n\nOriginal source code repository no longer available, this is a fork of the artifacts published to pypi\n\n## Documents\n- [Changes](https://github.com/matthewdeanmartin/termcolor/blob/main/docs/CHANGES.MD)',
- 'author': 'Konstantin Lepa',
- 'author_email': 'konstantin.lepa@gmail.com',
- 'maintainer': None,
- 'maintainer_email': None,
- 'url': 'https://github.com/matthewdeanmartin/termcolor',
- 'packages': packages,
- 'package_data': package_data,
- 'python_requires': '>=2.6',
-}
-
-setup(**setup_kwargs)