git: b2b4bd7983b1 - main - devel/py-autopage: Add py-autopage 0.5.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 28 Feb 2022 12:50:41 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b2b4bd7983b1b38466f2dee983ed275e1af290ab

commit b2b4bd7983b1b38466f2dee983ed275e1af290ab
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-02-28 09:54:39 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-02-28 12:45:54 +0000

    devel/py-autopage: Add py-autopage 0.5.0
    
    Autopage is a Python library to automatically display terminal output from a
    program in a pager (like less) whenever you need it, and never when you don't.
    And it only takes one line of code.
    
    You know how some CLI programs like git (and a handful of others, including man
    and systemctl) automatically pipe their output to less? Except not if there's
    less than one screen's worth of data. And if you redirect the output to a file
    or a pipe, it does the right thing instead. Colours are preserved. Don't you
    wish all programs worked like that? Now at least all of your Python programs
    can.
    
    WWW: https://github.com/zaneb/autopage
---
 devel/Makefile                   |  1 +
 devel/py-autopage/Makefile       | 23 +++++++++++++++++++++++
 devel/py-autopage/distinfo       |  3 +++
 devel/py-autopage/files/setup.py |  3 +++
 devel/py-autopage/pkg-descr      | 12 ++++++++++++
 5 files changed, 42 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index a7cde7f8e11b..e55d0fb13dab 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4193,6 +4193,7 @@
     SUBDIR += py-autocommand
     SUBDIR += py-autoflake
     SUBDIR += py-automaton
+    SUBDIR += py-autopage
     SUBDIR += py-autoprop
     SUBDIR += py-avro
     SUBDIR += py-awesomeversion
diff --git a/devel/py-autopage/Makefile b/devel/py-autopage/Makefile
new file mode 100644
index 000000000000..4493485ac0d6
--- /dev/null
+++ b/devel/py-autopage/Makefile
@@ -0,0 +1,23 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	autopage
+PORTVERSION=	0.5.0
+CATEGORIES=	devel python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Provide automatic paging for console output
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python:3.6+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+post-patch:
+	@${CP} ${FILESDIR}/setup.py ${WRKSRC}/
+
+.include <bsd.port.mk>
diff --git a/devel/py-autopage/distinfo b/devel/py-autopage/distinfo
new file mode 100644
index 000000000000..7fc031389ad7
--- /dev/null
+++ b/devel/py-autopage/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1643970964
+SHA256 (autopage-0.5.0.tar.gz) = 5305b43cc0798170d7124e5a2feecf969e45f4a0baf75cb351138114eaf76b83
+SIZE (autopage-0.5.0.tar.gz) = 30212
diff --git a/devel/py-autopage/files/setup.py b/devel/py-autopage/files/setup.py
new file mode 100644
index 000000000000..606849326a40
--- /dev/null
+++ b/devel/py-autopage/files/setup.py
@@ -0,0 +1,3 @@
+from setuptools import setup
+
+setup()
diff --git a/devel/py-autopage/pkg-descr b/devel/py-autopage/pkg-descr
new file mode 100644
index 000000000000..4a84fffc1e91
--- /dev/null
+++ b/devel/py-autopage/pkg-descr
@@ -0,0 +1,12 @@
+Autopage is a Python library to automatically display terminal output from a
+program in a pager (like less) whenever you need it, and never when you don't.
+And it only takes one line of code.
+
+You know how some CLI programs like git (and a handful of others, including man
+and systemctl) automatically pipe their output to less? Except not if there's
+less than one screen's worth of data. And if you redirect the output to a file
+or a pipe, it does the right thing instead. Colours are preserved. Don't you
+wish all programs worked like that? Now at least all of your Python programs
+can.
+
+WWW: https://github.com/zaneb/autopage