summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYen Chi Hsuan2015-08-12 03:57:20 +0800
committerYen Chi Hsuan2015-08-12 03:57:20 +0800
commitd90bb3c9329da1b64aee9f292f2400ce0967cac7 (patch)
tree79e76b32c27a1cd08a51378a9d7adf340c199daa
downloadaur-d90bb3c9329da1b64aee9f292f2400ce0967cac7.tar.gz
Initial import. Python 3.2.6
-rw-r--r--.SRCINFO27
-rw-r--r--ChangeLog19
-rw-r--r--PKGBUILD82
-rw-r--r--readline-6.3.patch62
4 files changed, 190 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f2a562791952
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = python32
+ pkgdesc = Next generation of the python high-level scripting language
+ pkgver = 3.2.6
+ pkgrel = 1
+ url = http://www.python.org/
+ changelog = ChangeLog
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = tk
+ makedepends = sqlite
+ makedepends = valgrind
+ depends = expat
+ depends = bzip2
+ depends = gdbm
+ depends = openssl
+ depends = libffi
+ depends = zlib
+ optdepends = tk: for tkinter
+ optdepends = sqlite
+ source = http://www.python.org/ftp/python/3.2.6/Python-3.2.6.tar.xz
+ source = readline-6.3.patch
+ sha256sums = 1d12b501819fd26afafbf8459be1aa279b56f032b4c15412de0a713ce0de7bdc
+ sha256sums = fbd8a517726ec5d84e33e7f39bf721e3b0d08471d0cf905b830327b8aa959cc4
+
+pkgname = python32
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 000000000000..efad3febaeae
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,19 @@
+2015-08-04 Yen Chi Hsuan <yan12125@gmail.com>
+
+ * Adopted the AUR package.
+ * Update to Python 3.2.6
+
+2014-10-22 Alireza Savand <alireza.savand@gmail.com>
+
+ * Adopted the AUR package.
+ * Unflag package.
+
+2014-04-16 Christopher Arndt <chris@chrisarndt.de>
+
+ * 3.2.5-1 :
+ updated to upstream version 3.2.5.
+ removed '!makeflags' from options to allow multi-processor compilation
+ included patch for building against readline >= 6.3
+ changed checksum to sha256
+ removed man page symlink to python3.1.gz to avoid conflict with current
+ python 3 package
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ac909f115fef
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,82 @@
+# Maintainer: Alireza Savand <alireza.savand@gmail.com>
+# Contributors:
+# * Christopher Arndt <chris@chrisarndt.de>
+# * Simon Sapin <simon.sapin@kozea.fr>
+
+
+pkgname=python32
+pkgver=3.2.6
+pkgrel=1
+_pybasever=3.2
+pkgdesc="Next generation of the python high-level scripting language"
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://www.python.org/"
+depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib')
+makedepends=('tk' 'sqlite' 'valgrind')
+optdepends=('tk: for tkinter' 'sqlite')
+changelog=ChangeLog
+source=("http://www.python.org/ftp/python/${pkgver%rc*}/Python-${pkgver}.tar.xz" "readline-6.3.patch")
+sha256sums=('1d12b501819fd26afafbf8459be1aa279b56f032b4c15412de0a713ce0de7bdc'
+ 'fbd8a517726ec5d84e33e7f39bf721e3b0d08471d0cf905b830327b8aa959cc4')
+
+build() {
+ cd "${srcdir}/Python-${pkgver}"
+
+ # patch readline module to work with readline >= 6.3
+ # http://bugs.python.org/issue20374
+ patch -p1 -i $srcdir/readline-6.3.patch
+
+ # FS#23997
+ sed -i -e "s|^#.* /usr/local/bin/python|#!/usr/bin/python|" Lib/cgi.py
+
+ # Ensure that we are using the system copy of various libraries (expat, zlib and libffi),
+ # rather than copies shipped in the tarball
+ rm -rf Modules/expat
+ rm -rf Modules/zlib
+ rm -rf Modules/_ctypes/{darwin,libffi}*
+
+ ./configure --prefix=/usr \
+ --enable-shared \
+ --with-threads \
+ --with-computed-gotos \
+ --enable-ipv6 \
+ --with-valgrind \
+ --with-wide-unicode \
+ --with-system-expat \
+ --with-dbmliborder=gdbm:ndbm \
+ --with-system-ffi
+
+ make
+}
+
+# XXX disabled
+check_DISABLED() {
+ cd "${srcdir}/Python-${pkgver}"
+ LD_LIBRARY_PATH="${srcdir}/Python-${pkgver}":${LD_LIBRARY_PATH} \
+ "${srcdir}/Python-${pkgver}/python" -m test.regrtest -x test_distutils test_site \
+ test_urllib test_uuid test_pydoc
+}
+
+package() {
+ cd "${srcdir}/Python-${pkgver}"
+ # altinstall: /usr/bin/pythonX.Y but not /usr/bin/python or /usr/bin/pythonX
+ make DESTDIR="${pkgdir}" altinstall maninstall
+
+ # Work around a conflict with the current 'python' package.
+ rm "${pkgdir}/usr/lib/libpython3.so"
+ rm "${pkgdir}/usr/share/man/man1/python3.1"*
+
+ # Fix FS#22552
+ ln -sf ../../libpython${_pybasever}mu.so \
+ "${pkgdir}/usr/lib/python${_pybasever}/config-${_pybasever}mu/libpython${_pybasever}mu.so"
+
+ # Fix pycairo build
+ ln -sf python3.2mu-config "${pkgdir}/usr/bin/python3.2-config"
+
+ # Clean-up reference to build directory
+ sed -i "s|$srcdir/Python-${pkgver}:||" "$pkgdir/usr/lib/python${_pybasever}/config-${_pybasever}mu/Makefile"
+
+ # License
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/readline-6.3.patch b/readline-6.3.patch
new file mode 100644
index 000000000000..340e117aedb9
--- /dev/null
+++ b/readline-6.3.patch
@@ -0,0 +1,62 @@
+diff -aur Python-3.2.5/Modules/readline.c Python-3.2.5.new/Modules/readline.c
+--- Python-3.2.5/Modules/readline.c 2013-05-15 18:33:54.000000000 +0200
++++ Python-3.2.5.new/Modules/readline.c 2014-04-16 15:22:08.860060801 +0200
+@@ -760,15 +760,24 @@
+ return result;
+ }
+
++
+ static int
++#if defined(_RL_FUNCTION_TYPEDEF)
+ on_startup_hook(void)
++#else
++on_startup_hook()
++#endif
+ {
+ return on_hook(startup_hook);
+ }
+
+ #ifdef HAVE_RL_PRE_INPUT_HOOK
+ static int
++#if defined(_RL_FUNCTION_TYPEDEF)
+ on_pre_input_hook(void)
++#else
++on_pre_input_hook()
++#endif
+ {
+ return on_hook(pre_input_hook);
+ }
+@@ -892,7 +901,7 @@
+ #endif
+
+ #ifdef __APPLE__
+- /* the libedit readline emulation resets key bindings etc
++ /* the libedit readline emulation resets key bindings etc
+ * when calling rl_initialize. So call it upfront
+ */
+ if (using_libedit_emulation)
+@@ -912,12 +921,12 @@
+ rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
+ rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
+ /* Set our hook functions */
+- rl_startup_hook = (Function *)on_startup_hook;
++ rl_startup_hook = on_startup_hook;
+ #ifdef HAVE_RL_PRE_INPUT_HOOK
+- rl_pre_input_hook = (Function *)on_pre_input_hook;
++ rl_pre_input_hook = on_pre_input_hook;
+ #endif
+ /* Set our completion function */
+- rl_attempted_completion_function = (CPPFunction *)flex_complete;
++ rl_attempted_completion_function = flex_complete;
+ /* Set Python word break characters */
+ rl_completer_word_break_characters =
+ strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
+@@ -936,7 +945,7 @@
+ else
+ #endif /* __APPLE__ */
+ rl_initialize();
+-
++
+ RESTORE_LOCALE(saved_locale)
+ }
+