mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-23 09:10:43 +00:00
hebrew/py-pyluach: New port: Python package for manipulating Hebrew dates
This commit is contained in:
parent
d3b17e1ff9
commit
8585a47067
@ -7,5 +7,6 @@
|
||||
SUBDIR += hspell
|
||||
SUBDIR += hunspell
|
||||
SUBDIR += libreoffice
|
||||
SUBDIR += py-pyluach
|
||||
|
||||
.include <bsd.port.subdir.mk>
|
||||
|
23
hebrew/py-pyluach/Makefile
Normal file
23
hebrew/py-pyluach/Makefile
Normal file
@ -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>
|
3
hebrew/py-pyluach/distinfo
Normal file
3
hebrew/py-pyluach/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1672004952
|
||||
SHA256 (pyluach-2.0.2.tar.gz) = 97894311f1b0d59f5fcab1d12147f8049bce315915d8dcd806bfbf41c94b50cf
|
||||
SIZE (pyluach-2.0.2.tar.gz) = 21562
|
16
hebrew/py-pyluach/files/test.py
Normal file
16
hebrew/py-pyluach/files/test.py
Normal file
@ -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)}")
|
12
hebrew/py-pyluach/pkg-descr
Normal file
12
hebrew/py-pyluach/pkg-descr
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user