Updated to 3.4.1

This commit is contained in:
Denis Silakov 2014-06-22 19:45:41 +04:00
parent 653c588704
commit 9f2027e950
16 changed files with 395 additions and 489 deletions

View file

@ -3,10 +3,12 @@ removed_sources:
Python-3.3.1.tar.xz: 393d7302c48bc911cd7faa7fa9b5fbcb9919bddc
Python-3.3.2.tar.xz: 87009d0c156c6e1354dfec5c98c328cae93950ad
Python-3.3.3.tar.xz: af4e75a34bd538c79b9871227c2e7f56569ac107
Python-3.3.4.tar.xz: 2c9586eeb4b6e45e9ebc28372c0856c709d9a522
python-3.3.0-docs-html.tar.bz2: 5299b1523ede931767199a5b13388a5bf35351d5
python-3.3.1-docs-html.tar.bz2: 55c3b3f3453346835b0df2b3b0ad7fe20833a7f7
python-3.3.2-docs-html.tar.bz2: 514e1a0810fa9e6433f4bc64bdc0ad407d49ebc5
python-3.3.3-docs-html.tar.bz2: bcd1f17d3d32f59288eda50aa6432135394b5ab5
sources:
Python-3.3.4.tar.xz: 2c9586eeb4b6e45e9ebc28372c0856c709d9a522
Python-3.4.1.tar.xz: 143e098efe7ee7bec8a4904ec4b322f28a067a03
python-3.3.4-docs-html.tar.bz2: 6d54aa11f2aa51339c09358d4a10217ee905dae3
python-3.4.0-docs-html.tar.bz2: d6e8f45219353b128f002f3a7311ec4e08c0ca49

View file

@ -0,0 +1,12 @@
--- Python-3.4.1/Lib/test/test_gdb.py.153~ 2014-06-12 16:33:44.342930073 +0200
+++ Python-3.4.1/Lib/test/test_gdb.py 2014-06-12 16:36:53.556564577 +0200
@@ -182,6 +182,9 @@ class DebuggerTests(unittest.TestCase):
# Issue #19753: missing symbols on System Z
'Missing separate debuginfo for ',
'Try: zypper install -C ',
+ 'warning: Unable to open',
+ 'Try: urpmi.update --ignore ',
+ 'Undefined set print command'
)
for line in errlines:
if not line.startswith(ignore_patterns):

View file

@ -0,0 +1,51 @@
--- Python-3.4.1/Lib/test/test_gdb.py.p156~ 2014-06-12 16:38:31.472340461 +0200
+++ Python-3.4.1/Lib/test/test_gdb.py 2014-06-12 16:40:45.333666965 +0200
@@ -86,6 +86,19 @@ def gdb_has_frame_select():
HAS_PYUP_PYDOWN = gdb_has_frame_select()
+def gdb_has_autoload_safepath():
+ # Recent GDBs will only auto-load scripts from certain safe
+ # locations, so we will need to turn off this protection.
+ # However, if the GDB doesn't have it, then the following
+ # command will generate noise on stderr (rhbz#817072):
+ cmd = "--eval-command=set auto-load safe-path /"
+ p = subprocess.Popen(["gdb", "--batch", cmd],
+ stderr=subprocess.PIPE)
+ _, stderr = p.communicate()
+ return b'"on" or "off" expected.' not in stderr
+
+HAS_AUTOLOAD_SAFEPATH = gdb_has_autoload_safepath()
+
BREAKPOINT_FN='builtin_id'
class DebuggerTests(unittest.TestCase):
@@ -122,15 +135,28 @@ class DebuggerTests(unittest.TestCase):
commands = ['set breakpoint pending yes',
'break %s' % breakpoint,
'run']
+
+ if HAS_AUTOLOAD_SAFEPATH:
+ # Recent GDBs will only auto-load scripts from certain safe
+ # locations.
+ # Where necessary, turn off this protection to ensure that
+ # our -gdb.py script can be loaded - but not on earlier gdb builds
+ # as this would generate noise on stderr (rhbz#817072):
+ init_commands = ['set auto-load safe-path /']
+ else:
+ init_commands = []
+
if cmds_after_breakpoint:
commands += cmds_after_breakpoint
else:
commands += ['backtrace']
+ # print init_commands
# print commands
# Use "commands" to generate the arguments with which to invoke "gdb":
args = ["gdb", "--batch"]
+ args += ['--init-eval-command=%s' % cmd for cmd in init_commands]
args += ['--eval-command=%s' % cmd for cmd in commands]
args += ["--args",
sys.executable]

View file

