From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 2/4] python3-pytz: new package
Date: Thu, 6 Sep 2018 10:51:11 +0200 [thread overview]
Message-ID: <20180906085111.n2zqwo7hixmlh4rt@pengutronix.de> (raw)
In-Reply-To: <20180831173920.18227-2-artur@4wiebe.de>
[-- Attachment #1: Type: text/plain, Size: 3768 bytes --]
On Fri, Aug 31, 2018 at 07:39:18PM +0200, Artur Wiebe wrote:
> Signed-off-by: Artur Wiebe <artur@4wiebe.de>
> ---
> rules/python3-pytz.in | 13 +++++++++++
> rules/python3-pytz.make | 51 +++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 64 insertions(+)
> create mode 100644 rules/python3-pytz.in
> create mode 100644 rules/python3-pytz.make
>
> diff --git a/rules/python3-pytz.in b/rules/python3-pytz.in
> new file mode 100644
> index 000000000..d2aff7acf
> --- /dev/null
> +++ b/rules/python3-pytz.in
> @@ -0,0 +1,13 @@
> +## SECTION=python3
> +
> +config PYTHON3_PYTZ
> + tristate
> + select PYTHON3
> + select HOST_PYTHON3_SETUPTOOLS
select TIMEZONE if RUNTIME
see below.
> + prompt "pytz"
> + help
> + pytz brings the Olson tz database into Python.
> + This library allows accurate and cross platform timezone calculations
> + using Python 2.4 or higher. It also solves the issue of ambiguous
> + times at the end of daylight saving time, which you can read
> + more about in the Python Library Reference (datetime.tzinfo).
> diff --git a/rules/python3-pytz.make b/rules/python3-pytz.make
> new file mode 100644
> index 000000000..c054ab850
> --- /dev/null
> +++ b/rules/python3-pytz.make
> @@ -0,0 +1,51 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2018 by Artur Wiebe <artur@4wiebe.de>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_PYTHON3_PYTZ) += python3-pytz
> +
> +PYTHON3_PYTZ_VERSION := 2018.5
> +PYTHON3_PYTZ_MD5 := 45409cbfa3927bdd2f3ee914dd5b1060
> +PYTHON3_PYTZ := pytz-$(PYTHON3_PYTZ_VERSION)
> +PYTHON3_PYTZ_SUFFIX := tar.gz
> +PYTHON3_PYTZ_URL := https://pypi.python.org/packages/ca/a9/62f96decb1e309d6300ebe7eee9acfd7bccaeedd693794437005b9067b44/$(PYTHON3_PYTZ).$(PYTHON3_PYTZ_SUFFIX)\#md5=$(PYTHON3_PYTZ_MD5)
> +PYTHON3_PYTZ_SOURCE := $(SRCDIR)/$(PYTHON3_PYTZ).$(PYTHON3_PYTZ_SUFFIX)
> +PYTHON3_PYTZ_DIR := $(BUILDDIR)/$(PYTHON3_PYTZ)
> +PYTHON3_PYTZ_LICENSE := MIT
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +PYTHON3_PYTZ_CONF_TOOL := python3
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/python3-pytz.targetinstall:
> + @$(call targetinfo)
> +
> + @$(call install_init, python3-pytz)
> + @$(call install_fixup,python3-pytz,PRIORITY,optional)
> + @$(call install_fixup,python3-pytz,SECTION,base)
> + @$(call install_fixup,python3-pytz,AUTHOR,"Artur Wiebe <artur@4wiebe.de>")
> + @$(call install_fixup,python3-pytz,DESCRIPTION,missing)
> +
> + @$(call install_glob, python3-pytz, 0, 0, -, \
> + /usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages/pytz,, *.py)
This packages installs all timezone data. Please use the attached patch
(ist from Debian) and add */zoneinfo/* (I think) to the exclude patters of
install_glob.
This way the system timezone data is used.
Michael
> +
> + @$(call install_finish,python3-pytz)
> +
> + @$(call touch)
> +
> +# vim: syntax=make
> --
> 2.18.0
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: tzdata --]
[-- Type: text/plain, Size: 1496 bytes --]
Description: Use system zone information from the tzdata package
Author: Kurt Roeckx <kurt@roeckx.be>
Author: Hilko Bengen <bengen@debian.org>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416202
Forwarded: not-needed
Last-Update: 2018-02-14
Index: pytz-2018.3/pytz/tzfile.py
===================================================================
--- pytz-2018.3.orig/pytz/tzfile.py
+++ pytz-2018.3/pytz/tzfile.py
@@ -126,7 +126,8 @@ def build_tzinfo(zone, fp):
if __name__ == '__main__':
import os.path
from pprint import pprint
- base = os.path.join(os.path.dirname(__file__), 'zoneinfo')
+ # Patched in Debian, use the system zoninfo from the tzdata package
+ base = '/usr/share/zoneinfo'
tz = build_tzinfo('Australia/Melbourne',
open(os.path.join(base, 'Australia', 'Melbourne'), 'rb'))
tz = build_tzinfo('US/Eastern',
Index: pytz-2018.3/pytz/__init__.py
===================================================================
--- pytz-2018.3.orig/pytz/__init__.py
+++ pytz-2018.3/pytz/__init__.py
@@ -94,7 +94,7 @@ def open_resource(name):
if zoneinfo_dir is not None:
filename = os.path.join(zoneinfo_dir, *name_parts)
else:
- filename = os.path.join(os.path.dirname(__file__),
+ filename = os.path.join('/usr','share',
'zoneinfo', *name_parts)
if not os.path.exists(filename):
# http://bugs.launchpad.net/bugs/383171 - we avoid using this
[-- Attachment #3: Type: text/plain, Size: 91 bytes --]
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2018-09-06 8:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 17:39 [ptxdist] [PATCH 1/4] python3-lxml: " Artur Wiebe
2018-08-31 17:39 ` [ptxdist] [PATCH 2/4] python3-pytz: " Artur Wiebe
2018-09-06 8:51 ` Michael Olbrich [this message]
2018-08-31 17:39 ` [ptxdist] [PATCH 3/4] python3-dateutil: " Artur Wiebe
2018-08-31 17:39 ` [ptxdist] [PATCH 4/4] python3-opcua: " Artur Wiebe
2018-09-04 13:33 ` [ptxdist] [PATCH 1/4] python3-lxml: " Roland Hieber
2018-09-04 16:03 ` [ptxdist] ?==?utf-8?q? ?==?utf-8?q? [PATCH 1/4]?==?utf-8?q? " Artur Wiebe
2018-09-06 8:51 ` [ptxdist] ?= [PATCH 1/4]=?utf-8?q? " Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180906085111.n2zqwo7hixmlh4rt@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox