From nobody Tue Nov 19 10:47:35 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Xt1RC3zxVz5dt7W; Tue, 19 Nov 2024 10:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xt1RC3NcJz4j3C; Tue, 19 Nov 2024 10:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732013255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xunz+Wn4hCJuhd5t8nT1mWVllp8XJrcfg7pK9We8lAY=; b=W5npSh55xAOoYbnto7zB8raKA45ZpIt8bD+V4FHdp7xK55tc96s+oNaX0k+Y/m0/xB0Hh+ zBpcwIP5bI5CBponspXTxV3xdTXBxsdC4UYBvnsqUn/3Yhb8OvvN5lvtgC5qitD+mXeLEs oOtWLqNYW3QAK4BNcP04safr/MKcQpbVsaWVKRWrWysFySMn9VbH4/j9pI2DyPKzzSYKpX +qbrakt0nuAcoPB2Wa2jyHxB5xlPTlcW0+BFJ12umu9sLNV2l+fNvHulq1Ab82wbP6Qcs9 Qu1sy4iikfMrvIgJ/f45GhMZT6Ub5ESvLVgcWlHvFUXUE09mNLhrdxg3HoAnhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732013255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xunz+Wn4hCJuhd5t8nT1mWVllp8XJrcfg7pK9We8lAY=; b=Bo5eN9Rx2ysX6trLQahacp7nRF71PKGYuTgGt3qUPxcfrnMmxD9quUSHS19biQj1Qo3XC0 pHYmnLkO7PWaNRVWbz0CkFGMnYp0TDXWaaYhMHc71tB4H7GUdpZjrymlq4bmrXSOLP0uJE qf2zTD6LTNn2oauktquh97n+vkq+SBIVpxb4YMel9z7ipgkqE4HbQCimuEoe74+7Xq1sUx DOuyMwD3b9yAgPgMjCNliGkOlQnuRDy+l3Om2XszEDWf15XE80e/j+BrfbMK8E6j8HDHJI qWqQ50WIg14yCFMYSzF1fAboagsNLaWCPIDcuqBnyjTSB5avUOj5VA8hhNVWQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732013255; a=rsa-sha256; cv=none; b=KuUitIGfi4sNS/tL0gtvV0jsDPibtLnBf4PRlFamdFb5rd5hLepEI88bY1bZdVNpFiOqY3 s8QwLiNMDXk1BNvuefAZ17sKdwewYPsSYQ42VorMf5GjqebwmsB70jQcKQbHPL+NhgOn4r BDRa3W//YkVXH7y6+87dvKf++lXJj5EboGhU08pt1iJ6UrIzaVUQ/FP1zLGt3Q8yHz2iL9 i0isxHkesEgGHf2tK3+3S/sMOjE01nCbSziLPYfiypIoHx/W/kyysG3P5PA11UZmuXJoJL 30yabMnHZF968hWM/HRowl6RMe64OvVxzQlXUmXbx4b9Vysm4oonIg2HQ4CTxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Xt1RC304jz1LsW; Tue, 19 Nov 2024 10:47:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AJAlZM1018467; Tue, 19 Nov 2024 10:47:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AJAlZRR018464; Tue, 19 Nov 2024 10:47:35 GMT (envelope-from git) Date: Tue, 19 Nov 2024 10:47:35 GMT Message-Id: <202411191047.4AJAlZRR018464@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Nuno Teixeira Subject: git: 0c69eeb8d5ad - main - misc/py-pdd: New port: Tiny date, time diff calculator with timers List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eduardo X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c69eeb8d5adb1b3c9ec665f00518887d6620365 Auto-Submitted: auto-generated The branch main has been updated by eduardo: URL: https://cgit.FreeBSD.org/ports/commit/?id=0c69eeb8d5adb1b3c9ec665f00518887d6620365 commit 0c69eeb8d5adb1b3c9ec665f00518887d6620365 Author: Nuno Teixeira AuthorDate: 2024-11-19 10:26:15 +0000 Commit: Nuno Teixeira CommitDate: 2024-11-19 10:28:25 +0000 misc/py-pdd: New port: Tiny date, time diff calculator with timers pdd (Python3 Date Diff) is a tiny command line utility to calculate date and time difference. It can also be used as a timer. If no program arguments are specified it shows the current date, time and timezone. pdd has been written with only one goal - simplicity. Users shouldn't have to memorize anything. WWW: https://github.com/jarun/pdd --- misc/Makefile | 1 + misc/py-pdd/Makefile | 34 ++++++++++++++++++++++++++++++++++ misc/py-pdd/distinfo | 3 +++ misc/py-pdd/files/patch-test.py | 39 +++++++++++++++++++++++++++++++++++++++ misc/py-pdd/pkg-descr | 6 ++++++ 5 files changed, 83 insertions(+) diff --git a/misc/Makefile b/misc/Makefile index d898ca577e25..af986f077736 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -484,6 +484,7 @@ SUBDIR += py-oterm SUBDIR += py-palettable SUBDIR += py-papermill + SUBDIR += py-pdd SUBDIR += py-pexpect SUBDIR += py-pkbar SUBDIR += py-placekey diff --git a/misc/py-pdd/Makefile b/misc/py-pdd/Makefile new file mode 100644 index 000000000000..4961681cb630 --- /dev/null +++ b/misc/py-pdd/Makefile @@ -0,0 +1,34 @@ +PORTNAME= pdd +DISTVERSIONPREFIX= v +DISTVERSION= 1.7 +CATEGORIES= misc python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= eduardo@FreeBSD.org +COMMENT= Tiny date, time diff calculator with timers +WWW= https://github.com/jarun/pdd + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-dateutil>0:devel/py-python-dateutil@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} + +USES= python +USE_GITHUB= yes +GH_ACCOUNT= jarun +USE_PYTHON= autoplist pep517 + +NO_ARCH= yes + +PLIST_FILES= share/man/man1/${PORTNAME}.1.gz + +post-install: + ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/share/man/man1 + +do-test: + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v test.py + +.include diff --git a/misc/py-pdd/distinfo b/misc/py-pdd/distinfo new file mode 100644 index 000000000000..87220a14c4ad --- /dev/null +++ b/misc/py-pdd/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1732006131 +SHA256 (jarun-pdd-v1.7_GH0.tar.gz) = a81adcac025b08c7c933f028339c55a67d0da6c81845fe3d18fd4187010a63d4 +SIZE (jarun-pdd-v1.7_GH0.tar.gz) = 26905 diff --git a/misc/py-pdd/files/patch-test.py b/misc/py-pdd/files/patch-test.py new file mode 100644 index 000000000000..7652b4b901de --- /dev/null +++ b/misc/py-pdd/files/patch-test.py @@ -0,0 +1,39 @@ +--- test.py.orig 2024-11-19 09:24:59 UTC ++++ test.py +@@ -17,21 +17,21 @@ test = [ + import subprocess + + test = [ +- ('./pdd', '-d', '1983', 'jul', '3', '2014', '1', '15'), # 1 +- ('./pdd', '-d', '2014', '1', '15', '1983', 'jul', '03'), # 2 +- ('./pdd', '-t', '45:50', '6:17:33'), # 3 +- ('./pdd', '-t', '6:17:33', '45:50'), # 4 +- ('./pdd', '-t', '5:80:75', '6:17:33'), # 5 +- ('./pdd', '-t', '6:17:33', '5:80:75'), # 6 +- ('./pdd', '-d', '2000', 'FEB', '28', '3', '2', '1', '--add'), # 7 +- ('./pdd', '-d', '2000', 'FEB', '28', '1', '2', '3', '--add'), # 8 +- ('./pdd', '-t', '47:71:37', '1:2:63', '--add'), # 9 +- ('./pdd', '-d', '2000', 'Mar', '01', '0', '0', '1', '--sub'), # 10 +- ('./pdd', '-d', '2000', 'Mar', '1', '1', '1', '1', '--sub'), # 11 +- ('./pdd', '-t', '00:00:00', '0:0:1', '--sub'), # 12 +- ('./pdd', '-t', '25:61:61', '0:0:0', '--sub'), # 13 +- ('./pdd', '-t', '0:0:0', '1:1:1', '--sub'), # 14 +- ('./pdd', '-t', '0:0:0', '25:61:61', '--sub'), # 15 ++ ('pdd', '-d', '1983', 'jul', '3', '2014', '1', '15'), # 1 ++ ('pdd', '-d', '2014', '1', '15', '1983', 'jul', '03'), # 2 ++ ('pdd', '-t', '45:50', '6:17:33'), # 3 ++ ('pdd', '-t', '6:17:33', '45:50'), # 4 ++ ('pdd', '-t', '5:80:75', '6:17:33'), # 5 ++ ('pdd', '-t', '6:17:33', '5:80:75'), # 6 ++ ('pdd', '-d', '2000', 'FEB', '28', '3', '2', '1', '--add'), # 7 ++ ('pdd', '-d', '2000', 'FEB', '28', '1', '2', '3', '--add'), # 8 ++ ('pdd', '-t', '47:71:37', '1:2:63', '--add'), # 9 ++ ('pdd', '-d', '2000', 'Mar', '01', '0', '0', '1', '--sub'), # 10 ++ ('pdd', '-d', '2000', 'Mar', '1', '1', '1', '1', '--sub'), # 11 ++ ('pdd', '-t', '00:00:00', '0:0:1', '--sub'), # 12 ++ ('pdd', '-t', '25:61:61', '0:0:0', '--sub'), # 13 ++ ('pdd', '-t', '0:0:0', '1:1:1', '--sub'), # 14 ++ ('pdd', '-t', '0:0:0', '25:61:61', '--sub'), # 15 + ] + + res = [ diff --git a/misc/py-pdd/pkg-descr b/misc/py-pdd/pkg-descr new file mode 100644 index 000000000000..0003b1ffacd6 --- /dev/null +++ b/misc/py-pdd/pkg-descr @@ -0,0 +1,6 @@ +pdd (Python3 Date Diff) is a tiny command line utility to calculate date +and time difference. It can also be used as a timer. If no program +arguments are specified it shows the current date, time and timezone. + +pdd has been written with only one goal - simplicity. Users shouldn't have +to memorize anything.