mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-27 23:44:04 +00:00
added alarm/python2-dateutil-2.1
This commit is contained in:
parent
c105f40366
commit
84fde2b5cd
2 changed files with 81 additions and 0 deletions
60
alarm/python2-dateutil-2.1/PKGBUILD
Normal file
60
alarm/python2-dateutil-2.1/PKGBUILD
Normal file
|
@ -0,0 +1,60 @@
|
|||
#Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
|
||||
#Contributor: lilydjwg <lilydjwg@gmail.com>
|
||||
|
||||
pkgbase=python-dateutil-2.1
|
||||
pkgname=('python-dateutil-2.1' 'python2-dateutil-2.1')
|
||||
pkgver=2.1
|
||||
pkgrel=8
|
||||
pkgdesc="Provides powerful extensions to the standard datetime module"
|
||||
arch=('any')
|
||||
license=('custom:PYTHON')
|
||||
url="http://labix.org/python-dateutil"
|
||||
makedepends=('python-setuptools' 'python2-setuptools' 'python-six' 'python2-six')
|
||||
source=(http://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-$pkgver.tar.gz{,.asc} python-dateutil-2.1-open-utf-8.patch)
|
||||
md5sums=('1534bb15cf311f07afaa3aacba1c028b'
|
||||
'4aa0ba908299d983781c58ec0640ef2b'
|
||||
'4b780c62fc03be161629ee08e35eba6a')
|
||||
|
||||
build() {
|
||||
cd $srcdir
|
||||
cp -r python-dateutil-$pkgver python2-dateutil-$pkgver
|
||||
|
||||
cd python-dateutil-$pkgver
|
||||
patch -Np0 -i $srcdir/python-dateutil-2.1-open-utf-8.patch
|
||||
|
||||
}
|
||||
|
||||
package_python-dateutil-2.1()
|
||||
{
|
||||
depends=('python' 'python-six')
|
||||
conflicts=('python-dateutil')
|
||||
cd $srcdir/python-dateutil-$pkgver
|
||||
python3 setup.py install --root=$pkgdir --optimize=1
|
||||
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
chmod -R a+r $pkgdir/usr/lib/python3.3/
|
||||
|
||||
# Remove data files
|
||||
rm $pkgdir/usr/lib/python3.3/site-packages/dateutil/zoneinfo/zoneinfo--latest.tar.gz
|
||||
|
||||
}
|
||||
|
||||
package_python2-dateutil-2.1()
|
||||
{
|
||||
depends=('python2' 'python2-six')
|
||||
conflicts=('python2-dateutil')
|
||||
cd $srcdir/python2-dateutil-$pkgver
|
||||
python2 setup.py install --root=$pkgdir --optimize=1
|
||||
install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
|
||||
chmod -R a+r $pkgdir/usr/lib/python2.7/
|
||||
rm $pkgdir/usr/lib/python2.7/site-packages/dateutil/zoneinfo/zoneinfo--latest.tar.gz
|
||||
|
||||
}
|
||||
|
||||
check() {
|
||||
cd $srcdir/python-dateutil-$pkgver
|
||||
python3 test.py
|
||||
|
||||
cd $srcdir/python2-dateutil-$pkgver
|
||||
python2 test.py
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
Fix UnicodeDecodeError in setup.py.
|
||||
|
||||
https://bugs.gentoo.org/show_bug.cgi?id=410725
|
||||
--- setup.py
|
||||
+++ setup.py
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/python
|
||||
from os.path import isfile, join
|
||||
+import codecs
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
@@ -13,7 +14,7 @@
|
||||
|
||||
TOPDIR = os.path.dirname(__file__) or "."
|
||||
VERSION = re.search('__version__ = "([^"]+)"',
|
||||
- open(TOPDIR + "/dateutil/__init__.py").read()).group(1)
|
||||
+ codecs.open(TOPDIR + "/dateutil/__init__.py", encoding='utf-8').read()).group(1)
|
||||
|
||||
|
||||
setup(name="python-dateutil",
|
Loading…
Reference in a new issue