Commit 698a77e6 authored by Natanael Copa's avatar Natanael Copa

main/python: upgrade to 2.7.2

parent 0279e159
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=python
pkgver=2.6.5
pkgrel=8
pkgver=2.7.2
pkgrel=0
pkgdesc="A high-level scripting language"
url="http://www.python.org"
arch="all"
......@@ -13,14 +13,14 @@ depends=
makedepends="expat-dev openssl-dev zlib-dev ncurses-dev bzip2-dev
gdbm-dev sqlite-dev libffi-dev"
source="http://www.$pkgname.org/ftp/$pkgname/$pkgver/Python-$pkgver.tar.bz2
$pkgname-2.6-internal-expat.patch
"
prepare() {
cd "$srcdir/Python-$pkgver"
for i in ../*.patch; do
msg "Apply $i"
patch -p1 < $i || return 1
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1
esac
done
}
......@@ -30,6 +30,7 @@ build() {
--enable-shared \
--with-threads \
--with-system-ffi \
--with-system-expat \
--enable-unicode=ucs4 \
|| return 1
......@@ -54,7 +55,8 @@ _mv_files() {
tests() {
pkgdesc="The test modules from the main python package"
cd "$pkgdir"
_mv_files $(find usr/lib -type d -name 'test*')
_mv_files usr/lib/python*/*/test \
usr/lib/python*/test
}
gdbm() {
......@@ -63,5 +65,4 @@ gdbm() {
_mv_files $(find usr/lib -name '*gdbm*')
}
md5sums="6bef0417e71a1a1737ccf5750420fdb3 Python-2.6.5.tar.bz2
9d64df5e0a6aed149a792c7bff16e3d9 python-2.6-internal-expat.patch"
md5sums="ba7b2f11ffdbf195ee0d111b9455a5bd Python-2.7.2.tar.bz2"
--- a/setup.py 2008-04-22 12:12:24.613554757 +0300
+++ b/setup.py 2008-04-22 12:13:09.276544063 +0300
@@ -1035,18 +1035,15 @@
#
# More information on Expat can be found at www.libexpat.org.
#
- expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
- define_macros = [
- ('HAVE_EXPAT_CONFIG_H', '1'),
- ]
+ # Use system expat
+ expatinc = '/usr/include'
+ define_macros = []
exts.append(Extension('pyexpat',
define_macros = define_macros,
include_dirs = [expatinc],
+ libraries = ['expat'],
sources = ['pyexpat.c',
- 'expat/xmlparse.c',
- 'expat/xmlrole.c',
- 'expat/xmltok.c',
],
))
@@ -1058,6 +1055,7 @@
exts.append(Extension('_elementtree',
define_macros = define_macros,
include_dirs = [expatinc],
+ libraries = ['expat'],
sources = ['_elementtree.c'],
))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment