Skip to content

Commit

Permalink
Merge pull request xbmc#10041 from wsnipex/bump-python
Browse files Browse the repository at this point in the history
[depends] bump python to 2.7.12
  • Loading branch information
MartijnKaijser authored Jun 30, 2016
2 parents 94df86f + 9acef2c commit 179658c
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 53 deletions.
2 changes: 1 addition & 1 deletion tools/depends/native/python27-native/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DEPS= ../../Makefile.include.in Makefile

# lib name, version
LIBNAME=Python
VERSION=2.7.11
VERSION=2.7.12
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.xz
CWD=$(shell pwd)
Expand Down
6 changes: 3 additions & 3 deletions tools/depends/target/python27/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
include ../../Makefile.include
DEPS= ../../Makefile.include Makefile Python-2.7.10-crosscompile.patch Python-2.7.10-android.patch Python-no-export-path.patch \
DEPS= ../../Makefile.include Makefile Python-2.7.12-crosscompile.patch Python-2.7.10-android.patch Python-no-export-path.patch \
Python-setup.patch fix-datetime.patch Python-2.6.5-urllib.diff modules.setup make-fork-optional.patch

# lib name, version
LIBNAME=Python
VERSION=2.7.11
VERSION=2.7.12
SOURCE=$(LIBNAME)-$(VERSION)
ARCHIVE=$(SOURCE).tar.xz

Expand Down Expand Up @@ -33,7 +33,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
echo $(NATIVEPREFIX)
rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE)
cd $(PLATFORM); patch -p0 < ../Python-2.7.10-crosscompile.patch
cd $(PLATFORM); patch -p1 < ../Python-2.7.12-crosscompile.patch
cd $(PLATFORM); patch -p0 < ../Python-setup.patch
cd $(PLATFORM); patch -p0 < ../fix-datetime.patch
cd $(PLATFORM); patch -p0 < ../Python-2.7.10-android.patch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
--- Makefile.pre.in.orig 2015-05-23 18:09:16.000000000 +0200
+++ Makefile.pre.in 2015-10-10 12:29:21.988926069 +0200
@@ -238,6 +238,7 @@
index dffc0b9..efc79ab 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -246,6 +246,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
+PGEN_FOR_BUILD=$(NATIVE_PGEN)

PSRCS= \
Parser/acceler.c \
@@ -497,9 +498,9 @@
@@ -544,9 +545,9 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
*\ -s*|s*) quiet="-q";; \
*) quiet="";; \
esac; \
Expand All @@ -20,16 +21,7 @@

