python: upgrade to version 3.4.1
Some notes: - Python 3 (at least version 3.4) is pretty cross-compiler-friendly, so a lot of patches were thrown away. - Arguments below were moved to ./files/config.site file, and disabled ac_cv_have_chflags=no \ ac_cv_have_lchflags=no \ ac_cv_py_format_size_t=no \ ac_cv_have_long_long_format=yes \ ac_cv_buggy_getaddrinfo=no \ - --without-ensurepip added, because the build wants to ensure that it works; that's a good idea, but for now, it requires special setup, and we can do that later - --without-pymalloc added, becase in Python 3, modules are suffixed with m; e.g. so some paths are python3.4m instead of python3.4 all this is detailed here: http://legacy.python.org/dev/peps/pep-3149/ Maybe it will be a good idea to re-add this back Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
parent
da85f0770a
commit
7bf1ae65a8
14 changed files with 68 additions and 434 deletions
|
@ -7,13 +7,16 @@
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
# The file included below defines PYTHON_VERSION
|
||||||
|
-include $(if $(DUMP),,./files/python-package.mk)
|
||||||
|
|
||||||
PKG_NAME:=python
|
PKG_NAME:=python
|
||||||
PKG_VERSION:=2.7.3
|
PKG_RELEASE:=1
|
||||||
PKG_RELEASE:=2
|
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
|
||||||
|
|
||||||
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)
|
PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)
|
||||||
PKG_MD5SUM:=62c4c1699170078c469f79ddfed21bc0
|
PKG_MD5SUM:=6cafc183b4106476dd73d5738d7f616a
|
||||||
|
|
||||||
PKG_LICENSE:=PSF
|
PKG_LICENSE:=PSF
|
||||||
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
|
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
|
||||||
|
@ -29,7 +32,6 @@ PKG_BUILD_DEPENDS:=python/host
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/host-build.mk
|
include $(INCLUDE_DIR)/host-build.mk
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
-include $(if $(DUMP),,./files/python-package.mk)
|
|
||||||
|
|
||||||
define Package/python/Default
|
define Package/python/Default
|
||||||
SUBMENU:=Python
|
SUBMENU:=Python
|
||||||
|
@ -139,34 +141,47 @@ MAKE_FLAGS:=\
|
||||||
CROSS_COMPILE=yes \
|
CROSS_COMPILE=yes \
|
||||||
CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \
|
CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \
|
||||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||||
LD="$(TARGET_CC)" \
|
LD="$(TARGET_CC)"
|
||||||
HOSTPYTHON=./hostpython \
|
|
||||||
HOSTPGEN=./hostpgen
|
|
||||||
|
|
||||||
ENABLE_IPV6:=
|
ENABLE_IPV6:=
|
||||||
ifeq ($(CONFIG_IPV6),y)
|
ifeq ($(CONFIG_IPV6),y)
|
||||||
ENABLE_IPV6 += --enable-ipv6
|
ENABLE_IPV6 += --enable-ipv6
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
#=======================================================================
|
||||||
|
# Notes: adding these so that I don't forget, and can track why stuff
|
||||||
|
# was did as was did
|
||||||
|
# - Arguments below were moved to ./files/config.site file, and disabled
|
||||||
|
# ac_cv_have_chflags=no \
|
||||||
|
# ac_cv_have_lchflags=no \
|
||||||
|
# ac_cv_py_format_size_t=no \
|
||||||
|
# ac_cv_have_long_long_format=yes \
|
||||||
|
# ac_cv_buggy_getaddrinfo=no \
|
||||||
|
# - --without-ensurepip added, because the build wants to ensure that
|
||||||
|
# it works; that's a good idea, but for now, it requires special
|
||||||
|
# setup, and we can do that later
|
||||||
|
# - --without-pymalloc added, becase in Python 3, modules are suffixed
|
||||||
|
# with m; e.g. so some paths are python3.4m instead of python3.4
|
||||||
|
# all this is detailed here:
|
||||||
|
# http://legacy.python.org/dev/peps/pep-3149/
|
||||||
|
#=======================================================================
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
-$(MAKE) -C $(PKG_BUILD_DIR) distclean
|
-$(MAKE) -C $(PKG_BUILD_DIR) distclean
|
||||||
(cd $(PKG_BUILD_DIR); autoreconf --force --install || exit 0)
|
(cd $(PKG_BUILD_DIR); autoreconf --force --install || exit 0)
|
||||||
# The python executable needs to stay in the rootdir since its location will
|
# The python executable needs to stay in the rootdir since its location will
|
||||||
# be used to compute the path of the config files.
|
# be used to compute the path of the config files.
|
||||||
$(CP) $(STAGING_DIR_HOST)/bin/pgen $(PKG_BUILD_DIR)/hostpgen
|
$(CP) ./files/config.site $(PKG_BUILD_DIR)
|
||||||
$(CP) $(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION) $(PKG_BUILD_DIR)/hostpython
|
|
||||||
$(call Build/Configure/Default, \
|
$(call Build/Configure/Default, \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
--without-cxx-main \
|
--without-cxx-main \
|
||||||
--with-threads \
|
--with-threads \
|
||||||
--with-system-ffi="$(STAGING_DIR)/usr" \
|
--with-system-ffi="$(STAGING_DIR)/usr" \
|
||||||
|
--without-ensurepip \
|
||||||
|
--without-pymalloc \
|
||||||
$(ENABLE_IPV6) \
|
$(ENABLE_IPV6) \
|
||||||
ac_cv_have_chflags=no \
|
CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
|
||||||
ac_cv_have_lchflags=no \
|
|
||||||
ac_cv_py_format_size_t=no \
|
|
||||||
ac_cv_have_long_long_format=yes \
|
|
||||||
ac_cv_buggy_getaddrinfo=no \
|
|
||||||
OPT="$(TARGET_CFLAGS)" \
|
OPT="$(TARGET_CFLAGS)" \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
@ -183,16 +198,9 @@ define Build/InstallDev
|
||||||
$(PKG_BUILD_DIR)/libpython$(PYTHON_VERSION).a \
|
$(PKG_BUILD_DIR)/libpython$(PYTHON_VERSION).a \
|
||||||
$(1)/usr/lib/
|
$(1)/usr/lib/
|
||||||
$(CP) \
|
$(CP) \
|
||||||
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
|
$(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config-$(PYTHON_VERSION) \
|
||||||
$(1)/usr/lib/python$(PYTHON_VERSION)/
|
$(1)/usr/lib/python$(PYTHON_VERSION)/
|
||||||
|
|
||||||
$(CP) \
|
|
||||||
$(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION) \
|
|
||||||
$(1)/usr/bin/hostpython
|
|
||||||
(cd $(2)/bin; \
|
|
||||||
ln -sf ../../usr/bin/hostpython python$(PYTHON_VERSION); \
|
|
||||||
ln -sf python$(PYTHON_VERSION) python)
|
|
||||||
|
|
||||||
$(CP) \
|
$(CP) \
|
||||||
$(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION)-config \
|
$(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION)-config \
|
||||||
$(2)/bin/
|
$(2)/bin/
|
||||||
|
@ -461,7 +469,12 @@ define Host/Configure
|
||||||
rm -rf config.cache; \
|
rm -rf config.cache; \
|
||||||
CONFIG_SITE= \
|
CONFIG_SITE= \
|
||||||
OPT="$(HOST_CFLAGS)" \
|
OPT="$(HOST_CFLAGS)" \
|
||||||
./configure --without-cxx-main --with-threads --prefix=$(STAGING_DIR_HOST); \
|
./configure \
|
||||||
|
--without-cxx-main \
|
||||||
|
--without-ensurepip \
|
||||||
|
--without-pymalloc \
|
||||||
|
--with-threads \
|
||||||
|
--prefix=$(STAGING_DIR_HOST); \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -469,14 +482,12 @@ define Host/Compile
|
||||||
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
|
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
|
||||||
python Parser/pgen
|
python Parser/pgen
|
||||||
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
|
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
|
||||||
HOSTPYTHON=$(HOST_BUILD_DIR)/python \
|
|
||||||
sharedmods
|
sharedmods
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Host/Install
|
define Host/Install
|
||||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
|
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
|
||||||
$(MAKE) -C $(HOST_BUILD_DIR) \
|
$(MAKE) -C $(HOST_BUILD_DIR) \
|
||||||
HOSTPYTHON=$(HOST_BUILD_DIR)/python \
|
|
||||||
install
|
install
|
||||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/
|
$(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/
|
||||||
endef
|
endef
|
||||||
|
|
18
lang/python/files/config.site
Normal file
18
lang/python/files/config.site
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2007-2014 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
ac_cv_file__dev_ptmx=yes
|
||||||
|
ac_cv_file__dev_ptc=no
|
||||||
|
|
||||||
|
# FIXME: moved from Makefile here
|
||||||
|
#ac_cv_have_chflags=no \
|
||||||
|
#ac_cv_have_lchflags=no \
|
||||||
|
#ac_cv_py_format_size_t=no \
|
||||||
|
#ac_cv_have_long_long_format=yes \
|
||||||
|
#ac_cv_buggy_getaddrinfo=no \
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
#
|
#
|
||||||
|
|
||||||
PYTHON_VERSION=2.7
|
PYTHON_VERSION=3.4
|
||||||
|
PYTHON_VERSION_MICRO=1
|
||||||
|
|
||||||
PYTHON_DIR:=$(STAGING_DIR)/usr
|
PYTHON_DIR:=$(STAGING_DIR)/usr
|
||||||
PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
|
PYTHON_BIN_DIR:=$(PYTHON_DIR)/bin
|
||||||
|
|
|
@ -1,112 +0,0 @@
|
||||||
---
|
|
||||||
Makefile.pre.in | 25 +++++++++++++------------
|
|
||||||
1 file changed, 13 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
--- a/Makefile.pre.in
|
|
||||||
+++ b/Makefile.pre.in
|
|
||||||
@@ -182,6 +182,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
|
|
||||||
|
|
||||||
PYTHON= python$(EXE)
|
|
||||||
BUILDPYTHON= python$(BUILDEXE)
|
|
||||||
+HOSTPYTHON= $(BUILDPYTHON)
|
|
||||||
|
|
||||||
# The task to run while instrument when building the profile-opt target
|
|
||||||
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
|
|
||||||
@@ -214,6 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
|
|
||||||
##########################################################################
|
|
||||||
# Parser
|
|
||||||
PGEN= Parser/pgen$(EXE)
|
|
||||||
+HOSTPGEN= $(PGEN)$(EXE)
|
|
||||||
|
|
||||||
POBJS= \
|
|
||||||
Parser/acceler.o \
|
|
||||||
@@ -384,7 +386,7 @@ build_all_generate_profile:
|
|
||||||
$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
|
|
||||||
|
|
||||||
run_profile_task:
|
|
||||||
- ./$(BUILDPYTHON) $(PROFILE_TASK)
|
|
||||||
+ $(HOSTPYTHON) $(PROFILE_TASK)
|
|
||||||
|
|
||||||
build_all_use_profile:
|
|
||||||
$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
|
|
||||||
@@ -402,14 +404,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
|
|
||||||
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
|
||||||
|
|
||||||
platform: $(BUILDPYTHON)
|
|
||||||
- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
|
|
||||||
+ $(RUNSHARED) $(HOSTPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
|
|
||||||
|
|
||||||
|
|
||||||
# Build the shared modules
|
|
||||||
sharedmods: $(BUILDPYTHON)
|
|
||||||
@case $$MAKEFLAGS in \
|
|
||||||
- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
|
|
||||||
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
|
||||||
+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
|
|
||||||
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Build static library
|
|
||||||
@@ -543,7 +545,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
|
|
||||||
$(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
|
|
||||||
Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
|
|
||||||
-@$(INSTALL) -d Include
|
|
||||||
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
|
||||||
+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
|
||||||
-touch Parser/pgen.stamp
|
|
||||||
|
|
||||||
$(PGEN): $(PGENOBJS)
|
|
||||||
@@ -708,7 +710,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
|
|
||||||
|
|
||||||
TESTOPTS= -l $(EXTRATESTOPTS)
|
|
||||||
TESTPROG= $(srcdir)/Lib/test/regrtest.py
|
|
||||||
-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
|
|
||||||
+TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
|
|
||||||
test: all platform
|
|
||||||
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
|
||||||
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
|
|
||||||
@@ -1062,7 +1064,7 @@ libainstall: all python-config
|
|
||||||
# Install the dynamically loadable modules
|
|
||||||
# This goes into $(exec_prefix)
|
|
||||||
sharedinstall: sharedmods
|
|
||||||
- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
|
|
||||||
+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
|
|
||||||
--prefix=$(prefix) \
|
|
||||||
--install-scripts=$(BINDIR) \
|
|
||||||
--install-platlib=$(DESTSHARED) \
|
|
||||||
@@ -1100,7 +1102,7 @@ frameworkinstallstructure: $(LDLIBRARY)
|
|
||||||
fi; \
|
|
||||||
done
|
|
||||||
$(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
|
|
||||||
- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
|
|
||||||
+ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
|
|
||||||
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
|
|
||||||
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
|
|
||||||
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
|
|
||||||
@@ -1135,7 +1137,7 @@ frameworkinstallextras:
|
|
||||||
# This installs a few of the useful scripts in Tools/scripts
|
|
||||||
scriptsinstall:
|
|
||||||
SRCDIR=$(srcdir) $(RUNSHARED) \
|
|
||||||
- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
|
|
||||||
+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/setup.py install \
|
|
||||||
--prefix=$(prefix) \
|
|
||||||
--install-scripts=$(BINDIR) \
|
|
||||||
--root=$(DESTDIR)/
|
|
||||||
@@ -1157,7 +1159,7 @@ config.status: $(srcdir)/configure
|
|
||||||
|
|
||||||
# Run reindent on the library
|
|
||||||
reindent:
|
|
||||||
- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
|
|
||||||
+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
|
|
||||||
|
|
||||||
# Rerun configure with the same options as it was run last time,
|
|
||||||
# provided the config.status script exists
|
|
||||||
@@ -1260,7 +1262,7 @@ funny:
|
|
||||||
|
|
||||||
# Perform some verification checks on any modified files.
|
|
||||||
patchcheck:
|
|
||||||
- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
|
|
||||||
+ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
---
|
|
||||||
Makefile.pre.in | 16 ----------------
|
|
||||||
1 file changed, 16 deletions(-)
|
|
||||||
|
|
||||||
--- a/Makefile.pre.in
|
|
||||||
+++ b/Makefile.pre.in
|
|
||||||
@@ -940,26 +940,6 @@ libinstall: build_all $(srcdir)/Lib/$(PL
|
|
||||||
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
|
|
||||||
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
|
|
||||||
fi
|
|
||||||
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
||||||
- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
||||||
- -d $(LIBDEST) -f \
|
|
||||||
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
|
||||||
- $(DESTDIR)$(LIBDEST)
|
|
||||||
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
||||||
- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
||||||
- -d $(LIBDEST) -f \
|
|
||||||
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
|
||||||
- $(DESTDIR)$(LIBDEST)
|
|
||||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
||||||
- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
||||||
- -d $(LIBDEST)/site-packages -f \
|
|
||||||
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
|
||||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
||||||
- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
||||||
- -d $(LIBDEST)/site-packages -f \
|
|
||||||
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
|
||||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
||||||
- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
|
|
||||||
|
|
||||||
# Create the PLATDIR source directory, if one wasn't distributed..
|
|
||||||
$(srcdir)/Lib/$(PLATDIR):
|
|
|
@ -1,50 +0,0 @@
|
||||||
---
|
|
||||||
setup.py | 15 ++-------------
|
|
||||||
1 file changed, 2 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -368,11 +368,6 @@ class PyBuildExt(build_ext):
|
|
||||||
os.unlink(tmpfile)
|
|
||||||
|
|
||||||
def detect_modules(self):
|
|
||||||
- # Ensure that /usr/local is always used
|
|
||||||
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
|
||||||
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
|
||||||
- self.add_multiarch_paths()
|
|
||||||
-
|
|
||||||
# Add paths specified in the environment variables LDFLAGS and
|
|
||||||
# CPPFLAGS for header and library files.
|
|
||||||
# We must get the values from the Makefile and not the environment
|
|
||||||
@@ -407,17 +402,6 @@ class PyBuildExt(build_ext):
|
|
||||||
for directory in reversed(options.dirs):
|
|
||||||
add_dir_to_list(dir_list, directory)
|
|
||||||
|
|
||||||
- if os.path.normpath(sys.prefix) != '/usr' \
|
|
||||||
- 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
|
|
||||||
- # building a framework with different architectures than
|
|
||||||
- # the one that is currently installed (issue #7473)
|
|
||||||
- add_dir_to_list(self.compiler.library_dirs,
|
|
||||||
- sysconfig.get_config_var("LIBDIR"))
|
|
||||||
- add_dir_to_list(self.compiler.include_dirs,
|
|
||||||
- sysconfig.get_config_var("INCLUDEDIR"))
|
|
||||||
-
|
|
||||||
try:
|
|
||||||
have_unicode = unicode
|
|
||||||
except NameError:
|
|
||||||
@@ -426,11 +410,8 @@ class PyBuildExt(build_ext):
|
|
||||||
# lib_dirs and inc_dirs are used to search for files;
|
|
||||||
# if a file is found in one of those directories, it can
|
|
||||||
# be assumed that no additional -I,-L directives are needed.
|
|
||||||
- lib_dirs = self.compiler.library_dirs + [
|
|
||||||
- '/lib64', '/usr/lib64',
|
|
||||||
- '/lib', '/usr/lib',
|
|
||||||
- ]
|
|
||||||
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
|
|
||||||
+ lib_dirs = self.compiler.library_dirs
|
|
||||||
+ inc_dirs = self.compiler.include_dirs
|
|
||||||
exts = []
|
|
||||||
missing = []
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
---
|
|
||||||
setup.py | 30 ------------------------------
|
|
||||||
1 file changed, 30 deletions(-)
|
|
||||||
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -307,36 +307,6 @@ class PyBuildExt(build_ext):
|
|
||||||
ext_filename = os.path.join(
|
|
||||||
self.build_lib,
|
|
||||||
self.get_ext_filename(self.get_ext_fullname(ext.name)))
|
|
||||||
- try:
|
|
||||||
- imp.load_dynamic(ext.name, ext_filename)
|
|
||||||
- except ImportError, why:
|
|
||||||
- self.failed.append(ext.name)
|
|
||||||
- self.announce('*** WARNING: renaming "%s" since importing it'
|
|
||||||
- ' failed: %s' % (ext.name, why), level=3)
|
|
||||||
- assert not self.inplace
|
|
||||||
- basename, tail = os.path.splitext(ext_filename)
|
|
||||||
- newname = basename + "_failed" + tail
|
|
||||||
- if os.path.exists(newname):
|
|
||||||
- os.remove(newname)
|
|
||||||
- os.rename(ext_filename, newname)
|
|
||||||
-
|
|
||||||
- # XXX -- This relies on a Vile HACK in
|
|
||||||
- # distutils.command.build_ext.build_extension(). The
|
|
||||||
- # _built_objects attribute is stored there strictly for
|
|
||||||
- # use here.
|
|
||||||
- # If there is a failure, _built_objects may not be there,
|
|
||||||
- # so catch the AttributeError and move on.
|
|
||||||
- try:
|
|
||||||
- for filename in self._built_objects:
|
|
||||||
- os.remove(filename)
|
|
||||||
- except AttributeError:
|
|
||||||
- self.announce('unable to remove files (ignored)')
|
|
||||||
- except:
|
|
||||||
- exc_type, why, tb = sys.exc_info()
|
|
||||||
- self.announce('*** WARNING: importing extension "%s" '
|
|
||||||
- 'failed with %s: %s' % (ext.name, exc_type, why),
|
|
||||||
- level=3)
|
|
||||||
- self.failed.append(ext.name)
|
|
||||||
|
|
||||||
def get_platform(self):
|
|
||||||
# Get value of sys.platform
|
|
|
@ -1,23 +0,0 @@
|
||||||
---
|
|
||||||
Makefile.pre.in | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
--- a/Makefile.pre.in
|
|
||||||
+++ b/Makefile.pre.in
|
|
||||||
@@ -1169,12 +1169,12 @@ TAGS::
|
|
||||||
# Sanitation targets -- clean leaves libraries, executables and tags
|
|
||||||
# files, which clobber removes as well
|
|
||||||
pycremoval:
|
|
||||||
- find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'
|
|
||||||
+ find $(srcdir) ! -path './ipkg-install/*' -name '*.py[co]' -exec rm -f {} ';'
|
|
||||||
|
|
||||||
clean: pycremoval
|
|
||||||
- find . -name '*.[oa]' -exec rm -f {} ';'
|
|
||||||
- find . -name '*.s[ol]' -exec rm -f {} ';'
|
|
||||||
- find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
|
|
||||||
+ find . ! -path './ipkg-install/*' -name '*.[oa]' -exec rm -f {} ';'
|
|
||||||
+ find . ! -path './ipkg-install/*' -name '*.s[ol]' -exec rm -f {} ';'
|
|
||||||
+ find . ! -path './ipkg-install/*' -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
|
|
||||||
find build -name 'fficonfig.h' -exec rm -f {} ';' || true
|
|
||||||
find build -name 'fficonfig.py' -exec rm -f {} ';' || true
|
|
||||||
-rm -f Lib/lib2to3/*Grammar*.pickle
|
|
|
@ -1,63 +0,0 @@
|
||||||
---
|
|
||||||
Lib/distutils/command/build_scripts.py | 43 +++------------------------------
|
|
||||||
1 file changed, 4 insertions(+), 39 deletions(-)
|
|
||||||
|
|
||||||
--- a/Lib/distutils/command/build_scripts.py
|
|
||||||
+++ b/Lib/distutils/command/build_scripts.py
|
|
||||||
@@ -51,10 +51,7 @@ class build_scripts (Command):
|
|
||||||
|
|
||||||
|
|
||||||
def copy_scripts (self):
|
|
||||||
- """Copy each script listed in 'self.scripts'; if it's marked as a
|
|
||||||
- Python script in the Unix way (first line matches 'first_line_re',
|
|
||||||
- ie. starts with "\#!" and contains "python"), then adjust the first
|
|
||||||
- line to refer to the current Python interpreter as we copy.
|
|
||||||
+ """Copy each script listed in 'self.scripts'
|
|
||||||
"""
|
|
||||||
_sysconfig = __import__('sysconfig')
|
|
||||||
self.mkpath(self.build_dir)
|
|
||||||
@@ -78,41 +75,9 @@ class build_scripts (Command):
|
|
||||||
if not self.dry_run:
|
|
||||||
raise
|
|
||||||
f = None
|
|
||||||
- else:
|
|
||||||
- first_line = f.readline()
|
|
||||||
- if not first_line:
|
|
||||||
- self.warn("%s is an empty file (skipping)" % script)
|
|
||||||
- continue
|
|
||||||
-
|
|
||||||
- match = first_line_re.match(first_line)
|
|
||||||
- if match:
|
|
||||||
- adjust = 1
|
|
||||||
- post_interp = match.group(1) or ''
|
|
||||||
-
|
|
||||||
- if adjust:
|
|
||||||
- log.info("copying and adjusting %s -> %s", script,
|
|
||||||
- self.build_dir)
|
|
||||||
- if not self.dry_run:
|
|
||||||
- outf = open(outfile, "w")
|
|
||||||
- if not _sysconfig.is_python_build():
|
|
||||||
- outf.write("#!%s%s\n" %
|
|
||||||
- (self.executable,
|
|
||||||
- post_interp))
|
|
||||||
- else:
|
|
||||||
- outf.write("#!%s%s\n" %
|
|
||||||
- (os.path.join(
|
|
||||||
- _sysconfig.get_config_var("BINDIR"),
|
|
||||||
- "python%s%s" % (_sysconfig.get_config_var("VERSION"),
|
|
||||||
- _sysconfig.get_config_var("EXE"))),
|
|
||||||
- post_interp))
|
|
||||||
- outf.writelines(f.readlines())
|
|
||||||
- outf.close()
|
|
||||||
- if f:
|
|
||||||
- f.close()
|
|
||||||
- else:
|
|
||||||
- if f:
|
|
||||||
- f.close()
|
|
||||||
- self.copy_file(script, outfile)
|
|
||||||
+ if f:
|
|
||||||
+ f.close()
|
|
||||||
+ self.copy_file(script, outfile)
|
|
||||||
|
|
||||||
if os.name == 'posix':
|
|
||||||
for file in outfiles:
|
|
|
@ -1,10 +1,17 @@
|
||||||
|
From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexandru Ardelean <aa@ocedo.com>
|
||||||
|
Date: Thu, 25 Sep 2014 18:18:29 +0300
|
||||||
|
Subject: [PATCH] enable zlib
|
||||||
|
|
||||||
---
|
---
|
||||||
Modules/Setup.dist | 2 +-
|
Modules/Setup.dist | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
|
||||||
|
index 01fb85f..01ac492 100644
|
||||||
--- a/Modules/Setup.dist
|
--- a/Modules/Setup.dist
|
||||||
+++ b/Modules/Setup.dist
|
+++ b/Modules/Setup.dist
|
||||||
@@ -460,7 +460,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -358,7 +358,7 @@ _symtable symtablemodule.c
|
||||||
# Andrew Kuchling's zlib module.
|
# Andrew Kuchling's zlib module.
|
||||||
# This require zlib 1.1.3 (or later).
|
# This require zlib 1.1.3 (or later).
|
||||||
# See http://www.gzip.org/zlib/
|
# See http://www.gzip.org/zlib/
|
||||||
|
@ -13,3 +20,6 @@
|
||||||
|
|
||||||
# Interface to the Expat XML parser
|
# Interface to the Expat XML parser
|
||||||
#
|
#
|
||||||
|
--
|
||||||
|
1.8.4.5
|
||||||
|
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
---
|
|
||||||
setup.py | 10 ++++++----
|
|
||||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -704,8 +704,7 @@ class PyBuildExt(build_ext):
|
|
||||||
|
|
||||||
min_openssl_ver = 0x00907000
|
|
||||||
have_any_openssl = ssl_incs is not None and ssl_libs is not None
|
|
||||||
- have_usable_openssl = (have_any_openssl and
|
|
||||||
- openssl_ver >= min_openssl_ver)
|
|
||||||
+ have_usable_openssl = False
|
|
||||||
|
|
||||||
if have_any_openssl:
|
|
||||||
if have_usable_openssl:
|
|
||||||
@@ -730,7 +729,7 @@ class PyBuildExt(build_ext):
|
|
||||||
depends = ['md5.h']) )
|
|
||||||
|
|
||||||
min_sha2_openssl_ver = 0x00908000
|
|
||||||
- if COMPILED_WITH_PYDEBUG or openssl_ver < min_sha2_openssl_ver:
|
|
||||||
+ if True:
|
|
||||||
# OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
|
|
||||||
exts.append( Extension('_sha256', ['sha256module.c']) )
|
|
||||||
exts.append( Extension('_sha512', ['sha512module.c']) )
|
|
|
@ -1,36 +0,0 @@
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -573,32 +573,7 @@ class PyBuildExt(build_ext):
|
|
||||||
# readline
|
|
||||||
do_readline = self.compiler.find_library_file(lib_dirs, 'readline')
|
|
||||||
readline_termcap_library = ""
|
|
||||||
- curses_library = ""
|
|
||||||
- # Determine if readline is already linked against curses or tinfo.
|
|
||||||
- if do_readline and find_executable('ldd'):
|
|
||||||
- fp = os.popen("ldd %s" % do_readline)
|
|
||||||
- ldd_output = fp.readlines()
|
|
||||||
- ret = fp.close()
|
|
||||||
- if ret is None or ret >> 8 == 0:
|
|
||||||
- for ln in ldd_output:
|
|
||||||
- if 'curses' in ln:
|
|
||||||
- readline_termcap_library = re.sub(
|
|
||||||
- r'.*lib(n?cursesw?)\.so.*', r'\1', ln
|
|
||||||
- ).rstrip()
|
|
||||||
- break
|
|
||||||
- if 'tinfo' in ln: # termcap interface split out from ncurses
|
|
||||||
- readline_termcap_library = 'tinfo'
|
|
||||||
- break
|
|
||||||
- # Issue 7384: If readline is already linked against curses,
|
|
||||||
- # use the same library for the readline and curses modules.
|
|
||||||
- if 'curses' in readline_termcap_library:
|
|
||||||
- curses_library = readline_termcap_library
|
|
||||||
- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
|
|
||||||
- curses_library = 'ncursesw'
|
|
||||||
- elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
|
|
||||||
- curses_library = 'ncurses'
|
|
||||||
- elif self.compiler.find_library_file(lib_dirs, 'curses'):
|
|
||||||
- curses_library = 'curses'
|
|
||||||
+ curses_library = "ncurses"
|
|
||||||
|
|
||||||
if platform == 'darwin':
|
|
||||||
os_release = int(os.uname()[2].split('.')[0])
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/Makefile.pre.in
|
|
||||||
+++ b/Makefile.pre.in
|
|
||||||
@@ -410,7 +410,7 @@ platform: $(BUILDPYTHON)
|
|
||||||
# Build the shared modules
|
|
||||||
sharedmods: $(BUILDPYTHON)
|
|
||||||
@case $$MAKEFLAGS in \
|
|
||||||
- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
|
|
||||||
+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
|
||||||
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
|
||||||
esac
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -1021,7 +1021,6 @@ class PyBuildExt(build_ext):
|
|
||||||
include_dirs=["Modules/_sqlite",
|
|
||||||
sqlite_incdir],
|
|
||||||
library_dirs=sqlite_libdir,
|
|
||||||
- runtime_library_dirs=sqlite_libdir,
|
|
||||||
extra_link_args=sqlite_extra_link_args,
|
|
||||||
libraries=["sqlite3",]))
|
|
||||||
else:
|
|
Loading…
Reference in a new issue