Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Dec 2022 02:35:03 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 8585a47067e7 - main - hebrew/py-pyluach: New port: Python package for manipulating Hebrew dates
Message-ID:  <202212260235.2BQ2Z3sq084649@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

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

commit 8585a47067e7f55d68409c693f48e87a3fc7667c
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-12-25 22:00:19 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-12-26 02:34:58 +0000

    hebrew/py-pyluach: New port: Python package for manipulating Hebrew dates
---
 hebrew/Makefile                 |  1 +
 hebrew/py-pyluach/Makefile      | 23 +++++++++++++++++++++++
 hebrew/py-pyluach/distinfo      |  3 +++
 hebrew/py-pyluach/files/test.py | 16 ++++++++++++++++
 hebrew/py-pyluach/pkg-descr     | 12 ++++++++++++
 5 files changed, 55 insertions(+)

diff --git a/hebrew/Makefile b/hebrew/Makefile
index d4d9b631a1d6..d334197b7f44 100644
--- a/hebrew/Makefile
+++ b/hebrew/Makefile
@@ -7,5 +7,6 @@
     SUBDIR += hspell
     SUBDIR += hunspell
     SUBDIR += libreoffice
+    SUBDIR += py-pyluach
 
 .include <bsd.port.subdir.mk>
diff --git a/hebrew/py-pyluach/Makefile b/hebrew/py-pyluach/Makefile
new file mode 100644
index 000000000000..7eafe9784c61
--- /dev/null
+++ b/hebrew/py-pyluach/Makefile
@@ -0,0 +1,23 @@
+PORTNAME=	pyluach
+DISTVERSION=	2.0.2
+CATEGORIES=	hebrew python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Python package for manipulating Hebrew dates
+WWW=		https://github.com/simlist/pyluach
+
+LICENSE=	MIT
+
+USES=		python:3.7+
+USE_PYTHON=	distutils autoplist
+
+NO_ARCH=	yes
+
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+do-test:
+	@${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${FILESDIR}/test.py
+
+.include <bsd.port.mk>
diff --git a/hebrew/py-pyluach/distinfo b/hebrew/py-pyluach/distinfo
new file mode 100644
index 000000000000..a95f7296eeea
--- /dev/null
+++ b/hebrew/py-pyluach/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1672004952
+SHA256 (pyluach-2.0.2.tar.gz) = 97894311f1b0d59f5fcab1d12147f8049bce315915d8dcd806bfbf41c94b50cf
+SIZE (pyluach-2.0.2.tar.gz) = 21562
diff --git a/hebrew/py-pyluach/files/test.py b/hebrew/py-pyluach/files/test.py
new file mode 100644
index 000000000000..d234c73a2cee
--- /dev/null
+++ b/hebrew/py-pyluach/files/test.py
@@ -0,0 +1,16 @@
+from pyluach import dates, hebrewcal, parshios
+
+today = dates.HebrewDate.today()
+lastweek_gregorian = (today - 7).to_greg()
+print(f"lastweek_gregorian<today: ={lastweek_gregorian < today}")
+print(f"today-lastweek_gregorian={today - lastweek_gregorian}")
+greg = dates.GregorianDate(1986, 3, 21)
+heb = dates.HebrewDate(5746, 13, 10)
+print(f"greg==heb: {greg == heb}")
+purim = dates.HebrewDate(5781, 12, 14)
+print(f"purim.hebrew_day()={purim.hebrew_day()}")
+print(f"purim.hebrew_date_string()={purim.hebrew_date_string()}")
+print(f"purim.hebrew_date_string(True)={purim.hebrew_date_string(True)}")
+rosh_hashana = dates.HebrewDate(5782, 7, 1)
+print(f"rosh_hashana.holiday={rosh_hashana.holiday()}")
+print(f"rosh_hashana.holiday={rosh_hashana.holiday(hebrew=True)}")
diff --git a/hebrew/py-pyluach/pkg-descr b/hebrew/py-pyluach/pkg-descr
new file mode 100644
index 000000000000..e25b0b27f6f6
--- /dev/null
+++ b/hebrew/py-pyluach/pkg-descr
@@ -0,0 +1,12 @@
+Pyluach is a Python package for manipulating Hebrew (Jewish) calendar dates and
+Hebrew-Gregorian conversions.
+
+Features:
+* Conversion between Hebrew and Gregorian dates
+* Finding the difference between two dates
+* Finding a date at a given duration from the given date
+* Rich comparisons between dates
+* Finding the weekday of a given date
+* Finding the weekly Parsha reading of a given date
+* Getting the holiday occuring on a given date
+* Generating html and text Hebrew calendars



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212260235.2BQ2Z3sq084649>