packages: python3/python3-bug11254.patch, python3/python3-noarch_to_datadir...
jajcus
jajcus at pld-linux.org
Fri Jul 15 15:11:53 CEST 2011
Author: jajcus Date: Fri Jul 15 13:11:53 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- patches updated for Python3.2.1
- some tests fixed, some tests disable, 'tests' bcond re-enabled
---- Files affected:
packages/python3:
python3-bug11254.patch (1.1 -> 1.2) , python3-noarch_to_datadir.patch (1.5 -> 1.6) , python3.spec (1.52 -> 1.53)
---- Diffs:
================================================================
Index: packages/python3/python3-bug11254.patch
diff -u packages/python3/python3-bug11254.patch:1.1 packages/python3/python3-bug11254.patch:1.2
--- packages/python3/python3-bug11254.patch:1.1 Sun May 22 03:15:20 2011
+++ packages/python3/python3-bug11254.patch Fri Jul 15 15:11:47 2011
@@ -1,6 +1,6 @@
-diff --git a/Lib/distutils/tests/test_build_py.py b/Lib/distutils/tests/test_build_py.py
---- a/Lib/distutils/tests/test_build_py.py
-+++ b/Lib/distutils/tests/test_build_py.py
+diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/distutils/tests/test_build_py.py Python-3.2.1/Lib/distutils/tests/test_build_py.py
+--- Python-3.2.1.orig/Lib/distutils/tests/test_build_py.py 2011-07-09 08:58:47.000000000 +0200
++++ Python-3.2.1/Lib/distutils/tests/test_build_py.py 2011-07-15 13:55:54.000000000 +0200
@@ -3,6 +3,7 @@
import os
import sys
@@ -9,24 +9,27 @@
import unittest
from distutils.command.build_py import build_py
-@@ -57,9 +58,11 @@ class BuildPyTestCase(support.TempdirMan
+@@ -57,13 +58,15 @@
self.assertEqual(len(cmd.get_outputs()), 3)
pkgdest = os.path.join(destination, "pkg")
files = os.listdir(pkgdest)
-- self.assertTrue("__init__.py" in files)
-- self.assertTrue("__init__.pyc" in files)
-- self.assertTrue("README.txt" in files)
+ byte_compiled_files = os.listdir(os.path.join(pkgdest, "__pycache__"))
-+ self.assertIn("__init__.py", files)
-+ self.assertIn("__init__.{}.pyc".format(imp.get_tag()),
-+ byte_compiled_files)
-+ self.assertIn("README.txt", files)
+ self.assertIn("__init__.py", files)
+ self.assertIn("README.txt", files)
++ init_pyc = "__init__.{}.pyc".format(imp.get_tag())
+ # XXX even with -O, distutils writes pyc, not pyo; bug?
+ if sys.dont_write_bytecode:
+- self.assertNotIn("__init__.pyc", files)
++ self.assertNotIn(init_pyc, byte_compiled_files)
+ else:
+- self.assertIn("__init__.pyc", files)
++ self.assertIn(init_pyc, byte_compiled_files)
- def test_empty_package_dir (self):
+ def test_empty_package_dir(self):
# See SF 1668596/1720897.
-diff --git a/Lib/distutils/tests/test_install_lib.py b/Lib/distutils/tests/test_install_lib.py
---- a/Lib/distutils/tests/test_install_lib.py
-+++ b/Lib/distutils/tests/test_install_lib.py
+diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/distutils/tests/test_install_lib.py Python-3.2.1/Lib/distutils/tests/test_install_lib.py
+--- Python-3.2.1.orig/Lib/distutils/tests/test_install_lib.py 2011-07-09 08:58:47.000000000 +0200
++++ Python-3.2.1/Lib/distutils/tests/test_install_lib.py 2011-07-15 13:53:50.000000000 +0200
@@ -1,6 +1,7 @@
"""Tests for distutils.command.install_data."""
import sys
@@ -35,7 +38,7 @@
import unittest
from distutils.command.install_lib import install_lib
-@@ -36,14 +37,19 @@ class InstallLibTestCase(support.Tempdir
+@@ -36,14 +37,19 @@
'byte-compile not supported')
def test_byte_compile(self):
pkg_dir, dist = self.create_dist()
@@ -57,10 +60,10 @@
def test_get_outputs(self):
pkg_dir, dist = self.create_dist()
-diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py
---- a/Lib/distutils/util.py
-+++ b/Lib/distutils/util.py
-@@ -6,7 +6,7 @@ one of the other *util.py modules.
+diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/distutils/util.py Python-3.2.1/Lib/distutils/util.py
+--- Python-3.2.1.orig/Lib/distutils/util.py 2011-07-09 08:58:47.000000000 +0200
++++ Python-3.2.1/Lib/distutils/util.py 2011-07-15 13:53:50.000000000 +0200
+@@ -6,7 +6,7 @@
__revision__ = "$Id$"
@@ -69,7 +72,7 @@
from distutils.errors import DistutilsPlatformError
from distutils.dep_util import newer
from distutils.spawn import spawn
-@@ -533,7 +533,7 @@ byte_compile(files, optimize=%r, force=%
+@@ -531,7 +531,7 @@
# Terminology from the py_compile module:
# cfile - byte-compiled file
# dfile - purported source filename (same as 'file' by default)
================================================================
Index: packages/python3/python3-noarch_to_datadir.patch
diff -u packages/python3/python3-noarch_to_datadir.patch:1.5 packages/python3/python3-noarch_to_datadir.patch:1.6
--- packages/python3/python3-noarch_to_datadir.patch:1.5 Sat Apr 2 19:55:35 2011
+++ packages/python3/python3-noarch_to_datadir.patch Fri Jul 15 15:11:47 2011
@@ -1,5 +1,106 @@
---- Python-3.2/Modules/getpath.c.orig 2011-04-02 08:25:12.289739787 +0200
-+++ Python-3.2/Modules/getpath.c 2011-04-02 08:31:24.349729730 +0200
+diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/distutils/command/install.py Python-3.2.1/Lib/distutils/command/install.py
+--- Python-3.2.1.orig/Lib/distutils/command/install.py 2011-07-15 13:44:25.000000000 +0200
++++ Python-3.2.1/Lib/distutils/command/install.py 2011-07-15 13:45:43.000000000 +0200
+@@ -48,14 +48,14 @@
+
+ INSTALL_SCHEMES = {
+ 'unix_prefix': {
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
++ 'purelib': '$base/share/python$py_version_short/site-packages',
+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
+ 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
+ 'unix_home': {
+- 'purelib': '$base/lib/python',
++ 'purelib': '$base/share/python',
+ 'platlib': '$base/'+libname+'/python',
+ 'headers': '$base/include/python/$dist_name',
+ 'scripts': '$base/bin',
+diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/distutils/sysconfig.py Python-3.2.1/Lib/distutils/sysconfig.py
+--- Python-3.2.1.orig/Lib/distutils/sysconfig.py 2011-07-15 13:44:25.000000000 +0200
++++ Python-3.2.1/Lib/distutils/sysconfig.py 2011-07-15 13:45:43.000000000 +0200
+@@ -124,12 +124,12 @@
+ prefix = plat_specific and EXEC_PREFIX or PREFIX
+
+ if os.name == "posix":
+- if plat_specific:
+- lib = sys.lib
++ if plat_specific:
++ libpython = os.path.join(prefix,
++ sys.lib, "python" + get_python_version())
+ else:
+- lib = 'lib'
+- libpython = os.path.join(prefix,
+- lib, "python" + get_python_version())
++ libpython = os.path.join(prefix,
++ "share", "python" + get_python_version())
+ if standard_lib:
+ return libpython
+ else:
+diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/distutils/tests/test_install.py Python-3.2.1/Lib/distutils/tests/test_install.py
+--- Python-3.2.1.orig/Lib/distutils/tests/test_install.py 2011-07-15 13:44:25.000000000 +0200
++++ Python-3.2.1/Lib/distutils/tests/test_install.py 2011-07-15 13:45:43.000000000 +0200
+@@ -48,7 +48,7 @@
+ expected = os.path.normpath(expected)
+ self.assertEqual(got, expected)
+
+- libdir = os.path.join(destination, "lib", "python")
++ libdir = os.path.join(destination, "share", "python")
+ platlibdir = os.path.join(destination, sys.lib, "python")
+ check_path(cmd.install_lib, libdir)
+ check_path(cmd.install_platlib, platlibdir)
+diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Lib/site.py Python-3.2.1/Lib/site.py
+--- Python-3.2.1.orig/Lib/site.py 2011-07-15 13:44:25.000000000 +0200
++++ Python-3.2.1/Lib/site.py 2011-07-15 13:45:43.000000000 +0200
+@@ -289,9 +289,8 @@
+ "python" + sys.version[:3],
+ "site-packages"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
+- if sys.lib != 'lib':
+- sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages"))
+- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
++ sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages"))
++ sitepackages.append(os.path.join(prefix, "share", "site-python"))
+ else:
+ sitepackages.append(prefix)
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
+diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Makefile.pre.in Python-3.2.1/Makefile.pre.in
+--- Python-3.2.1.orig/Makefile.pre.in 2011-07-15 13:44:25.000000000 +0200
++++ Python-3.2.1/Makefile.pre.in 2011-07-15 13:45:43.000000000 +0200
+@@ -108,7 +108,7 @@
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ CONFINCLUDEDIR= $(exec_prefix)/include
+-SCRIPTDIR= $(prefix)/$(LIB)
++SCRIPTDIR= $(prefix)/share
+ ABIFLAGS= @ABIFLAGS@
+
+ # Detailed destination directories
+@@ -1046,7 +1046,7 @@
+
+ # Install the library and miscellaneous stuff needed for extending/embedding
+ # This goes into $(exec_prefix)
+-LIBPL= $(LIBDEST)/config-$(LDVERSION)
++LIBPL= $(BINLIBDEST)/config-$(LDVERSION)
+
+ # pkgconfig directory
+ LIBPC= $(LIBDIR)/pkgconfig
+@@ -1065,8 +1065,8 @@
+ if test "$(SO)" = .dll; then \
+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+ else \
+- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
++ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
++ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
+ fi; \
+ else \
+ echo Skip install of $(LIBRARY) - use make frameworkinstall; \
+diff -dur -x '*~' -x '*.orig' -x '*.rej' Python-3.2.1.orig/Modules/getpath.c Python-3.2.1/Modules/getpath.c
+--- Python-3.2.1.orig/Modules/getpath.c 2011-07-15 13:44:25.000000000 +0200
++++ Python-3.2.1/Modules/getpath.c 2011-07-15 13:47:22.000000000 +0200
@@ -131,7 +131,8 @@
#ifndef PYTHONPATH
@@ -10,15 +111,17 @@
#endif
#ifndef LANDMARK
-@@ -143,6 +144,7 @@
+@@ -143,7 +144,8 @@
static wchar_t progpath[MAXPATHLEN+1];
static wchar_t *module_search_path = NULL;
- static wchar_t *lib_python = LIB_PYTHON VERSION;
+ static int module_search_path_malloced = 0;
+-+static wchar_t *lib_python = LIB_PYTHON VERSION;
++static wchar_t *lib_python = LIB_PYTHON VERSION;
+static wchar_t share_python[] = L"share/python" VERSION;
static void
reduce(wchar_t *dir)
-@@ -283,7 +285,7 @@
+@@ -284,7 +286,7 @@
delim = wcschr(prefix, DELIM);
if (delim)
*delim = L'\0';
@@ -27,7 +130,7 @@
joinpath(prefix, LANDMARK);
return 1;
}
-@@ -309,7 +311,7 @@
+@@ -310,7 +312,7 @@
copy_absolute(prefix, argv0_path, MAXPATHLEN+1);
do {
n = wcslen(prefix);
@@ -36,7 +139,7 @@
joinpath(prefix, LANDMARK);
if (ismodule(prefix))
return 1;
-@@ -319,7 +321,7 @@
+@@ -320,7 +322,7 @@
/* Look at configure's PREFIX */
wcsncpy(prefix, _prefix, MAXPATHLEN);
@@ -45,7 +148,7 @@
joinpath(prefix, LANDMARK);
if (ismodule(prefix))
return 1;
-@@ -577,7 +579,7 @@
+@@ -578,7 +580,7 @@
fprintf(stderr,
"Could not find platform independent libraries <prefix>\n");
wcsncpy(prefix, _prefix, MAXPATHLEN);
@@ -54,7 +157,7 @@
}
else
reduce(prefix);
-@@ -590,7 +592,7 @@
+@@ -591,7 +593,7 @@
}
else
wcsncpy(zip_path, _prefix, MAXPATHLEN);
@@ -63,98 +166,3 @@
bufsz = wcslen(zip_path); /* Replace "00" with version */
zip_path[bufsz - 6] = VERSION[0];
zip_path[bufsz - 5] = VERSION[2];
---- Python-3.2/Lib/site.py.orig 2011-04-02 08:25:12.000000000 +0200
-+++ Python-3.2/Lib/site.py 2011-04-02 08:32:32.061730568 +0200
-@@ -289,9 +289,8 @@
- "python" + sys.version[:3],
- "site-packages"))
- sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
-- if sys.lib != 'lib':
-- sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages"))
-- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-+ sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages"))
-+ sitepackages.append(os.path.join(prefix, "share", "site-python"))
- else:
- sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
---- Python-3.0.1/Lib/distutils/sysconfig.py.wiget 2009-02-25 10:58:09.000000000 +0100
-+++ Python-3.0.1/Lib/distutils/sysconfig.py 2009-02-25 10:58:09.000000000 +0100
-@@ -114,12 +114,12 @@ def get_python_lib(plat_specific=0, stan
- prefix = plat_specific and EXEC_PREFIX or PREFIX
-
- if os.name == "posix":
-- if plat_specific:
-- lib = sys.lib
-+ if plat_specific:
-+ libpython = os.path.join(prefix,
-+ sys.lib, "python" + get_python_version())
- else:
-- lib = 'lib'
-- libpython = os.path.join(prefix,
-- lib, "python" + get_python_version())
-+ libpython = os.path.join(prefix,
-+ "share", "python" + get_python_version())
- if standard_lib:
- return libpython
- else:
---- Python-3.2/Lib/distutils/command/install.py.orig 2011-04-02 08:25:12.000000000 +0200
-+++ Python-3.2/Lib/distutils/command/install.py 2011-04-02 08:33:35.957734759 +0200
-@@ -48,14 +48,14 @@
-
- INSTALL_SCHEMES = {
- 'unix_prefix': {
-- 'purelib': '$base/lib/python$py_version_short/site-packages',
-+ 'purelib': '$base/share/python$py_version_short/site-packages',
- 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
- 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
- 'scripts': '$base/bin',
- 'data' : '$base',
- },
- 'unix_home': {
-- 'purelib': '$base/lib/python',
-+ 'purelib': '$base/share/python',
- 'platlib': '$base/'+libname+'/python',
- 'headers': '$base/include/python/$dist_name',
- 'scripts': '$base/bin',
---- Python-3.2/Makefile.pre.in.orig 2011-04-02 08:25:12.000000000 +0200
-+++ Python-3.2/Makefile.pre.in 2011-04-02 08:34:06.809736435 +0200
-@@ -104,7 +104,7 @@
- MANDIR= @mandir@
- INCLUDEDIR= @includedir@
- CONFINCLUDEDIR= $(exec_prefix)/include
--SCRIPTDIR= $(prefix)/$(LIB)
-+SCRIPTDIR= $(prefix)/share
- ABIFLAGS= @ABIFLAGS@
-
- # Detailed destination directories
-@@ -1036,7 +1036,7 @@
-
- # Install the library and miscellaneous stuff needed for extending/embedding
- # This goes into $(exec_prefix)
--LIBPL= $(LIBDEST)/config-$(LDVERSION)
-+LIBPL= $(BINLIBDEST)/config-$(LDVERSION)
-
- # pkgconfig directory
- LIBPC= $(LIBDIR)/pkgconfig
-@@ -1055,8 +1055,8 @@
- if test "$(SO)" = .dll; then \
- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
- else \
-- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
-+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
-+ $(RANLIB) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
- fi; \
- else \
- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
---- Python-3.0.1/Lib/distutils/tests/test_install.py.wig 2009-02-25 11:42:38.000000000 +0100
-+++ Python-3.0.1/Lib/distutils/tests/test_install.py 2009-02-25 11:51:23.000000000 +0100
-@@ -38,7 +38,7 @@ class InstallTestCase(support.TempdirMan
- expected = os.path.normpath(expected)
- self.assertEqual(got, expected)
-
-- libdir = os.path.join(destination, "lib", "python")
-+ libdir = os.path.join(destination, "share", "python")
- platlibdir = os.path.join(destination, sys.lib, "python")
- check_path(cmd.install_lib, libdir)
- check_path(cmd.install_platlib, platlibdir)
================================================================
Index: packages/python3/python3.spec
diff -u packages/python3/python3.spec:1.52 packages/python3/python3.spec:1.53
--- packages/python3/python3.spec:1.52 Tue Jul 12 23:26:45 2011
+++ packages/python3/python3.spec Fri Jul 15 15:11:47 2011
@@ -7,15 +7,18 @@
# Conditional build:
%bcond_with info # info pages (requires emacs)
%bcond_without tkinter # disables tkinter module building
-%bcond_without tests # disables Python testing
+%bcond_with tests # disables Python testing
%bcond_with verbose_tests # runs tests in verbose mode
#
# tests which will not work on 64-bit platforms
%define no64bit_tests test_audioop test_rgbimg test_imageop
# tests which may fail because of builder environment limitations (no /proc or /dev/pts)
%define nobuilder_tests test_resource test_openpty test_socket test_nis test_posix test_locale test_pty
+
# tests which fail because of some unknown/unresolved reason (this list should be empty)
-%define broken_tests test_httpservers test_distutils test_cmd_line test_pydoc test_telnetlib test_zlib
+# test_site: fails because our site.py is patched to include both /usr/share/... and /usr/lib...
+# test_gdb: fails, as the gdb uses old python version
+%define broken_tests test_httpservers test_distutils test_cmd_line test_pydoc test_telnetlib test_zlib test_gdb test_site
%define py_ver 3.2.1
%define py_abi %{py_ver}mu
@@ -46,6 +49,7 @@
Patch2: %{name}-lib64.patch
Patch3: %{name}-noarch_to_datadir.patch
Patch4: %{name}-bug11254.patch
+Patch5: %{name}-no_cmdline_tests.patch
URL: http://www.python.org/
BuildRequires: autoconf >= 2.65
BuildRequires: bluez-libs-devel
@@ -446,6 +450,7 @@
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
%build
%{__autoconf}
@@ -486,7 +491,7 @@
binlibdir=`echo build/lib.*`
%{__make} test \
TESTOPTS="%{test_flags} %{test_list}" \
- TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:$binlibdir ./python -tt"
+ TESTPYTHON="LD_LIBRARY_PATH=`pwd` PYTHONHOME=`pwd` PYTHONPATH=`pwd`/Lib:`pwd`/$binlibdir ./python -tt"
%endif
%install
@@ -911,6 +916,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.53 2011/07/15 13:11:47 jajcus
+- patches updated for Python3.2.1
+- some tests fixed, some tests disable, 'tests' bcond re-enabled
+
Revision 1.52 2011/07/12 21:26:45 wrobell
- ver. 3.2.1 (nfy)
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/python3/python3-bug11254.patch?r1=1.1&r2=1.2&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/python3/python3-noarch_to_datadir.patch?r1=1.5&r2=1.6&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/python3/python3.spec?r1=1.52&r2=1.53&f=u
More information about the pld-cvs-commit
mailing list