[dev-lang/python] drop old ebuild
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
# /etc/init.d/pydoc.conf
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.conf,v 1.2 2008/06/30 15:10:28 hawking Exp $
|
||||
|
||||
# This file contains the configuration information for pydoc's internal
|
||||
# webserver. The variables should be rather self explanatory :-)
|
||||
|
||||
# Default port for Python's pydoc server
|
||||
PYDOC_PORT=7464
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2008 Gentoo Technologies, Inc.
|
||||
# Distributed under the terms of the GNU General Public Licence v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-lang/python/files/pydoc.init,v 1.2 2008/06/30 15:10:28 hawking Exp $
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ -z $PYDOC_PORT ] ; then
|
||||
eerror "Port not set"
|
||||
return 1
|
||||
fi
|
||||
ebegin "Starting pydoc server on port $PYDOC_PORT"
|
||||
start-stop-daemon --start --background --make-pidfile \
|
||||
--pidfile /var/run/pydoc.pid \
|
||||
--startas /usr/bin/pydoc -- -p $PYDOC_PORT
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping pydoc server"
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/pydoc.pid
|
||||
eend $?
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
--- Python-2.4.4/Lib/test/test_multibytecodec.py.orig 2007-09-10 14:52:34.424592960 -0400
|
||||
+++ Python-2.4.4/Lib/test/test_multibytecodec.py 2007-09-10 14:53:30.646201491 -0400
|
||||
@@ -81,11 +81,11 @@ class Test_ISO2022(unittest.TestCase):
|
||||
uni = u':hu4:unit\xe9 de famille'
|
||||
self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni)
|
||||
|
||||
- def test_iso2022_jp_g0(self):
|
||||
- self.failIf('\x0e' in u'\N{SOFT HYPHEN}'.encode('iso-2022-jp-2'))
|
||||
- for encoding in ('iso-2022-jp-2004', 'iso-2022-jp-3'):
|
||||
- e = u'\u3406'.encode(encoding)
|
||||
- self.failIf(filter(lambda x: x >= '\x80', e))
|
||||
+# def test_iso2022_jp_g0(self):
|
||||
+# self.failIf('\x0e' in u'\N{SOFT HYPHEN}'.encode('iso-2022-jp-2'))
|
||||
+# for encoding in ('iso-2022-jp-2004', 'iso-2022-jp-3'):
|
||||
+# e = u'\u3406'.encode(encoding)
|
||||
+# self.failIf(filter(lambda x: x >= '\x80', e))
|
||||
|
||||
def test_bug1572832(self):
|
||||
if sys.maxunicode >= 0x10000:
|
||||
@@ -1,34 +0,0 @@
|
||||
http://bugs.gentoo.org/239110
|
||||
|
||||
assume %zd is supported when cross-compiling. any target we care about
|
||||
supports it, so ...
|
||||
|
||||
--- configure.in
|
||||
+++ configure.in
|
||||
@@ -3417,7 +3417,7 @@
|
||||
|
||||
|
||||
|
||||
-AC_MSG_CHECKING(for %zd printf() format support)
|
||||
+AC_CACHE_CHECK([for %zd printf() format support], [py_cv_has_zd_printf], [dnl
|
||||
AC_TRY_RUN([#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
@@ -3451,10 +3451,13 @@
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
-}],
|
||||
-[AC_MSG_RESULT(yes)
|
||||
- AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
|
||||
- AC_MSG_RESULT(no))
|
||||
+}], [py_cv_has_zd_printf="yes"],
|
||||
+ [py_cv_has_zd_printf="no"],
|
||||
+ [py_cv_has_zd_printf="cross -- assuming yes"]
|
||||
+)])
|
||||
+if test "$py_cv_has_zd_printf" != "no" ; then
|
||||
+ AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])
|
||||
+fi
|
||||
|
||||
AC_CHECK_TYPE(socklen_t,,
|
||||
AC_DEFINE(socklen_t,int,
|
||||
@@ -1,59 +0,0 @@
|
||||
if we're cross-compiling, fall back to a link-only test rather than trying
|
||||
to run a program for the chflags functions
|
||||
|
||||
--- python-2.6/configure.in
|
||||
+++ python-2.6/configure.in
|
||||
@@ -2565,7 +2565,7 @@
|
||||
|
||||
# On Tru64, chflags seems to be present, but calling it will
|
||||
# exit Python
|
||||
-AC_MSG_CHECKING(for chflags)
|
||||
+AC_CACHE_CHECK([for chflags], [py_cv_has_chflags], [dnl
|
||||
AC_TRY_RUN([
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
@@ -2575,12 +2575,18 @@
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
-],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
|
||||
- AC_MSG_RESULT(yes),
|
||||
- AC_MSG_RESULT(no)
|
||||
-)
|
||||
+], [py_cv_has_chflags="yes"],
|
||||
+ [py_cv_has_chflags="no"],
|
||||
+ [py_cv_has_chflags="cross"])
|
||||
+])
|
||||
+if test "$py_cv_has_chflags" = "cross" ; then
|
||||
+ AC_CHECK_FUNC([chflags], [py_cv_has_chflags="yes"], [py_cv_has_chflags="no"])
|
||||
+fi
|
||||
+if test "$py_cv_has_chflags" = "yes" ; then
|
||||
+ AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
|
||||
+fi
|
||||
|
||||
-AC_MSG_CHECKING(for lchflags)
|
||||
+AC_CACHE_CHECK([for lchflags], [py_cv_has_lchflags], [dnl
|
||||
AC_TRY_RUN([
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
@@ -2590,10 +2596,16 @@
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
-],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
|
||||
- AC_MSG_RESULT(yes),
|
||||
- AC_MSG_RESULT(no)
|
||||
-)
|
||||
+], [py_cv_has_lchflags="yes"],
|
||||
+ [py_cv_has_lchflags="no"],
|
||||
+ [py_cv_has_lchflags="cross"])
|
||||
+])
|
||||
+if test "$py_cv_has_lchflags" = "cross" ; then
|
||||
+ AC_CHECK_FUNC([lchflags], [py_cv_has_lchflags="yes"], [py_cv_has_lchflags="no"])
|
||||
+fi
|
||||
+if test "$py_cv_has_lchflags" = "yes" ; then
|
||||
+ AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
|
||||
+fi
|
||||
|
||||
dnl Check if system zlib has *Copy() functions
|
||||
dnl
|
||||
@@ -1,19 +0,0 @@
|
||||
--- Lib/test/test_multibytecodec.py.orig 2008-04-19 18:48:59.000000000 +0300
|
||||
+++ Lib/test/test_multibytecodec.py 2008-04-19 18:49:44.000000000 +0300
|
||||
@@ -212,11 +212,11 @@
|
||||
uni = u':hu4:unit\xe9 de famille'
|
||||
self.assertEqual(iso2022jp2.decode('iso2022-jp-2'), uni)
|
||||
|
||||
- def test_iso2022_jp_g0(self):
|
||||
- self.failIf('\x0e' in u'\N{SOFT HYPHEN}'.encode('iso-2022-jp-2'))
|
||||
- for encoding in ('iso-2022-jp-2004', 'iso-2022-jp-3'):
|
||||
- e = u'\u3406'.encode(encoding)
|
||||
- self.failIf(filter(lambda x: x >= '\x80', e))
|
||||
+ #def test_iso2022_jp_g0(self):
|
||||
+ # self.failIf('\x0e' in u'\N{SOFT HYPHEN}'.encode('iso-2022-jp-2'))
|
||||
+ # for encoding in ('iso-2022-jp-2004', 'iso-2022-jp-3'):
|
||||
+ # e = u'\u3406'.encode(encoding)
|
||||
+ # self.failIf(filter(lambda x: x >= '\x80', e))
|
||||
|
||||
def test_bug1572832(self):
|
||||
if sys.maxunicode >= 0x10000:
|
||||
@@ -1,184 +0,0 @@
|
||||
Index: Python/pythonrun.c
|
||||
===================================================================
|
||||
--- Python/pythonrun.c (revisione 75748)
|
||||
+++ Python/pythonrun.c (revisione 75749)
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "ast.h"
|
||||
#include "eval.h"
|
||||
#include "marshal.h"
|
||||
+#include "abstract.h"
|
||||
|
||||
#ifdef HAVE_SIGNAL_H
|
||||
#include <signal.h>
|
||||
@@ -61,6 +62,7 @@
|
||||
PyCompilerFlags *);
|
||||
static void err_input(perrdetail *);
|
||||
static void initsigs(void);
|
||||
+static void wait_for_thread_shutdown(void);
|
||||
static void call_sys_exitfunc(void);
|
||||
static void call_ll_exitfuncs(void);
|
||||
extern void _PyUnicode_Init(void);
|
||||
@@ -387,6 +389,8 @@
|
||||
if (!initialized)
|
||||
return;
|
||||
|
||||
+ wait_for_thread_shutdown();
|
||||
+
|
||||
/* The interpreter is still entirely intact at this point, and the
|
||||
* exit funcs may be relying on that. In particular, if some thread
|
||||
* or exit func is still waiting to do an import, the import machinery
|
||||
@@ -1663,6 +1667,32 @@
|
||||
#include "pythread.h"
|
||||
#endif
|
||||
|
||||
+/* Wait until threading._shutdown completes, provided
|
||||
+ the threading module was imported in the first place.
|
||||
+ The shutdown routine will wait until all non-daemon
|
||||
+ "threading" threads have completed. */
|
||||
+static void
|
||||
+wait_for_thread_shutdown(void)
|
||||
+{
|
||||
+#ifdef WITH_THREAD
|
||||
+ PyObject *result;
|
||||
+ PyThreadState *tstate = PyThreadState_GET();
|
||||
+ PyObject *threading = PyMapping_GetItemString(tstate->interp->modules,
|
||||
+ "threading");
|
||||
+ if (threading == NULL) {
|
||||
+ /* threading not imported */
|
||||
+ PyErr_Clear();
|
||||
+ return;
|
||||
+ }
|
||||
+ result = PyObject_CallMethod(threading, "_shutdown", "");
|
||||
+ if (result == NULL)
|
||||
+ PyErr_WriteUnraisable(threading);
|
||||
+ else
|
||||
+ Py_DECREF(result);
|
||||
+ Py_DECREF(threading);
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
#define NEXITFUNCS 32
|
||||
static void (*exitfuncs[NEXITFUNCS])(void);
|
||||
static int nexitfuncs = 0;
|
||||
Index: Misc/NEWS
|
||||
===================================================================
|
||||
--- Misc/NEWS (revisione 75748)
|
||||
+++ Misc/NEWS (revisione 75749)
|
||||
@@ -4,6 +4,22 @@
|
||||
|
||||
(editors: check NEWS.help for information about editing NEWS using ReST.)
|
||||
|
||||
+What's New in Python 2.6.5
|
||||
+==========================
|
||||
+
|
||||
+*Release date: XX-XXX-20XX*
|
||||
+
|
||||
+Core and Builtins
|
||||
+-----------------
|
||||
+
|
||||
+- Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which
|
||||
+ fixes the problem of some exceptions being thrown at shutdown when the
|
||||
+ interpreter is killed. Patch by Adam Olsen.
|
||||
+
|
||||
+Library
|
||||
+-------
|
||||
+
|
||||
+
|
||||
What's New in Python 2.6.4 final?
|
||||
=================================
|
||||
|
||||
Index: Misc/ACKS
|
||||
===================================================================
|
||||
--- Misc/ACKS (revisione 75748)
|
||||
+++ Misc/ACKS (revisione 75749)
|
||||
@@ -517,6 +517,7 @@
|
||||
Tim O'Malley
|
||||
Pascal Oberndoerfer
|
||||
Jeffrey Ollie
|
||||
+Adam Olsen
|
||||
Grant Olson
|
||||
Piet van Oostrum
|
||||
Jason Orendorff
|
||||
Index: Lib/test/test_threading.py
|
||||
===================================================================
|
||||
--- Lib/test/test_threading.py (revisione 75748)
|
||||
+++ Lib/test/test_threading.py (revisione 75749)
|
||||
@@ -284,7 +284,31 @@
|
||||
self.failIf(rc == 2, "interpreted was blocked")
|
||||
self.failUnless(rc == 0, "Unexpected error")
|
||||
|
||||
+ def test_join_nondaemon_on_shutdown(self):
|
||||
+ # Issue 1722344
|
||||
+ # Raising SystemExit skipped threading._shutdown
|
||||
+ import subprocess
|
||||
+ p = subprocess.Popen([sys.executable, "-c", """if 1:
|
||||
+ import threading
|
||||
+ from time import sleep
|
||||
|
||||
+ def child():
|
||||
+ sleep(1)
|
||||
+ # As a non-daemon thread we SHOULD wake up and nothing
|
||||
+ # should be torn down yet
|
||||
+ print "Woke up, sleep function is:", sleep
|
||||
+
|
||||
+ threading.Thread(target=child).start()
|
||||
+ raise SystemExit
|
||||
+ """],
|
||||
+ stdout=subprocess.PIPE,
|
||||
+ stderr=subprocess.PIPE)
|
||||
+ stdout, stderr = p.communicate()
|
||||
+ self.assertEqual(stdout.strip(),
|
||||
+ "Woke up, sleep function is: <built-in function sleep>")
|
||||
+ stderr = re.sub(r"^\[\d+ refs\]", "", stderr, re.MULTILINE).strip()
|
||||
+ self.assertEqual(stderr, "")
|
||||
+
|
||||
def test_enumerate_after_join(self):
|
||||
# Try hard to trigger #1703448: a thread is still returned in
|
||||
# threading.enumerate() after it has been join()ed.
|
||||
Index: Modules/main.c
|
||||
===================================================================
|
||||
--- Modules/main.c (revisione 75748)
|
||||
+++ Modules/main.c (revisione 75749)
|
||||
@@ -222,33 +222,6 @@
|
||||
}
|
||||
|
||||
|
||||
-/* Wait until threading._shutdown completes, provided
|
||||
- the threading module was imported in the first place.
|
||||
- The shutdown routine will wait until all non-daemon
|
||||
- "threading" threads have completed. */
|
||||
-#include "abstract.h"
|
||||
-static void
|
||||
-WaitForThreadShutdown(void)
|
||||
-{
|
||||
-#ifdef WITH_THREAD
|
||||
- PyObject *result;
|
||||
- PyThreadState *tstate = PyThreadState_GET();
|
||||
- PyObject *threading = PyMapping_GetItemString(tstate->interp->modules,
|
||||
- "threading");
|
||||
- if (threading == NULL) {
|
||||
- /* threading not imported */
|
||||
- PyErr_Clear();
|
||||
- return;
|
||||
- }
|
||||
- result = PyObject_CallMethod(threading, "_shutdown", "");
|
||||
- if (result == NULL)
|
||||
- PyErr_WriteUnraisable(threading);
|
||||
- else
|
||||
- Py_DECREF(result);
|
||||
- Py_DECREF(threading);
|
||||
-#endif
|
||||
-}
|
||||
-
|
||||
/* Main program */
|
||||
|
||||
int
|
||||
@@ -620,8 +593,6 @@
|
||||
sts = PyRun_AnyFileFlags(stdin, "<stdin>", &cf) != 0;
|
||||
}
|
||||
|
||||
- WaitForThreadShutdown();
|
||||
-
|
||||
Py_Finalize();
|
||||
#ifdef RISCOS
|
||||
if (Py_RISCOSWimpFlag)
|
||||
@@ -1,58 +0,0 @@
|
||||
#! /usr/bin/python2.4
|
||||
|
||||
import sys
|
||||
import os
|
||||
import getopt
|
||||
from distutils import sysconfig
|
||||
|
||||
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
|
||||
'ldflags', 'help']
|
||||
|
||||
def exit_with_usage(code=1):
|
||||
print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0],
|
||||
'|'.join('--'+opt for opt in valid_opts))
|
||||
sys.exit(code)
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
|
||||
except getopt.error:
|
||||
exit_with_usage()
|
||||
|
||||
if not opts:
|
||||
#exit_with_usage()
|
||||
#be compatible with our old python-config-2.4
|
||||
import string
|
||||
print "-lpython2.4 -lm -L/usr/lib/python2.4/config",string.join(string.split(sysconfig.get_config_var("MODLIBS")))
|
||||
sys.exit(0)
|
||||
|
||||
opt = opts[0][0]
|
||||
|
||||
pyver = sysconfig.get_config_var('VERSION')
|
||||
getvar = sysconfig.get_config_var
|
||||
|
||||
if opt == '--help':
|
||||
exit_with_usage(0)
|
||||
|
||||
elif opt == '--prefix':
|
||||
print sysconfig.PREFIX
|
||||
|
||||
elif opt == '--exec-prefix':
|
||||
print sysconfig.EXEC_PREFIX
|
||||
|
||||
elif opt in ('--includes', '--cflags'):
|
||||
flags = ['-I' + sysconfig.get_python_inc(),
|
||||
'-I' + sysconfig.get_python_inc(plat_specific=True)]
|
||||
if opt == '--cflags':
|
||||
flags.extend(getvar('CFLAGS').split())
|
||||
print ' '.join(flags)
|
||||
|
||||
elif opt in ('--libs', '--ldflags'):
|
||||
libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
|
||||
libs.append('-lpython'+pyver)
|
||||
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
|
||||
# shared library in prefix/lib/.
|
||||
if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'):
|
||||
libs.insert(0, '-L' + getvar('LIBPL'))
|
||||
print ' '.join(libs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user