# Build static library
# avoid long command lines, same as LIBRARY_OBJS
@@ -636,7 +637,7 @@
$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
@$(MKDIR_P) Include
$(MAKE) $(PGEN)
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
$(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
$(MAKE) $(GRAMMAR_H)
touch $(GRAMMAR_C)
@@ -1072,12 +1073,12 @@
@@ -1132,12 +1133,12 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
fi
Expand All @@ -44,7 +36,7 @@
$(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
@@ -1205,11 +1206,13 @@
@@ -1265,11 +1266,13 @@ libainstall: all python-config
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
Expand All @@ -61,9 +53,31 @@
-rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py*

# Here are a couple of targets for MacOSX again, to install a full
--- setup.py.orig 2015-05-23 18:09:25.000000000 +0200
+++ setup.py 2015-10-10 12:29:22.000925764 +0200
@@ -17,7 +17,7 @@
diff --git a/configure.ac b/configure.ac
index 06c877b..de26012 100644
--- a/configure.ac
+++ b/configure.ac
@@ -326,7 +326,6 @@ then
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
- AC_MSG_ERROR([cross build not supported for $host])
esac
ac_sys_release=
else
@@ -372,7 +371,6 @@ if test "$cross_compiling" = yes; then
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
- AC_MSG_ERROR([cross build not supported for $host])
esac
_PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
fi
diff --git a/setup.py b/Python-2.7.12/setup.py
index aa08ada..f21e349 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ from distutils.command.install import install
from distutils.command.install_lib import install_lib
from distutils.spawn import find_executable

Expand All @@ -72,15 +86,15 @@

def get_platform():
# cross build
@@ -162,6 +162,7 @@
@@ -178,6 +178,7 @@ class PyBuildExt(build_ext):

def build_extensions(self):

+ return
# Detect which modules should be compiled
missing = self.detect_modules()

@@ -326,6 +327,9 @@
@@ -342,6 +343,9 @@ class PyBuildExt(build_ext):

# Don't try to load extensions for cross builds
if cross_compiling:
Expand All @@ -90,7 +104,7 @@
return

try:
@@ -480,7 +484,7 @@
@@ -496,7 +500,7 @@ class PyBuildExt(build_ext):
for directory in reversed(options.dirs):
add_dir_to_list(dir_list, directory)

Expand All @@ -99,7 +113,7 @@
and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
# OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
# (PYTHONFRAMEWORK is set) to avoid # linking problems when
@@ -556,6 +560,11 @@
@@ -572,6 +576,11 @@ class PyBuildExt(build_ext):
if host_platform in ['darwin', 'beos']:
math_libs = []

Expand All @@ -111,7 +125,7 @@
# XXX Omitted modules: gl, pure, dl, SGI-specific modules

#
@@ -2028,8 +2037,13 @@
@@ -2048,8 +2057,13 @@ class PyBuildExt(build_ext):

# Pass empty CFLAGS because we'll just append the resulting
# CFLAGS to Python's; -g or -O2 is to be avoided.
Expand All @@ -127,21 +141,3 @@

res = os.system(cmd)
if res or not os.path.exists(ffi_configfile):
--- configure.ac.orig 2015-10-10 13:10:34.139980182 +0200
+++ configure.ac 2015-10-10 13:11:00.715341145 +0200
@@ -325,7 +325,6 @@
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
- AC_MSG_ERROR([cross build not supported for $host])
esac
ac_sys_release=
else
@@ -371,7 +370,6 @@
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
- AC_MSG_ERROR([cross build not supported for $host])
esac
_PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
fi
2 changes: 1 addition & 1 deletion tools/depends/target/python27/Python-no-export-path.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- Makefile.pre.in.orig 2015-10-09 19:10:15.042905069 +0200
+++ Makefile.pre.in 2015-10-09 19:11:01.513642241 +0200
@@ -1100,8 +1100,6 @@
@@ -1160,8 +1160,6 @@
$(srcdir)/Lib/$(PLATDIR):
mkdir $(srcdir)/Lib/$(PLATDIR)
cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
Expand Down
4 changes: 2 additions & 2 deletions tools/depends/target/python27/Python-setup.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- setup.py.orig 2015-10-07 16:32:16.219083585 +0200
+++ setup.py 2015-10-07 16:41:48.563085871 +0200
@@ -321,6 +321,9 @@
@@ -337,6 +337,9 @@
self.announce('WARNING: skipping import check for Cygwin-based "%s"'
% ext.name)
return
Expand All @@ -10,7 +10,7 @@
ext_filename = os.path.join(
self.build_lib,
self.get_ext_filename(self.get_ext_fullname(ext.name)))
@@ -335,27 +338,30 @@
@@ -351,27 +354,30 @@
try:
imp.load_dynamic(ext.name, ext_filename)
except ImportError, why:
Expand Down
10 changes: 5 additions & 5 deletions tools/depends/target/python27/fix-ffi.patch
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
--- Modules/_ctypes/malloc_closure.c.orig 2015-10-11 20:37:30.534378131 +0200
+++ Modules/_ctypes/malloc_closure.c 2015-10-11 20:38:57.322381368 +0200
@@ -93,6 +93,7 @@
@@ -89,6 +89,7 @@
/******************************************************************/

/* put the item back into the free list */
+/*
void ffi_closure_free(void *p)
{
ITEM *item = (ITEM *)p;
@@ -100,7 +101,6 @@
@@ -96,7 +97,6 @@
free_list = item;
}

-/* return one item from the free list, allocating more if needed */
void *ffi_closure_alloc(size_t ignored, void** codeloc)
{
ITEM *item;
@@ -113,3 +113,4 @@
@@ -109,3 +109,4 @@
*codeloc = (void *)item;
return (void *)item;
}
+*/
--- Modules/_ctypes/cfield.c.orig 2015-10-11 20:34:03.034370393 +0200
+++ Modules/_ctypes/cfield.c 2015-10-11 20:37:04.462377159 +0200
@@ -1724,6 +1724,7 @@
@@ -1725,6 +1725,7 @@
*/

/* align and size are bogus for void, but they must not be zero */
+/*
ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID };

ffi_type ffi_type_uint8 = { 1, 1, FFI_TYPE_UINT8 };
@@ -1740,14 +1741,14 @@
@@ -1741,14 +1742,14 @@

ffi_type ffi_type_float = { sizeof(float), FLOAT_ALIGN, FFI_TYPE_FLOAT };
ffi_type ffi_type_double = { sizeof(double), DOUBLE_ALIGN, FFI_TYPE_DOUBLE };
Expand Down

0 comments on commit 179658c

Please sign in to comment.