@ -0,0 +1,13 @@
diff -up Python-3.3.0/Lib/test/suppor/__init__.py.rhbz913732 Python-3.3.0/Lib/test/support/__init__.py
--- Python-3.3.0/Lib/test/support/__init__.py.rhbz913732 2013-03-04 16:25:53.885258476 -0500
+++ Python-3.3.0/Lib/test/support/__init__.py 2013-03-04 16:25:58.499258157 -0500
@@ -570,6 +570,7 @@
raise TestFailed("tests should never set the SO_REUSEADDR " \
"socket option on TCP/IP sockets!")
- if hasattr(socket, 'SO_REUSEPORT'):
+ if hasattr(socket, 'SO_REUSEPORT') \
+ and 'WITHIN_PYTHON_RPM_BUILD' not in os.environ: # rhbz#913732
try:
if sock.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT) == 1:
raise TestFailed("tests should never set the SO_REUSEPORT " \
diff -up Python-3.3.0/Lib/test/test_support.py.rhbz913732 Python-3.3.0/Lib/test/test_support.py

View file

@ -0,0 +1,48 @@
--- a/Tools/gdb/libpython.py 2013-04-06 03:41:58.000000000 -0400
+++ b/Tools/gdb/libpython.py 2013-04-24 03:51:04.720540343 -0400
@@ -274,6 +274,9 @@
self.tp_name = tp_name
self.address = address
+ def __len__(self):
+ return len(repr(self))
+
def __repr__(self):
# For the NULL pointer, we have no way of knowing a type, so
# special-case it as per
@@ -881,6 +884,8 @@
filename = self.filename()
try:
f = open(os_fsencode(filename), 'r')
+ except TypeError: # filename is FakeRepr
+ return None
except IOError:
return None
with f:
@@ -1523,9 +1528,12 @@
def print_summary(self):
if self.is_evalframeex():
- pyop = self.get_pyop()
- if pyop:
+ try:
+ pyop = self.get_pyop()
line = pyop.get_truncated_repr(MAX_OUTPUT_LEN)
+ except:
+ pyop = None
+ if pyop:
write_unicode(sys.stdout, '#%i %s\n' % (self.get_index(), line))
if not pyop.is_optimized_out():
line = pyop.current_line()
@@ -1542,7 +1550,10 @@
def print_traceback(self):
if self.is_evalframeex():
- pyop = self.get_pyop()
+ try:
+ pyop = self.get_pyop()
+ except:
+ pyop = None
if pyop:
pyop.print_traceback()
if not pyop.is_optimized_out():

View file

@ -0,0 +1,14 @@
--- Python-3.4.1/setup.py.omv~ 2014-06-12 17:30:45.911154584 +0200
+++ Python-3.4.1/setup.py 2014-06-12 17:31:29.622608116 +0200
@@ -1249,9 +1249,9 @@ class PyBuildExt(build_ext):
if (host_platform not in ['cygwin', 'qnx6'] and
find_file('rpcsvc/yp_prot.h', inc_dirs, []) is not None):
if (self.compiler.find_library_file(lib_dirs, 'nsl')):
- libs = ['nsl']
+ libs = ['nsl','tirpc']
else:
- libs = []
+ libs = ['tirpc']
exts.append( Extension('nis', ['nismodule.c'],
libraries = libs) )
else:

View file

@ -0,0 +1,11 @@
--- Python-3.4.1/setup.py.omv~ 2014-06-12 16:47:09.873859551 +0200
+++ Python-3.4.1/setup.py 2014-06-12 16:47:34.373553262 +0200
@@ -625,7 +625,7 @@ class PyBuildExt(build_ext):
missing.append('spwd')
# select(2); not on ancient System V
- exts.append( Extension('select', ['selectmodule.c']) )
+ exts.append( Extension('select', ['selectmodule.c'], libraries=['m']) )
# Fred Drake's interface to the Python parser
exts.append( Extension('parser', ['parsermodule.c']) )

12
pybytecompile.macros Normal file
View file

@ -0,0 +1,12 @@
# Note that the path could itself be a python file, or a directory
# Python's compile_all module only works on directories, and requires a max
# recursion depth
%py_byte_compile()\
python_binary="%1"\
bytecode_compilation_path="%2"\
find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$RPM_BUILD_ROOT")[2]) for f in sys.argv[1:]]' || :\
\
find $bytecode_compilation_path -type f -a -name "*.py" -print0 | xargs -0 $python_binary -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition("$RPM_BUILD_ROOT")[2]) for f in sys.argv[1:]]' || :\
%{nil}

View file

@ -1,17 +0,0 @@
--- Python-3.3.0/Lib/distutils/sysconfig.py 2012-09-29 12:00:28.000000000 +0400
+++ Python-3.3.0-1/Lib/distutils/sysconfig.py 2013-03-28 17:53:13.945246411 +0400
@@ -107,7 +107,13 @@
incdir = os.path.join(get_config_var('srcdir'), 'Include')
return os.path.normpath(incdir)
python_dir = 'python' + get_python_version() + build_flags
- return os.path.join(prefix, "include", python_dir)
+ multiarch = ''
+ if plat_specific:
+ arch = os.uname()[4]
+ if arch.endswith('86'):
+ arch = 'i386'
+ multiarch = 'multiarch-%s-%s' % (arch, sys.platform)
+ return os.path.join(prefix, "include", multiarch, python_dir)
elif os.name == "nt":
return os.path.join(prefix, "include")
elif os.name == "os2":

View file

@ -1,48 +0,0 @@
--- Python-3.3.0/Modules/Setup.dist.bero 2013-01-17 14:45:54.954074760 +0100
+++ Python-3.3.0/Modules/Setup.dist 2013-01-17 14:47:07.021245768 +0100
@@ -166,14 +166,14 @@ _symtable symtablemodule.c
#cmath cmathmodule.c _math.c # -lm # complex math library functions
#math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
#_struct _struct.c # binary structure packing/unpacking
-#time timemodule.c # -lm # time operations and variables
+time timemodule.c -lm # time operations and variables
#_weakref _weakref.c # basic weak reference support
#_testcapi _testcapimodule.c # Python C API test module
#_random _randommodule.c # Random number generator
#atexit atexitmodule.c # Register functions to be run at interpreter-shutdown
#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator
#_pickle _pickle.c # pickle accelerator
-#_datetime _datetimemodule.c # datetime accelerator
+_datetime _datetimemodule.c -lm # datetime accelerator
#_bisect _bisectmodule.c # Bisection algorithms
#_heapq _heapqmodule.c # Heap queue algorithm
@@ -216,7 +216,7 @@ _symtable symtablemodule.c
# Some more UNIX dependent modules -- off by default, since these
# are not supported by all UNIX systems:
-#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
+nis nismodule.c -ltirpc -lnsl # Sun yellow pages -- not everywhere
#termios termios.c # Steen Lumholt's termios module
#resource resource.c # Jeremy Hylton's rlimit interface
--- Python-3.3.0/setup.py.bero 2013-01-17 14:48:25.702340762 +0100
+++ Python-3.3.0/setup.py 2013-01-17 14:49:32.040577716 +0100
@@ -1901,7 +1901,7 @@ class PyBuildExt(build_ext):
undef_macros = []
if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
include_dirs = []
- libraries = ['mpdec']
+ libraries = ['mpdec', 'm']
sources = ['_decimal/_decimal.c']
depends = ['_decimal/docstrings.h']
else:
@@ -1910,7 +1910,7 @@ class PyBuildExt(build_ext):
'Modules',
'_decimal',
'libmpdec'))]
- libraries = []
+ libraries = ['m']
sources = [
'_decimal/_decimal.c',
'_decimal/libmpdec/basearith.c',

View file

@ -0,0 +1,13 @@
Index: Python-3.3.0b1/Lib/test/test_posix.py
===================================================================
--- Python-3.3.0b1.orig/Lib/test/test_posix.py 2012-06-26 22:19:48.000000000 +0200
+++ Python-3.3.0b1/Lib/test/test_posix.py 2012-08-03 14:06:26.000000000 +0200
@@ -231,7 +231,7 @@
def test_posix_fadvise(self):
fd = os.open(support.TESTFN, os.O_RDONLY)
try:
- posix.posix_fadvise(fd, 0, 0, posix.POSIX_FADV_WILLNEED)
+ posix.posix_fadvise(fd, 0, 0, posix.POSIX_FADV_RANDOM)
finally:
os.close(fd)

View file

@ -1,238 +0,0 @@
diff -Naur Python-3.3.3.orig/Lib/test/test_urllibnet.py Python-3.3.3/Lib/test/test_urllibnet.py
--- Python-3.3.3.orig/Lib/test/test_urllibnet.py 2014-01-16 05:23:06.563537167 -0500
+++ Python-3.3.3/Lib/test/test_urllibnet.py 2014-01-16 05:23:12.598537003 -0500
@@ -121,6 +121,10 @@
# fail with EAI_SYSTEM and ETIMEDOUT (seen on Ubuntu 13.04),
# i.e. Python's TimeoutError.
pass
+ except TimeoutError:
+ # Happens in chroots with bogus setups and "secured" build
+ # environments that just drop all traffic
+ self.skipTest("test_bad_address skipped due to timeout")
else:
# This happens with some overzealous DNS providers such as OpenDNS
self.skipTest("%r should not resolve for test to work" % bogus_domain)
diff -Naur Python-3.3.3.orig/Lib/test/test_urllibnet.py.orig Python-3.3.3/Lib/test/test_urllibnet.py.orig
--- Python-3.3.3.orig/Lib/test/test_urllibnet.py.orig 1969-12-31 19:00:00.000000000 -0500
+++ Python-3.3.3/Lib/test/test_urllibnet.py.orig 2013-11-17 02:22:49.000000000 -0500
@@ -0,0 +1,220 @@
+#!/usr/bin/env python3
+
+import unittest
+from test import support
+
+import contextlib
+import socket
+import urllib.request
+import sys
+import os
+import email.message
+import time
+
+
+class URLTimeoutTest(unittest.TestCase):
+ # XXX this test doesn't seem to test anything useful.
+
+ TIMEOUT = 30.0
+
+ def setUp(self):
+ socket.setdefaulttimeout(self.TIMEOUT)
+
+ def tearDown(self):
+ socket.setdefaulttimeout(None)
+
+ def testURLread(self):
+ with support.transient_internet("www.python.org"):
+ f = urllib.request.urlopen("http://www.python.org/")
+ x = f.read()
+
+
+class urlopenNetworkTests(unittest.TestCase):
+ """Tests urllib.reqest.urlopen using the network.
+
+ These tests are not exhaustive. Assuming that testing using files does a
+ good job overall of some of the basic interface features. There are no
+ tests exercising the optional 'data' and 'proxies' arguments. No tests
+ for transparent redirection have been written.
+
+ setUp is not used for always constructing a connection to
+ http://www.python.org/ since there a few tests that don't use that address
+ and making a connection is expensive enough to warrant minimizing unneeded
+ connections.
+
+ """
+
+ @contextlib.contextmanager
+ def urlopen(self, *args, **kwargs):
+ resource = args[0]
+ with support.transient_internet(resource):
+ r = urllib.request.urlopen(*args, **kwargs)
+ try:
+ yield r
+ finally:
+ r.close()
+
+ def test_basic(self):
+ # Simple test expected to pass.
+ with self.urlopen("http://www.python.org/") as open_url:
+ for attr in ("read", "readline", "readlines", "fileno", "close",
+ "info", "geturl"):
+ self.assertTrue(hasattr(open_url, attr), "object returned from "
+ "urlopen lacks the %s attribute" % attr)
+ self.assertTrue(open_url.read(), "calling 'read' failed")
+
+ def test_readlines(self):
+ # Test both readline and readlines.
+ with self.urlopen("http://www.python.org/") as open_url:
+ self.assertIsInstance(open_url.readline(), bytes,
+ "readline did not return a string")
+ self.assertIsInstance(open_url.readlines(), list,
+ "readlines did not return a list")
+
+ def test_info(self):
+ # Test 'info'.
+ with self.urlopen("http://www.python.org/") as open_url:
+ info_obj = open_url.info()
+ self.assertIsInstance(info_obj, email.message.Message,
+ "object returned by 'info' is not an "
+ "instance of email.message.Message")
+ self.assertEqual(info_obj.get_content_subtype(), "html")
+
+ def test_geturl(self):
+ # Make sure same URL as opened is returned by geturl.
+ URL = "http://www.python.org/"
+ with self.urlopen(URL) as open_url:
+ gotten_url = open_url.geturl()
+ self.assertEqual(gotten_url, URL)
+
+ def test_getcode(self):
+ # test getcode() with the fancy opener to get 404 error codes
+ URL = "http://www.python.org/XXXinvalidXXX"
+ with support.transient_internet(URL):
+ open_url = urllib.request.FancyURLopener().open(URL)
+ try:
+ code = open_url.getcode()
+ finally:
+ open_url.close()
+ self.assertEqual(code, 404)
+
+ def test_fileno(self):
+ if sys.platform in ('win32',):
+ # On Windows, socket handles are not file descriptors; this
+ # test can't pass on Windows.
+ return
+ # Make sure fd returned by fileno is valid.
+ with self.urlopen("http://www.python.org/", timeout=None) as open_url:
+ fd = open_url.fileno()
+ with os.fdopen(fd, encoding='utf-8') as f:
+ self.assertTrue(f.read(), "reading from file created using fd "
+ "returned by fileno failed")
+
+ def test_bad_address(self):
+ # Make sure proper exception is raised when connecting to a bogus
+ # address.
+ bogus_domain = "sadflkjsasf.i.nvali.d"
+ try:
+ socket.gethostbyname(bogus_domain)
+ except OSError:
+ # socket.gaierror is too narrow, since getaddrinfo() may also
+ # fail with EAI_SYSTEM and ETIMEDOUT (seen on Ubuntu 13.04),
+ # i.e. Python's TimeoutError.
+ pass
+ else:
+ # This happens with some overzealous DNS providers such as OpenDNS
+ self.skipTest("%r should not resolve for test to work" % bogus_domain)
+ self.assertRaises(IOError,
+ # SF patch 809915: In Sep 2003, VeriSign started
+ # highjacking invalid .com and .net addresses to
+ # boost traffic to their own site. This test
+ # started failing then. One hopes the .invalid
+ # domain will be spared to serve its defined
+ # purpose.
+ # urllib.urlopen, "http://www.sadflkjsasadf.com/")
+ urllib.request.urlopen,
+ "http://sadflkjsasf.i.nvali.d/")
+
+
+class urlretrieveNetworkTests(unittest.TestCase):
+ """Tests urllib.request.urlretrieve using the network."""
+
+ @contextlib.contextmanager
+ def urlretrieve(self, *args, **kwargs):
+ resource = args[0]
+ with support.transient_internet(resource):
+ file_location, info = urllib.request.urlretrieve(*args, **kwargs)
+ try:
+ yield file_location, info
+ finally:
+ support.unlink(file_location)
+
+ def test_basic(self):
+ # Test basic functionality.
+ with self.urlretrieve("http://www.python.org/") as (file_location, info):
+ self.assertTrue(os.path.exists(file_location), "file location returned by"
+ " urlretrieve is not a valid path")
+ with open(file_location, encoding='utf-8') as f:
+ self.assertTrue(f.read(), "reading from the file location returned"
+ " by urlretrieve failed")
+
+ def test_specified_path(self):
+ # Make sure that specifying the location of the file to write to works.
+ with self.urlretrieve("http://www.python.org/",
+ support.TESTFN) as (file_location, info):
+ self.assertEqual(file_location, support.TESTFN)
+ self.assertTrue(os.path.exists(file_location))
+ with open(file_location, encoding='utf-8') as f:
+ self.assertTrue(f.read(), "reading from temporary file failed")
+
+ def test_header(self):
+ # Make sure header returned as 2nd value from urlretrieve is good.
+ with self.urlretrieve("http://www.python.org/") as (file_location, info):
+ self.assertIsInstance(info, email.message.Message,
+ "info is not an instance of email.message.Message")
+
+ logo = "http://www.python.org/community/logos/python-logo-master-v3-TM.png"
+
+ def test_data_header(self):
+ with self.urlretrieve(self.logo) as (file_location, fileheaders):
+ datevalue = fileheaders.get('Date')
+ dateformat = '%a, %d %b %Y %H:%M:%S GMT'
+ try:
+ time.strptime(datevalue, dateformat)
+ except ValueError:
+ self.fail('Date value not in %r format', dateformat)
+
+ def test_reporthook(self):
+ records = []
+ def recording_reporthook(blocks, block_size, total_size):
+ records.append((blocks, block_size, total_size))
+
+ with self.urlretrieve(self.logo, reporthook=recording_reporthook) as (
+ file_location, fileheaders):
+ expected_size = int(fileheaders['Content-Length'])
+
+ records_repr = repr(records) # For use in error messages.
+ self.assertGreater(len(records), 1, msg="There should always be two "
+ "calls; the first one before the transfer starts.")
+ self.assertEqual(records[0][0], 0)
+ self.assertGreater(records[0][1], 0,
+ msg="block size can't be 0 in %s" % records_repr)
+ self.assertEqual(records[0][2], expected_size)
+ self.assertEqual(records[-1][2], expected_size)
+
+ block_sizes = {block_size for _, block_size, _ in records}
+ self.assertEqual({records[0][1]}, block_sizes,
+ msg="block sizes in %s must be equal" % records_repr)
+ self.assertGreaterEqual(records[-1][0]*records[0][1], expected_size,
+ msg="number of blocks * block size must be"
+ " >= total size in %s" % records_repr)
+
+
+def test_main():
+ support.requires('network')
+ support.run_unittest(URLTimeoutTest,
+ urlopenNetworkTests,
+ urlretrieveNetworkTests)
+
+if __name__ == "__main__":
+ test_main()

View file

@ -1,93 +1,90 @@
--- Python-3.3.0/Makefile.pre.in.lib64 2012-09-29 16:00:41.000000000 +0800
+++ Python-3.3.0/Makefile.pre.in 2012-09-30 00:08:10.000000000 +0800
@@ -108,7 +108,7 @@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
-SCRIPTDIR= $(prefix)/lib
+SCRIPTDIR= $(prefix)/lib64
ABIFLAGS= @ABIFLAGS@
--- Python-3.4.1/Lib/distutils/command/install.py.lib64 2014-05-19 07:19:37.000000000 +0200
+++ Python-3.4.1/Lib/distutils/command/install.py 2014-06-12 16:30:38.864248876 +0200
@@ -45,14 +45,14 @@ else:
INSTALL_SCHEMES = {
'unix_prefix': {
'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
+ 'platlib': '$platbase/lib64/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',
- 'platlib': '$base/lib/python',
+ 'platlib': '$base/lib64/python',
'headers': '$base/include/python/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
--- Python-3.4.1/Lib/distutils/sysconfig.py.lib64 2014-05-19 07:19:38.000000000 +0200
+++ Python-3.4.1/Lib/distutils/sysconfig.py 2014-06-12 16:30:38.864248876 +0200
@@ -141,8 +141,12 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
# Detailed destination directories
--- Python-3.3.0/setup.py.lib64 2012-09-30 00:08:10.000000000 +0800
+++ Python-3.3.0/setup.py 2012-09-30 00:11:11.000000000 +0800
@@ -395,7 +395,7 @@
if multiarch_path_component != '':
add_dir_to_list(self.compiler.library_dirs,
- '/usr/lib/' + multiarch_path_component)
+ '/usr/lib64/' + multiarch_path_component)
add_dir_to_list(self.compiler.include_dirs,
'/usr/include/' + multiarch_path_component)
return
@@ -729,11 +729,11 @@
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
- ['/usr/lib/termcap'],
+ ['/usr/lib64/termcap'],
'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
+ library_dirs=['/usr/lib64/termcap'],
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
if os.name == "posix":
+ if plat_specific or standard_lib:
+ lib = "lib64"
+ else:
+ lib = "lib"
libpython = os.path.join(prefix,
- "lib", "python" + get_python_version())
+ lib, "python" + get_python_version())
if standard_lib:
return libpython
else:
@@ -770,8 +770,8 @@
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
- ['/usr/local/ssl/lib',
- '/usr/contrib/ssl/lib/'
+ ['/usr/local/ssl/lib64',
+ '/usr/contrib/ssl/lib64/'
] )
--- Python-3.4.1/Lib/site.py.lib64 2014-06-12 16:30:38.864248876 +0200
+++ Python-3.4.1/Lib/site.py 2014-06-12 16:32:54.348555089 +0200
@@ -304,12 +304,16 @@ def getsitepackages(prefixes=None):
seen.add(prefix)
if (ssl_incs is not None and
--- Python-3.3.0/Modules/getpath.c.lib64 2012-09-29 16:00:45.000000000 +0800
+++ Python-3.3.0/Modules/getpath.c 2012-09-30 00:08:10.000000000 +0800
@@ -122,8 +122,8 @@
#endif
if os.sep == '/':
+ sitepackages.append(os.path.join(prefix, "lib64",
+ "python" + sys.version[:3],
+ "site-packages"))
sitepackages.append(os.path.join(prefix, "lib",
"python" + sys.version[:3],
"site-packages"))
sitepackages.append(os.path.join(prefix, "lib", "site-python"))
else:
sitepackages.append(prefix)
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
--- Python-3.4.1/Lib/sysconfig.py.lib64 2014-05-19 07:19:38.000000000 +0200
+++ Python-3.4.1/Lib/sysconfig.py 2014-06-12 16:30:38.865248863 +0200
@@ -20,10 +20,10 @@ __all__ = [
#ifndef PYTHONPATH
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
+ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
#endif
#ifndef LANDMARK
@@ -135,7 +135,7 @@
static wchar_t progpath[MAXPATHLEN+1];
static wchar_t *module_search_path = NULL;
static int module_search_path_malloced = 0;
-static wchar_t *lib_python = L"lib/python" VERSION;
+static wchar_t *lib_python = L"lib64/python" VERSION;
static void
reduce(wchar_t *dir)
@@ -677,7 +677,7 @@
}
else
wcsncpy(zip_path, _prefix, MAXPATHLEN);
- joinpath(zip_path, L"lib/python00.zip");
+ joinpath(zip_path, L"lib64/python00.zip");
bufsz = wcslen(zip_path); /* Replace "00" with version */
zip_path[bufsz - 6] = VERSION[0];
zip_path[bufsz - 5] = VERSION[2];
@@ -687,7 +687,7 @@
fprintf(stderr,
"Could not find platform dependent libraries <exec_prefix>\n");
wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
- joinpath(exec_prefix, L"lib/lib-dynload");
+ joinpath(exec_prefix, L"lib64/lib-dynload");
}
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
--- Python-3.3.0/Lib/test/test_site.py.lib64 2012-09-29 16:00:38.000000000 +0800
+++ Python-3.3.0/Lib/test/test_site.py 2012-09-30 00:08:10.000000000 +0800
@@ -239,12 +239,15 @@
_INSTALL_SCHEMES = {
'posix_prefix': {
- 'stdlib': '{installed_base}/lib/python{py_version_short}',
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+ 'stdlib': '{installed_base}/lib64/python{py_version_short}',
+ 'platstdlib': '{platbase}/lib64/python{py_version_short}',
'purelib': '{base}/lib/python{py_version_short}/site-packages',
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
'include':
'{installed_base}/include/python{py_version_short}{abiflags}',
'platinclude':
@@ -61,10 +61,10 @@ _INSTALL_SCHEMES = {
'data': '{userbase}',
},
'posix_user': {
- 'stdlib': '{userbase}/lib/python{py_version_short}',
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+ 'stdlib': '{userbase}/lib64/python{py_version_short}',
+ 'platstdlib': '{userbase}/lib64/python{py_version_short}',
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data': '{userbase}',
--- Python-3.4.1/Lib/test/test_site.py.lib64 2014-05-19 07:19:38.000000000 +0200
+++ Python-3.4.1/Lib/test/test_site.py 2014-06-12 16:30:38.864248876 +0200
@@ -243,12 +243,15 @@ class HelperFunctionsTests(unittest.Test
self.assertEqual(dirs[2], wanted)
elif os.sep == '/':
# OS X non-framwework builds, Linux, FreeBSD, etc
@ -106,87 +103,90 @@
else:
# other platforms
self.assertEqual(len(dirs), 2)
--- Python-3.3.0/Lib/site.py.lib64 2012-09-29 16:00:31.000000000 +0800
+++ Python-3.3.0/Lib/site.py 2012-09-30 00:08:10.000000000 +0800
@@ -303,12 +303,16 @@
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == '/':
+ sitepackages.append(os.path.join(prefix, "lib64",
+ "python" + sys.version[:3],
+ "site-packages"))
sitepackages.append(os.path.join(prefix, "lib",
"python" + sys.version[:3],
"site-packages"))
sitepackages.append(os.path.join(prefix, "lib", "site-python"))
else:
sitepackages.append(prefix)
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
--- Python-3.3.0/Lib/distutils/command/install.py.lib64 2012-09-29 16:00:27.000000000 +0800
+++ Python-3.3.0/Lib/distutils/command/install.py 2012-09-30 00:08:10.000000000 +0800
@@ -45,14 +45,14 @@
INSTALL_SCHEMES = {
'unix_prefix': {
'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
+ 'platlib': '$platbase/lib64/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',
- 'platlib': '$base/lib/python',
+ 'platlib': '$base/lib64/python',
'headers': '$base/include/python/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
--- Python-3.3.0/Lib/distutils/sysconfig.py.lib64 2012-09-29 16:00:28.000000000 +0800
+++ Python-3.3.0/Lib/distutils/sysconfig.py 2012-09-30 00:08:10.000000000 +0800
@@ -139,8 +139,12 @@
prefix = plat_specific and EXEC_PREFIX or PREFIX
--- Python-3.4.1/Makefile.pre.in.lib64 2014-05-19 07:19:39.000000000 +0200
+++ Python-3.4.1/Makefile.pre.in 2014-06-12 16:30:38.864248876 +0200
@@ -115,7 +115,7 @@ LIBDIR= @libdir@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
-SCRIPTDIR= $(prefix)/lib
+SCRIPTDIR= $(prefix)/lib64
ABIFLAGS= @ABIFLAGS@
if os.name == "posix":
+ if plat_specific or standard_lib:
+ lib = "lib64"
+ else:
+ lib = "lib"
libpython = os.path.join(prefix,
- "lib", "python" + get_python_version())
+ lib, "python" + get_python_version())
if standard_lib:
return libpython
else:
--- Python-3.3.0/Lib/sysconfig.py.lib64 2012-09-29 16:00:31.000000000 +0800
+++ Python-3.3.0/Lib/sysconfig.py 2012-09-30 00:09:50.000000000 +0800
@@ -21,10 +21,10 @@
# Detailed destination directories
--- Python-3.4.1/Modules/getpath.c.lib64 2014-05-19 07:19:39.000000000 +0200
+++ Python-3.4.1/Modules/getpath.c 2014-06-12 16:31:35.644539024 +0200
@@ -118,8 +118,8 @@
#endif
_INSTALL_SCHEMES = {
'posix_prefix': {
- 'stdlib': '{installed_base}/lib/python{py_version_short}',
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+ 'stdlib': '{installed_base}/lib64/python{py_version_short}',
+ 'platstdlib': '{platbase}/lib64/python{py_version_short}',
'purelib': '{base}/lib/python{py_version_short}/site-packages',
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
'include':
'{installed_base}/include/python{py_version_short}{abiflags}',
'platinclude':
@@ -81,10 +81,10 @@
'data': '{userbase}',
},
'posix_user': {
- 'stdlib': '{userbase}/lib/python{py_version_short}',
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+ 'stdlib': '{userbase}/lib64/python{py_version_short}',
+ 'platstdlib': '{userbase}/lib64/python{py_version_short}',
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data': '{userbase}',
#ifndef PYTHONPATH
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
+ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
#endif
#ifndef LANDMARK
@@ -494,7 +494,7 @@ calculate_path(void)
_pythonpath = _Py_char2wchar(PYTHONPATH, NULL);
_prefix = _Py_char2wchar(PREFIX, NULL);
_exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL);
- lib_python = _Py_char2wchar("lib/python" VERSION, NULL);
+ lib_python = _Py_char2wchar("lib64/python" VERSION, NULL);
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
Py_FatalError(
@@ -683,7 +683,7 @@ calculate_path(void)
}
else
wcsncpy(zip_path, _prefix, MAXPATHLEN);
- joinpath(zip_path, L"lib/python00.zip");
+ joinpath(zip_path, L"lib64/python00.zip");
bufsz = wcslen(zip_path); /* Replace "00" with version */
zip_path[bufsz - 6] = VERSION[0];
zip_path[bufsz - 5] = VERSION[2];
@@ -695,7 +695,7 @@ calculate_path(void)
fprintf(stderr,
"Could not find platform dependent libraries <exec_prefix>\n");
wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
- joinpath(exec_prefix, L"lib/lib-dynload");
+ joinpath(exec_prefix, L"lib64/lib-dynload");
}
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
--- Python-3.4.1/setup.py.lib64 2014-06-12 16:30:38.863248888 +0200
+++ Python-3.4.1/setup.py 2014-06-12 16:30:38.864248876 +0200
@@ -381,7 +381,7 @@ class PyBuildExt(build_ext):
if multiarch_path_component != '':
add_dir_to_list(self.compiler.library_dirs,
- '/usr/lib/' + multiarch_path_component)
+ '/usr/lib64/' + multiarch_path_component)
add_dir_to_list(self.compiler.include_dirs,
'/usr/include/' + multiarch_path_component)
return
@@ -722,11 +722,11 @@ class PyBuildExt(build_ext):
elif curses_library:
readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs +
- ['/usr/lib/termcap'],
+ ['/usr/lib64/termcap'],
'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
+ library_dirs=['/usr/lib64/termcap'],
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
@@ -763,8 +763,8 @@ class PyBuildExt(build_ext):
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
- ['/usr/local/ssl/lib',
- '/usr/contrib/ssl/lib/'
+ ['/usr/local/ssl/lib64',
+ '/usr/contrib/ssl/lib64/'
] )
if (ssl_incs is not None and

View file

@ -8,3 +8,4 @@
%py3_platsitedir %python3_sitearch
%py3_puresitedir %python3_sitelib
%py3_incdir %(%{__python3} -c 'from distutils.sysconfig import get_python_inc; print(get_python_inc())' 2>/dev/null || echo PYTHON-INCLUDEDIR-NOT-FOUND)
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}

View file

@ -4,4 +4,4 @@ addFilter("E: non-executable-script")
# Not an actual problem, the packager tag is added by the build system anyway
addFilter("E: no-packager-tag")
addFilter("E: devel-file-in-non-devel-package")

View file

@ -1,5 +1,5 @@
%define docver 3.3.4
%define dirver 3.3
%define docver 3.4.0
%define dirver 3.4
%define familyver 3
%define lib_major %{dirver}
@ -14,7 +14,7 @@
%endif
Summary: An interpreted, interactive object-oriented programming language
Name: python3
Version: 3.3.4
Version: 3.4.1
Release: 1
License: Modified CNRI Open Source License
Group: Development/Python
@ -22,16 +22,25 @@ Group: Development/Python
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
Source1: http://www.python.org/ftp/python/doc/%{docver}/python-%{docver}-docs-html.tar.bz2
Source2: python3.macros
Source3: pybytecompile.macros
Source100: %{name}.rpmlintrc
#Source4: python-mode-1.0.tar.bz2
Source5: bdist_rpm5.py
Patch0: python-3.3.0-module-linkage.patch
Patch1: python3-3.3.0-fdr-lib64.patch
Patch2: python3-3.2.3-fdr-lib64-fix-for-test_install.patch
#Patch3: python-3.3.0-module-dependencies.patch
Patch4: python-3.3.3-fix-urllibnet-test.patch
Patch5: python-3.3.0-distutils-multiarch.patch
Patch3: Python-select-requires-libm.patch
Patch4: python-3.3.0b1-test-posix_fadvise.patch
Patch5: Python-nis-requires-tirpc.patch
Patch153: 00153-fix-test_gdb-noise.patch
Patch156: 00156-gdb-autoload-safepath.patch
# 00173 #
# Workaround for ENOPROTOOPT seen in bs within
# test.test_support.bind_port()
# from Fedora (rhbz#913732)
Patch173: 00173-workaround-ENOPROTOOPT-in-bind_port.patch
Patch179: 00179-dont-raise-error-on-gdb-corrupted-frames-in-backtrace.patch
URL: http://www.python.org/
Conflicts: tkinter3 < %{version}
@ -148,16 +157,19 @@ Various applications written using tkinter
%prep
%setup -qn Python-%{version}
%patch0 -p0 -b .link
%patch5 -p1
%patch0 -p0 -b .link~
%if "%{_lib}" == "lib64"
%patch1 -p1 -b .lib64
%patch2 -p1
%patch1 -p1 -b .lib64~
%patch2 -p1 -b .p2~
%endif
#patch3 -p1 -b .modlink~
%patch4 -p1 -b .urllibtest~
%patch3 -p1 -b .lm~
%patch4 -p1 -b .p4~
%patch5 -p1 -b .tirpc~
%patch153 -p1 -b .p153~
%patch156 -p1 -b .p156~
%patch173 -p1 -b .p173~
%patch179 -p1 -b .p179~
# docs
mkdir html
@ -341,6 +353,7 @@ install -m644 %{SOURCE5} -D %{buildroot}%{_libdir}/python%{dirver}/distutils/com
%{_includedir}/python*/pyconfig.h
%{multiarch_includedir}/python*/pyconfig.h
%dir %{_libdir}/python*/config-*
%{_libdir}/python*/config*/Makefile
%exclude %{_libdir}/python*/site-packages/pynche
%exclude %{_libdir}/python*/lib-dynload/_tkinter.*.so
@ -350,6 +363,7 @@ install -m644 %{SOURCE5} -D %{buildroot}%{_libdir}/python%{dirver}/distutils/com
%{_libdir}/python*/LICENSE.txt
%{_libdir}/python%{dirver}/*.py
%{_libdir}/python%{dirver}/__pycache__
%{_libdir}/python%{dirver}/asyncio
%{_libdir}/python%{dirver}/collections
%{_libdir}/python%{dirver}/concurrent
%{_libdir}/python%{dirver}/ctypes
@ -358,6 +372,7 @@ install -m644 %{SOURCE5} -D %{buildroot}%{_libdir}/python%{dirver}/distutils/com
%{_libdir}/python%{dirver}/distutils
%{_libdir}/python%{dirver}/email
%{_libdir}/python%{dirver}/encodings
%{_libdir}/python%{dirver}/ensurepip
%{_libdir}/python%{dirver}/html
%{_libdir}/python%{dirver}/http
%{_libdir}/python%{dirver}/importlib
@ -379,8 +394,8 @@ install -m644 %{SOURCE5} -D %{buildroot}%{_libdir}/python%{dirver}/distutils/com
%{_libdir}/python%{dirver}/xmlrpc
%{_bindir}/pydoc3*
%{_bindir}/python3*
%_bindir/pyvenv
%_bindir/pyvenv-%dirver
%{_bindir}/pyvenv
%{_bindir}/pyvenv-%{dirver}
%{_bindir}/2to3-%{dirver}
%exclude %{_bindir}/python*config
#%{_datadir}/emacs/site-lisp/*
@ -388,6 +403,23 @@ install -m644 %{SOURCE5} -D %{buildroot}%{_libdir}/python%{dirver}/distutils/com
%if %{with valgrind}
%{_libdir}/valgrind/valgrind-python3.supp
%endif
# pip bits
%if "%{_libdir}" != "%{_prefix}/lib"
# In the %{_libdir} == %{_prefix}/lib case, those are caught by
# globs above.
%dir %{_prefix}/lib/python%{dirver}
%dir %{_prefix}/lib/python%{dirver}/site-packages
%{_prefix}/lib/python%{dirver}/site-packages/__pycache__
%{_prefix}/lib/python%{dirver}/site-packages/pkg_resources.py
%{_prefix}/lib/python%{dirver}/site-packages/easy_install.py
%{_prefix}/lib/python%{dirver}/site-packages/pip
%{_prefix}/lib/python%{dirver}/site-packages/setuptools*
%{_prefix}/lib/python%{dirver}/site-packages/_markerlib
%{_prefix}/lib/python%{dirver}/site-packages/pip-*.dist-info
%endif
%{_bindir}/easy_install-%{dirver}
%{_bindir}/pip3
%{_bindir}/pip%{dirver}
%files -n %{lib_name}
%{_libdir}/libpython*.so.1*