summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2015-02-04 11:41:09 +0000
committerwiz <wiz@pkgsrc.org>2015-02-04 11:41:09 +0000
commitc19f161a2feed2a7f2e8b203c47508e0bb6f041c (patch)
tree1db0ee3c76b5127d9b228b254b406816527dbb98
parentb64380b3ecfb9248313545dc318d9aea4b6664e6 (diff)
downloadpkgsrc-c19f161a2feed2a7f2e8b203c47508e0bb6f041c.tar.gz
Import py34-tzlocal-1.1.2 as time/py-tzlocal.
This Python module returns a tzinfo object with the local timezone information under Unix and Win-32. It requires pytz, and returns pytz tzinfo objects. This module attempts to fix a glaring hole in pytz, that there is no way to get the local timezone information, unless you know the zoneinfo name, and under several Linux distros that's hard or impossible to figure out. Also, with Windows different timezone system using pytz isn't of much use unless you separately configure the zoneinfo timezone name. With tzlocal you only need to call get_localzone() and you will get a tzinfo object with the local time zone info. On some Unices you will still not get to know what the timezone name is, but you don't need that when you have the tzinfo file. However, if the timezone name is readily available it will be used.
-rw-r--r--time/py-tzlocal/DESCR18
-rw-r--r--time/py-tzlocal/Makefile20
-rw-r--r--time/py-tzlocal/PLIST30
-rw-r--r--time/py-tzlocal/distinfo5
4 files changed, 73 insertions, 0 deletions
diff --git a/time/py-tzlocal/DESCR b/time/py-tzlocal/DESCR
new file mode 100644
index 00000000000..506389af2b8
--- /dev/null
+++ b/time/py-tzlocal/DESCR
@@ -0,0 +1,18 @@
+This Python module returns a tzinfo object with the local timezone
+information under Unix and Win-32. It requires pytz, and returns
+pytz tzinfo objects.
+
+This module attempts to fix a glaring hole in pytz, that there is
+no way to get the local timezone information, unless you know the
+zoneinfo name, and under several Linux distros that's hard or
+impossible to figure out.
+
+Also, with Windows different timezone system using pytz isn't of
+much use unless you separately configure the zoneinfo timezone
+name.
+
+With tzlocal you only need to call get_localzone() and you will
+get a tzinfo object with the local time zone info. On some Unices
+you will still not get to know what the timezone name is, but you
+don't need that when you have the tzinfo file. However, if the
+timezone name is readily available it will be used.
diff --git a/time/py-tzlocal/Makefile b/time/py-tzlocal/Makefile
new file mode 100644
index 00000000000..db5708f5c1d
--- /dev/null
+++ b/time/py-tzlocal/Makefile
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2015/02/04 11:41:09 wiz Exp $
+
+DISTNAME= tzlocal-1.1.2
+PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES= time python
+MASTER_SITES= http://pypi.python.org/packages/source/t/tzlocal/
+EXTRACT_SUFX= .zip
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://pypi.python.org/pypi/tzlocal
+COMMENT= Python tzinfo object for the local timezone
+LICENSE= public-domain
+
+DEPENDS+= ${PYPKGPREFIX}-pytz-[0-9]*:../../time/py-pytz
+
+USE_LANGUAGES= # none
+
+.include "../../lang/python/application.mk"
+.include "../../lang/python/egg.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/time/py-tzlocal/PLIST b/time/py-tzlocal/PLIST
new file mode 100644
index 00000000000..93396d8acda
--- /dev/null
+++ b/time/py-tzlocal/PLIST
@@ -0,0 +1,30 @@
+@comment $NetBSD: PLIST,v 1.1 2015/02/04 11:41:09 wiz Exp $
+${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
+${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
+${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
+${PYSITELIB}/${EGG_INFODIR}/requires.txt
+${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+${PYSITELIB}/${EGG_INFODIR}/zip-safe
+${PYSITELIB}/tzlocal/__init__.py
+${PYSITELIB}/tzlocal/__init__.pyc
+${PYSITELIB}/tzlocal/__init__.pyo
+${PYSITELIB}/tzlocal/darwin.py
+${PYSITELIB}/tzlocal/darwin.pyc
+${PYSITELIB}/tzlocal/darwin.pyo
+${PYSITELIB}/tzlocal/test_data/Harare
+${PYSITELIB}/tzlocal/test_data/localtime/etc/localtime
+${PYSITELIB}/tzlocal/test_data/timezone/etc/timezone
+${PYSITELIB}/tzlocal/test_data/timezone_setting/etc/conf.d/clock
+${PYSITELIB}/tzlocal/test_data/zone_setting/etc/sysconfig/clock
+${PYSITELIB}/tzlocal/tests.py
+${PYSITELIB}/tzlocal/tests.pyc
+${PYSITELIB}/tzlocal/tests.pyo
+${PYSITELIB}/tzlocal/unix.py
+${PYSITELIB}/tzlocal/unix.pyc
+${PYSITELIB}/tzlocal/unix.pyo
+${PYSITELIB}/tzlocal/win32.py
+${PYSITELIB}/tzlocal/win32.pyc
+${PYSITELIB}/tzlocal/win32.pyo
+${PYSITELIB}/tzlocal/windows_tz.py
+${PYSITELIB}/tzlocal/windows_tz.pyc
+${PYSITELIB}/tzlocal/windows_tz.pyo
diff --git a/time/py-tzlocal/distinfo b/time/py-tzlocal/distinfo
new file mode 100644
index 00000000000..5b01243971a
--- /dev/null
+++ b/time/py-tzlocal/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2015/02/04 11:41:09 wiz Exp $
+
+SHA1 (tzlocal-1.1.2.zip) = c4aadb1e33aba3a8cfa7fd90fc1c5af1f65ec341
+RMD160 (tzlocal-1.1.2.zip) = 592a7659d8152d5a1aa4094a68788844227e2aab
+Size (tzlocal-1.1.2.zip) = 22504 bytes