python27: new package, python 2.7.9
This commit is contained in:
12
python27/src/python-2.7.9-mmap-fcntl_h.patch
Normal file
12
python27/src/python-2.7.9-mmap-fcntl_h.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
--- Python-2.7.9/Modules/mmapmodule.c.fnctl 2014-12-10 16:59:55.000000000 +0100
|
||||
+++ Python-2.7.9/Modules/mmapmodule.c 2015-03-21 12:20:50.544882000 +0100
|
||||
@@ -23,9 +23,7 @@
|
||||
|
||||
#ifndef MS_WINDOWS
|
||||
#define UNIX
|
||||
-# ifdef __APPLE__
|
||||
# include <fcntl.h>
|
||||
-# endif
|
||||
#endif
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
@@ -0,0 +1,34 @@
|
||||
Patch based on http://bugs.python.org/issue6645
|
||||
|
||||
--- Python-2.7.9/Lib/multiprocessing/process.py.nourandom 2014-12-10 16:59:39.000000000 +0100
|
||||
+++ Python-2.7.9/Lib/multiprocessing/process.py 2015-04-20 08:20:38.663871000 +0200
|
||||
@@ -306,7 +306,12 @@
|
||||
self._popen = None
|
||||
self._counter = itertools.count(1)
|
||||
self._children = set()
|
||||
- self._authkey = AuthenticationString(os.urandom(32))
|
||||
+ try:
|
||||
+ self._authkey = AuthenticationString(os.urandom(32))
|
||||
+ except:
|
||||
+ import random
|
||||
+ bytes = [chr(random.randrange(256)) for i in range(32)]
|
||||
+ self._authkey = AuthenticationString(bytes)
|
||||
self._tempdir = None
|
||||
|
||||
_current_process = _MainProcess()
|
||||
--- Python-2.7.9/Lib/multiprocessing/connection.py.nourandom 2014-12-10 16:59:39.000000000 +0100
|
||||
+++ Python-2.7.9/Lib/multiprocessing/connection.py 2015-04-20 08:21:05.113976000 +0200
|
||||
@@ -412,7 +412,12 @@
|
||||
def deliver_challenge(connection, authkey):
|
||||
import hmac
|
||||
assert isinstance(authkey, bytes)
|
||||
- message = os.urandom(MESSAGE_LENGTH)
|
||||
+ try:
|
||||
+ message = os.urandom(MESSAGE_LENGTH)
|
||||
+ except:
|
||||
+ import random
|
||||
+ bytes = [chr(random.randrange(256)) for i in range(MESSAGE_LENGTH)]
|
||||
+ self._authkey = AuthenticationString(bytes)
|
||||
connection.send_bytes(CHALLENGE + message)
|
||||
digest = hmac.new(authkey, message).digest()
|
||||
response = connection.recv_bytes(256) # reject large message
|
||||
16
python27/src/python-2.7.9-tgcware.patch
Normal file
16
python27/src/python-2.7.9-tgcware.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
--- Python-2.7.9/setup.py.tgcware 2014-12-10 17:00:01.000000000 +0100
|
||||
+++ Python-2.7.9/setup.py 2015-03-21 13:24:40.240267000 +0100
|
||||
@@ -438,10 +438,10 @@
|
||||
os.unlink(tmpfile)
|
||||
|
||||
def detect_modules(self):
|
||||
- # Ensure that /usr/local is always used
|
||||
+ # Ensure that /usr/tgcware is always used
|
||||
if not cross_compiling:
|
||||
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+ add_dir_to_list(self.compiler.library_dirs, '/usr/tgcware/lib')
|
||||
+ add_dir_to_list(self.compiler.include_dirs, '/usr/tgcware/include')
|
||||
if cross_compiling:
|
||||
self.add_gcc_paths()
|
||||
self.add_multiarch_paths()
|
||||
Reference in New Issue
Block a user