diff options
author | zlg <zlg@zlg.space> | 2018-11-21 03:20:58 -0800 |
---|---|---|
committer | zlg <zlg@zlg.space> | 2018-11-21 03:35:29 -0800 |
commit | dad36fec1bde77520971a3af519279d5a307ce98 (patch) | |
tree | 44853a81a556c462ad3f9250a3a6fa3a3eb0569e /user | |
parent | f68fe057197d17af33c1f57e8c61d038623c5abc (diff) | |
download | packages-dad36fec1bde77520971a3af519279d5a307ce98.tar.gz packages-dad36fec1bde77520971a3af519279d5a307ce98.tar.bz2 packages-dad36fec1bde77520971a3af519279d5a307ce98.tar.xz packages-dad36fec1bde77520971a3af519279d5a307ce98.zip |
user/py3-tz: new package
Diffstat (limited to 'user')
-rw-r--r-- | user/py3-tz/APKBUILD | 34 | ||||
-rw-r--r-- | user/py3-tz/zoneinfo-fix.patch | 13 | ||||
-rw-r--r-- | user/py3-tz/zoneinfo-noinstall.patch | 20 |
3 files changed, 67 insertions, 0 deletions
diff --git a/user/py3-tz/APKBUILD b/user/py3-tz/APKBUILD new file mode 100644 index 000000000..7d52f8779 --- /dev/null +++ b/user/py3-tz/APKBUILD @@ -0,0 +1,34 @@ +# Contributor: Peter Bui <pnutzh4x0r@gmail.com> +# Contributor: Fabian Affolter <fabian@affolter-engineering.ch> +# Maintainer: zlg <zlg+adelie@zlg.space> +pkgname=py3-tz +_pkgname=pytz +pkgver=2018.5 +pkgrel=0 +pkgdesc="A Python definitions of world timezone" +url="http://pytz.sourceforge.net/" +arch="noarch" +license="MIT" +options="!check" # flake8, sphinx +depends="tzdata" +makedepends="python3-dev unzip" +subpackages="" +source="https://pypi.io/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz + zoneinfo-noinstall.patch + zoneinfo-fix.patch" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python3 setup.py build +} + +package() { + mkdir -p "$pkgdir" + cd "$builddir" + python3 setup.py install --prefix=/usr --root="$pkgdir" +} + +sha512sums="35b6bdd25b8e57c693da4379c2032401ef3cf290a57d8448c67dcaf1491a21d27ff25d932ef3ec3a51e31fbb7541e081073f292867a7d1ad47904b69dc7e4863 pytz-2018.5.tar.gz +be61b829014be0d0d7db0c544481d378a95324c1f5968cbbcd7887c6ee8ce52a0b47ae734e16fc5fb2429d8d49c8ef199b6b3b7194f9e654699bb73ab8f3a10d zoneinfo-noinstall.patch +a09467dbb00c1ab9f7e7527d9b020a6d913b8da2380a5359e782f27ccf9ec4dd4f50bfc92c95dc2e793904242c8139793c15e78e651d2777fb3b3abc48fcd640 zoneinfo-fix.patch" diff --git a/user/py3-tz/zoneinfo-fix.patch b/user/py3-tz/zoneinfo-fix.patch new file mode 100644 index 000000000..a0a3a1190 --- /dev/null +++ b/user/py3-tz/zoneinfo-fix.patch @@ -0,0 +1,13 @@ +Patch pulled from Gentoo. Forces package to use system tzinfo +--- a/pytz/__init__.py ++++ b/pytz/__init__.py +@@ -91,8 +91,7 @@ + if zoneinfo_dir is not None: + filename = os.path.join(zoneinfo_dir, *name_parts) + else: +- filename = os.path.join(os.path.dirname(__file__), +- 'zoneinfo', *name_parts) ++ 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 + # unless absolutely necessary to help when a broken version of diff --git a/user/py3-tz/zoneinfo-noinstall.patch b/user/py3-tz/zoneinfo-noinstall.patch new file mode 100644 index 000000000..a41e0a6cc --- /dev/null +++ b/user/py3-tz/zoneinfo-noinstall.patch @@ -0,0 +1,20 @@ +Patch pulled from Gentoo. Prevents installation of pkg tzinfo files +--- a/setup.py ++++ b/setup.py +@@ -15,15 +15,8 @@ + memail = 'stuart@stuartbishop.net' + packages = ['pytz'] + resources = ['zone.tab', 'locales/pytz.pot'] +-for dirpath, dirnames, filenames in os.walk(os.path.join('pytz', 'zoneinfo')): +- # remove the 'pytz' part of the path +- basepath = dirpath.split(os.path.sep, 1)[1] +- resources.extend([os.path.join(basepath, filename) +- for filename in filenames]) + package_data = {'pytz': resources} + +-assert len(resources) > 10, 'zoneinfo files not found!' +- + setup( + name='pytz', + version=pytz.VERSION, + |