code
string | repo_name
string | path
string | language
string | license
string | size
int64 |
---|---|---|---|---|---|
config BR2_PACKAGE_PYTHON_ZOPE_INTERFACE
bool "python-zope-interface"
help
This package provides an implementation of "object interfaces" for
Python. Interfaces are a mechanism for labeling objects as conforming
to a given API or contract. So, this package can be considered as
implementation of the Design By Contract methodology support in Python.
http://docs.zope.org/zope.interface/
|
shibajee/buildroot
|
package/python-zope-interface/Config.in
|
in
|
mit
| 405 |
# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=9ae3d24c0c7415deb249dd1a132f0f79, sha256 locally computed
md5 9ae3d24c0c7415deb249dd1a132f0f79 zope.interface-4.1.3.tar.gz
sha256 2e221a9eec7ccc58889a278ea13dcfed5ef939d80b07819a9a8b3cb1c681484f zope.interface-4.1.3.tar.gz
|
shibajee/buildroot
|
package/python-zope-interface/python-zope-interface.hash
|
hash
|
mit
| 294 |
################################################################################
#
# python-zope-interface
#
################################################################################
PYTHON_ZOPE_INTERFACE_VERSION = 4.1.3
PYTHON_ZOPE_INTERFACE_SOURCE = zope.interface-$(PYTHON_ZOPE_INTERFACE_VERSION).tar.gz
PYTHON_ZOPE_INTERFACE_SITE = https://pypi.python.org/packages/source/z/zope.interface
PYTHON_ZOPE_INTERFACE_SETUP_TYPE = setuptools
PYTHON_ZOPE_INTERFACE_LICENSE = ZPLv2.1
PYTHON_ZOPE_INTERFACE_LICENSE_FILES = LICENSE.txt
$(eval $(python-package))
|
shibajee/buildroot
|
package/python-zope-interface/python-zope-interface.mk
|
mk
|
mit
| 564 |
setup.py: do not add invalid header locations
This piece of code incorrectly adds /usr/include to
self.compiler.include_dirs, and results in the following invalid
compilation line:
/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC \
-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
-pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \
-I/usr/include -I. -IInclude -I./Include \
-I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \
-I/home/thomas/projets/buildroot/output/build/python-2.7.6/Include \
-I/home/thomas/projets/buildroot/output/build/python-2.7.6 \
-c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.c \
-o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.o
cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
[...]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -480,7 +480,7 @@
for directory in reversed(options.dirs):
add_dir_to_list(dir_list, directory)
- if os.path.normpath(sys.prefix) != '/usr' \
+ if False and 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
|
shibajee/buildroot
|
package/python/001-remove-host-header-path.patch
|
patch
|
mit
| 1,675 |
Fix get_python_inc() for cross-compilation
When we are cross compiling, doing os.path.dirname(sys.executable) to
get the build directory is incorrect, because we're executing the host
Python to build things for the target. Instead, we should use the
project_base variable.
This fixes cross-compilation, which was adding incorrect header paths
pointing to the location where the host Python was built:
/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC -fno-strict-aliasing \
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \
-I/usr/include -I. -IInclude -I./Include -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \
-I/home/thomas/projets/buildroot/output/host/usr/bin/Include -I/home/thomas/projets/buildroot/output/host/usr/bin \
-c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.c \
-o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.o
This patch allows to fix the
/home/thomas/projets/buildroot/output/host/usr/bin/Include and
/home/thomas/projets/buildroot/output/host/usr/bin paths that are
incorrectly added to the header paths.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Lib/distutils/sysconfig.py
===================================================================
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -79,7 +79,7 @@
if os.name == "posix":
if python_build:
- buildir = os.path.dirname(sys.executable)
+ buildir = project_base
if plat_specific:
# python.h is located in the buildir
inc_dir = buildir
|
shibajee/buildroot
|
package/python/002-fix-get-python-inc.patch
|
patch
|
mit
| 1,803 |
Change the install location of _sysconfigdata.py
The _sysconfigdata.py module contains definitions that are needed when
building Python modules. In cross-compilation mode, when building
Python extensions for the target, we need to use the _sysconfigdata.py
of the target Python while executing the host Python.
However until now, the _sysconfigdata.py module was installed in
build/lib.<arch>-<version> directory, together with a number of
architecture-specific shared objects, which cannot be used with the
host Python.
To solve this problem, this patch moves _sysconfigdata.py to a
separate location, build/sysconfigdata.<arch>-<version>/, and only
this directory gets added to the PYTHONPATH of the host Python
interpreter when building Python modules for the target.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -462,6 +462,9 @@
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
+ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt
+ mkdir -p `cat pysysconfigdatadir.txt`
+ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt`
# Build the shared modules
# Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
@@ -1002,7 +1005,7 @@
else true; \
fi; \
done
- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
+ @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
do \
if test -x $$i; then \
$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
@@ -1012,6 +1015,11 @@
echo $(INSTALL_DATA) $$i $(LIBDEST); \
fi; \
done
+ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
+ $(DESTDIR)$(LIBDEST)
+ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata
+ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
+ $(DESTDIR)$(LIBDEST)/sysconfigdata
@for d in $(LIBSUBDIRS); \
do \
a=$(srcdir)/Lib/$$d; \
@@ -1337,7 +1345,7 @@
Modules/Setup Modules/Setup.local Modules/Setup.config \
Modules/ld_so_aix Modules/python.exp Misc/python.pc
-rm -f python*-gdb.py
- -rm -f pybuilddir.txt
+ -rm -f pybuilddir.txt pysysconfigdatadir.txt
find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \
-o -name '[@,#]*' -o -name '*.old' \
-o -name '*.orig' -o -name '*.rej' \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,7 @@
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
fi
elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
|
shibajee/buildroot
|
package/python/004-sysconfigdata-install-location.patch
|
patch
|
mit
| 3,318 |
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1050,24 +1050,32 @@
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
fi
+ifeq (@PYC_BUILD@,yes)
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
+endif
+ifeq (@PYO_BUILD@,yes)
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
+endif
+ifeq (@PYC_BUILD@,yes)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+endif
+ifeq (@PYO_BUILD@,yes)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+endif
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -739,6 +739,17 @@
;;
esac
+AC_SUBST(PYC_BUILD)
+
+AC_ARG_ENABLE(pyc-build,
+ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]),
+ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ])
+
+AC_SUBST(PYO_BUILD)
+
+AC_ARG_ENABLE(pyo-build,
+ AS_HELP_STRING([--disable-pyo-build], [disable build of pyo files]),
+ [ PYO_BUILD="${enableval}" ], [ PYO_BUILD=yes ])
AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
|
shibajee/buildroot
|
package/python/005-pyc-pyo-conditional.patch
|
patch
|
mit
| 1,999 |
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -3353,7 +3353,7 @@
AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
-if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
+if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes
then
if test $ipv6 = yes
then
|
shibajee/buildroot
|
package/python/006-cross-compile-getaddrinfo.patch
|
patch
|
mit
| 402 |
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -156,6 +156,8 @@
# configure script arguments
CONFIG_ARGS= @CONFIG_ARGS@
+# disabled extensions
+DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
# Subdirectories with code
SRCDIRS= @SRCDIRS@
@@ -477,6 +479,7 @@
esac; \
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
# Build static library
@@ -1191,7 +1194,8 @@
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2290,6 +2290,8 @@
PKG_PROG_PKG_CONFIG
+AC_SUBST(DISABLED_EXTENSIONS)
+
# Check for use of the system expat library
AC_MSG_CHECKING(for --with-system-expat)
AC_ARG_WITH(system_expat,
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,10 @@
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
+try:
+ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
+except KeyError:
+ disabled_module_list = list()
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
shibajee/buildroot
|
package/python/007-disable-extensions.patch
|
patch
|
mit
| 1,937 |
Adjust library/header paths for cross-compilation
When cross-compiling third-party extensions, the get_python_inc() or
get_python_lib() can be called, to return the path to headers or
libraries. However, they use the sys.prefix of the host Python, which
returns incorrect paths when cross-compiling (paths pointing to host
headers and libraries).
In order to fix this, we introduce the _python_sysroot, _python_prefix
and _python_exec_prefix variables, that allow to override these
values, and get correct header/library paths when cross-compiling
third-party Python modules.
The _python_sysroot variable is also used to prefix the LIBDIR value
taken from the sysconfigdata module.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Lib/distutils/sysconfig.py
===================================================================
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -19,8 +19,13 @@
from distutils.errors import DistutilsPlatformError
# These are needed in a couple of spots, so just compute them once.
-PREFIX = os.path.normpath(sys.prefix)
-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+if "_python_sysroot" in os.environ:
+ _sysroot=os.environ.get('_python_sysroot')
+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
+else:
+ PREFIX = os.path.normpath(sys.prefix)
+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
# Path to the base directory of the project. On Windows the binary may
# live in project/PCBuild9. If we're dealing with an x64 Windows build,
Index: b/Lib/distutils/command/build_ext.py
===================================================================
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -237,7 +237,10 @@
if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
if not sysconfig.python_build:
# building third party extensions
- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
+ libdir = sysconfig.get_config_var('LIBDIR')
+ if "_python_sysroot" in os.environ:
+ libdir = os.environ.get("_python_sysroot") + libdir
+ self.library_dirs.append(libdir)
else:
# building python standard extensions
self.library_dirs.append('.')
|
shibajee/buildroot
|
package/python/008-distutils-use-python-sysroot.patch
|
patch
|
mit
| 2,462 |
Don't look in /usr/lib/termcap for libraries
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -764,12 +764,9 @@
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
- ['/usr/lib/termcap'],
- 'termcap'):
+ elif self.compiler.find_library_file(lib_dirs, 'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
|
shibajee/buildroot
|
package/python/009-no-termcap-host-path.patch
|
patch
|
mit
| 1,034 |
Add a backport of http://bugs.python.org/issue16235 so we can use
python-config for cross builds.
This basically replaces the python version of python-config with a pure-shell
version that's already preprocessed when installed and doesn't depend
on the sysconfig import that usually leads to bad data/results.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -885,6 +885,7 @@
# Other platforms follow
if test $enable_shared = "yes"; then
+ PY_ENABLE_SHARED=1
AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.])
case $ac_sys_system in
BeOS*)
@@ -945,6 +946,7 @@
esac
else # shared is disabled
+ PY_ENABLE_SHARED=0
case $ac_sys_system in
CYGWIN*)
BLDLIBRARY='$(LIBRARY)'
@@ -1921,6 +1923,9 @@
AC_SUBST(BLDSHARED)
AC_SUBST(CCSHARED)
AC_SUBST(LINKFORSHARED)
+AC_SUBST(PY_ENABLE_SHARED)
+LIBPL="${prefix}/lib/python${VERSION}/config"
+AC_SUBST(LIBPL)
# SO is the extension of shared libraries `(including the dot!)
# -- usually .so, .sl on HP-UX, .dll on Cygwin
AC_MSG_CHECKING(SO)
@@ -4588,7 +4593,7 @@
AC_SUBST(ENSUREPIP)
# generate output files
-AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
+AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
AC_OUTPUT
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -166,7 +166,7 @@
SUBDIRSTOO= Include Lib Misc Demo
# Files and directories to be distributed
-CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in
+CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in Misc/python-config.sh
DISTFILES= README ChangeLog $(CONFIGFILES)
DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
DIST= $(DISTFILES) $(DISTDIRS)
@@ -410,7 +410,7 @@
# Default target
all: build_all
-build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks
+build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks python-config
# Compile a binary with gcc profile guided optimization.
profile-opt:
@@ -1101,10 +1101,12 @@
fi; \
cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
-python-config: $(srcdir)/Misc/python-config.in
+python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
# Substitution happens here, as the completely-expanded BINDIR
# is not available in configure
- sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
+ sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py
+ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
+ sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' Misc/python-config.sh >python-config
# Install the include files
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
@@ -1163,7 +1165,7 @@
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
- rm python-config
+ $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
@if [ -s Modules/python.exp -a \
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
echo; echo "Installing support files for building shared extension modules on AIX:"; \
@@ -1345,6 +1347,7 @@
config.cache config.log pyconfig.h Modules/config.c
-rm -rf build platform
-rm -rf $(PYTHONFRAMEWORKDIR)
+ -rm -f python-config.py python-config
# Make things extra clean, before making a distribution:
# remove all generated files, even Makefile[.pre]
Index: b/Misc/python-config.sh.in
===================================================================
--- /dev/null
+++ b/Misc/python-config.sh.in
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+exit_with_usage ()
+{
+ echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir"
+ exit $1
+}
+
+if [ "$1" = "" ] ; then
+ exit_with_usage 1
+fi
+
+# Returns the actual prefix where this script was installed to.
+installed_prefix ()
+{
+ RESULT=$(dirname $(cd $(dirname "$1") && pwd -P))
+ if which readlink >/dev/null 2>&1 ; then
+ RESULT=$(readlink -f "$RESULT")
+ fi
+ echo $RESULT
+}
+
+prefix_build="@prefix@"
+prefix_real=$(installed_prefix "$0")
+
+# Use sed to fix paths from their built to locations to their installed to locations.
+prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#")
+exec_prefix_build="@exec_prefix@"
+exec_prefix=$(echo "$exec_prefix_build" | sed "s#$exec_prefix_build#$prefix_real#")
+includedir=$(echo "@includedir@")
+libdir=$(echo "@libdir@" | sed "s#$prefix_build#$prefix_real#")
+CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix_build#$prefix_real#")
+VERSION="@VERSION@"
+LIBM="@LIBM@"
+LIBC="@LIBC@"
+SYSLIBS="$LIBM $LIBC"
+LIBS="@LIBS@ $SYSLIBS -lpython${VERSION}"
+BASECFLAGS="@BASECFLAGS@"
+LDLIBRARY="@LDLIBRARY@"
+LINKFORSHARED="@LINKFORSHARED@"
+OPT="@OPT@"
+PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
+LDVERSION="@LDVERSION@"
+LIBDEST=${prefix}/lib/python${VERSION}
+LIBPL=$(echo "@LIBPL@" | sed "s#$prefix_build#$prefix_real#")
+SO="@SO@"
+PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
+INCDIR="-I$includedir/python${VERSION}"
+PLATINCDIR="-I$includedir/python${VERSION}"
+
+# Scan for --help or unknown argument.
+for ARG in $*
+do
+ case $ARG in
+ --help)
+ exit_with_usage 0
+ ;;
+ --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--abiflags|--configdir)
+ ;;
+ *)
+ exit_with_usage 1
+ ;;
+esac
+done
+
+for ARG in "$@"
+do
+ case "$ARG" in
+ --prefix)
+ echo "$prefix"
+ ;;
+ --exec-prefix)
+ echo "$exec_prefix"
+ ;;
+ --includes)
+ echo "$INCDIR $PLATINCDIR"
+ ;;
+ --cflags)
+ echo "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT"
+ ;;
+ --libs)
+ echo "$LIBS"
+ ;;
+ --ldflags)
+ LINKFORSHAREDUSED=
+ if [ -z "$PYTHONFRAMEWORK" ] ; then
+ LINKFORSHAREDUSED=$LINKFORSHARED
+ fi
+ LIBPLUSED=
+ if [ "$PY_ENABLE_SHARED" = "0" ] ; then
+ LIBPLUSED="-L$LIBPL"
+ fi
+ echo "$LIBPLUSED -L$libdir $LIBS $LINKFORSHAREDUSED"
+ ;;
+ --extension-suffix)
+ echo "$SO"
+ ;;
+ --configdir)
+ echo "$LIBPL"
+ ;;
+esac
+done
|
shibajee/buildroot
|
package/python/010-fix-python-config.patch
|
patch
|
mit
| 6,479 |
Remove the python symlink install rules.
The python symlink installation will be handled by Buildroot itself, because
Buildroot needs to control to what python interpreter (python2 or python3) the
python symlink points to.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
(rebased against version 2.7.12)
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -974,17 +974,10 @@
echo "Creating directory $(LIBPC)"; \
$(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \
fi
- -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
- then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
- else true; \
- fi
- (cd $(DESTDIR)$(BINDIR); $(LN) -s python2$(EXE) $(PYTHON))
-rm -f $(DESTDIR)$(BINDIR)/python2$(EXE)
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python2$(EXE))
-rm -f $(DESTDIR)$(BINDIR)/python2-config
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python2-config)
- -rm -f $(DESTDIR)$(BINDIR)/python-config
- (cd $(DESTDIR)$(BINDIR); $(LN) -s python2-config python-config)
-test -d $(DESTDIR)$(LIBPC) || $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC)
-rm -f $(DESTDIR)$(LIBPC)/python2.pc
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python2.pc)
|
shibajee/buildroot
|
package/python/011-remove-python-symlink.patch
|
patch
|
mit
| 1,365 |
Don't add multiarch paths
The add_multiarch_paths() function leads, in certain build
environments, to the addition of host header paths to the CFLAGS,
which is not appropriate for cross-compilation. This patch fixes that
by simply removing the call to add_multiarch_paths() when we're
cross-compiling.
Investigation done by David <buildroot-2014@inbox.com>.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -445,9 +445,9 @@
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')
+ self.add_multiarch_paths()
if cross_compiling:
self.add_gcc_paths()
- self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
|
shibajee/buildroot
|
package/python/013-dont-add-multiarch-path.patch
|
patch
|
mit
| 1,018 |
Abort on failed module build
When building a Python module fails, the setup.py script currently
doesn't exit with an error, and simply continues. This is not a really
nice behavior, so this patch changes setup.py to abort with an error,
so that the build issue is clearly noticeable.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -283,6 +283,7 @@
print "Failed to build these modules:"
print_three_column(failed)
print
+ sys.exit(1)
def build_extension(self, ext):
|
shibajee/buildroot
|
package/python/014-abort-on-failed-modules.patch
|
patch
|
mit
| 670 |
sqlite3: fix build when threads are not used/available
When threads are not used/available, a function in the sqlite3 extension
ends up with a label at the end:
void _pysqlite_final_callback(sqlite3_context* context)
{
PyObject* function_result;
PyObject** aggregate_instance;
int ok;
#ifdef WITH_THREAD
PyGILState_STATE threadstate;
threadstate = PyGILState_Ensure();
#endif
aggregate_instance = (PyObject**)sqlite3_aggregate_context(context, sizeof(PyObject*));
if (!*aggregate_instance) {
goto error;
}
[......]
error:
#ifdef WITH_THREAD
PyGILState_Release(threadstate);
#endif
}
This is not valid, and gcc complains.
Fix that by adding a dummy statement after the label, so that the label
is never the last statement of the function.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Index: b/Modules/_sqlite/connection.c
===================================================================
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -786,6 +786,7 @@
#ifdef WITH_THREAD
PyGILState_Release(threadstate);
#endif
+ ; /* Make gcc happy: a label can't be at the end of a function */
}
static void _pysqlite_drop_unused_statement_references(pysqlite_Connection* self)
|
shibajee/buildroot
|
package/python/015-fix-sqlite-without-threads.patch
|
patch
|
mit
| 1,353 |
Serial ioctl() workaround
The ioctls.h of some architectures (notably xtensa) references structs from
linux/serial.h. Make sure to include this header as well.
Also, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct,
but isn't actually referenced in modern kernels.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
Index: b/Modules/termios.c
===================================================================
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -16,7 +16,9 @@
* so this needs to be included first on that platform. */
#include <termio.h>
#endif
+#include <linux/serial.h>
#include <sys/ioctl.h>
+#undef TIOCTTYGSTRUCT
/* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
* MDTR, MRI, and MRTS (appearantly used internally by some things
|
shibajee/buildroot
|
package/python/016-serial-ioctl-workaround.patch
|
patch
|
mit
| 809 |
Do not adjust the shebang of Python scripts for cross-compilation
The copy_scripts() method in distutils copies the scripts listed in
the setup file and adjusts the first line to refer to the current
Python interpreter. When cross-compiling, this means that the adjusted
shebang refers to the host Python interpreter.
This patch modifies copy_scripts() to preserve the shebang when
cross-compilation is detected.
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Index: b/Lib/distutils/command/build_scripts.py
===================================================================
--- a/Lib/distutils/command/build_scripts.py
+++ b/Lib/distutils/command/build_scripts.py
@@ -89,7 +89,7 @@
adjust = 1
post_interp = match.group(1) or ''
- if adjust:
+ if adjust and not '_python_sysroot' in os.environ:
log.info("copying and adjusting %s -> %s", script,
self.build_dir)
if not self.dry_run:
|
shibajee/buildroot
|
package/python/017-distutils-scripts-dont-adjust-shebang.patch
|
patch
|
mit
| 1,029 |
Override system locale and set to default when adding gcc paths
Forces the use of the default locale in the function
add_gcc_paths, which is called when cross compiling to add the
include and library paths. This is necessary because otherwise
the gcc output is localized and the output parsing fails, which
results in no paths added and detect_modules not able to find
any system library (eg. libz, libssl, etc.)
[Thomas: patch taken from https://bugs.python.org/issue23767.]
Signed-off-by: Samuel Cabrero <samuelcabrero@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -414,7 +414,7 @@
tmpfile = os.path.join(self.build_temp, 'gccpaths')
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
- ret = os.system('%s -E -v - </dev/null 2>%s 1>/dev/null' % (gcc, tmpfile))
+ ret = os.system('LC_ALL=C %s -E -v - </dev/null 2>%s 1>/dev/null' % (gcc, tmpfile))
is_gcc = False
in_incdirs = False
inc_dirs = []
|
shibajee/buildroot
|
package/python/018-fix-add-gcc-paths-logic.patch
|
patch
|
mit
| 1,146 |
Add an option to disable installation of test modules
The Python standard distribution comes with many test modules, that
are not necessarly useful on embedded targets.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 40 +++++++++++++++++++++++++++-------------
configure.in | 6 ++++++
2 files changed, 33 insertions(+), 13 deletions(-)
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -960,27 +960,43 @@
plat-mac/lib-scriptpackages/SystemEvents \
plat-mac/lib-scriptpackages/Terminal
PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
-LIBSUBDIRS= lib-tk lib-tk/test lib-tk/test/test_tkinter \
- lib-tk/test/test_ttk site-packages test test/audiodata test/capath \
- test/data test/cjkencodings test/decimaltestdata test/xmltestdata \
- test/imghdrdata \
- test/subprocessdata \
- test/tracedmodules \
+LIBSUBDIRS= lib-tk site-packages \
encodings compiler hotshot \
- email email/mime email/test email/test/data \
+ email email/mime \
ensurepip ensurepip/_bundled \
- json json/tests \
- sqlite3 sqlite3/test \
- logging bsddb bsddb/test csv importlib wsgiref \
- lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
- ctypes ctypes/test ctypes/macholib \
- idlelib idlelib/Icons idlelib/idle_test \
- distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
+ json \
+ sqlite3 \
+ logging bsddb csv importlib wsgiref \
+ lib2to3 lib2to3/fixes lib2to3/pgen2 \
+ ctypes ctypes/macholib \
+ idlelib idlelib/Icons \
+ distutils distutils/command $(XMLLIBSUBDIRS) \
multiprocessing multiprocessing/dummy \
- unittest unittest/test \
+ unittest \
lib-old \
curses pydoc_data $(MACHDEPS)
+
+TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
+ lib-tk/test/test_ttk test test/audiodata test/capath test/data \
+ test/cjkencodings test/decimaltestdata test/xmltestdata \
+ test/imghdrdata \
+ test/subprocessdata \
+ test/tracedmodules \
+ email/test email/test/data \
+ json/tests \
+ sqlite3/test \
+ bsddb/test \
+ lib2to3/tests \
+ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
+ ctypes/test \
+ idlelib/idle_test \
+ distutils/tests \
+ unittest/test
+
+ifeq (@TEST_MODULES@,yes)
+LIBSUBDIRS += $(TESTSUBDIRS)
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2634,6 +2634,12 @@
fi
+AC_SUBST(TEST_MODULES)
+
+AC_ARG_ENABLE(test-modules,
+ AS_HELP_STRING([--disable-test-modules], [disable test modules]),
+ [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
|
shibajee/buildroot
|
package/python/100-optional-test-modules.patch
|
patch
|
mit
| 3,094 |
Add an option to disable pydoc
It removes 0.5 MB of data from the target plus the pydoc script
itself.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 6 +++++-
configure.in | 5 +++++
setup.py | 10 +++++++---
3 files changed, 17 insertions(+), 4 deletions(-)
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -974,7 +974,7 @@
multiprocessing multiprocessing/dummy \
unittest \
lib-old \
- curses pydoc_data $(MACHDEPS)
+ curses $(MACHDEPS)
TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
lib-tk/test/test_ttk test test/audiodata test/capath test/data \
@@ -997,6 +997,10 @@
LIBSUBDIRS += $(TESTSUBDIRS)
endif
+ifeq (@PYDOC@,yes)
+LIBSUBDIRS += pydoc_data
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2633,6 +2633,11 @@
AC_CHECK_FUNCS(pthread_atfork)
fi
+AC_SUBST(PYDOC)
+
+AC_ARG_ENABLE(pydoc,
+ AS_HELP_STRING([--disable-pydoc], [disable pydoc]),
+ [ PYDOC="${enableval}" ], [ PYDOC=yes ])
AC_SUBST(TEST_MODULES)
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -2211,6 +2211,12 @@
# turn off warnings when deprecated modules are imported
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
+
+ scripts = ['Tools/scripts/idle', 'Tools/scripts/2to3',
+ 'Lib/smtpd.py']
+ if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
+ scripts += [ 'Tools/scripts/pydoc' ]
+
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
@@ -2231,9 +2237,7 @@
ext_modules=[Extension('_struct', ['_struct.c'])],
# Scripts to install
- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
- 'Tools/scripts/2to3',
- 'Lib/smtpd.py']
+ scripts = scripts,
)
# --install-platlib
|
shibajee/buildroot
|
package/python/101-optional-pydoc.patch
|
patch
|
mit
| 2,330 |
Add an option to disable lib2to3
lib2to3 is a library to convert Python 2.x code to Python 3.x. As
such, it is probably not very useful on embedded system targets.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 24 +++++++++++++++++-------
configure.in | 6 ++++++
setup.py | 5 +++--
3 files changed, 26 insertions(+), 9 deletions(-)
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -967,7 +967,6 @@
json \
sqlite3 \
logging bsddb csv importlib wsgiref \
- lib2to3 lib2to3/fixes lib2to3/pgen2 \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
distutils distutils/command $(XMLLIBSUBDIRS) \
@@ -986,8 +985,6 @@
json/tests \
sqlite3/test \
bsddb/test \
- lib2to3/tests \
- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
ctypes/test \
idlelib/idle_test \
distutils/tests \
@@ -1001,6 +998,14 @@
LIBSUBDIRS += pydoc_data
endif
+ifeq (@LIB2TO3@,yes)
+LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
+TESTSUBDIRS += lib2to3/tests \
+ lib2to3/tests/data \
+ lib2to3/tests/data/fixers \
+ lib2to3/tests/data/fixers/myfixes
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2645,6 +2645,12 @@
AS_HELP_STRING([--disable-test-modules], [disable test modules]),
[ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
+AC_SUBST(LIB2TO3)
+
+AC_ARG_ENABLE(lib2to3,
+ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
+ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -2212,10 +2212,11 @@
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
- scripts = ['Tools/scripts/idle', 'Tools/scripts/2to3',
- 'Lib/smtpd.py']
+ scripts = ['Tools/scripts/idle', 'Lib/smtpd.py']
if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
scripts += [ 'Tools/scripts/pydoc' ]
+ if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"):
+ scripts += [ 'Tools/scripts/2to3' ]
setup(# PyPI Metadata (PEP 301)
name = "Python",
|
shibajee/buildroot
|
package/python/102-optional-2to3.patch
|
patch
|
mit
| 2,698 |
Add option to disable the sqlite3 module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 24 +++++++++++++++++-------
configure.in | 9 +++++++++
2 file changed, 9 insertions(+)
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2633,6 +2633,15 @@
AC_CHECK_FUNCS(pthread_atfork)
fi
+AC_SUBST(SQLITE3)
+AC_ARG_ENABLE(sqlite3,
+ AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),
+ [ SQLITE3="${enableval}" ], [ SQLITE3=yes ])
+
+if test "$SQLITE3" = "no" ; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
+fi
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -965,7 +965,6 @@
email email/mime \
ensurepip ensurepip/_bundled \
json \
- sqlite3 \
logging bsddb csv importlib wsgiref \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
@@ -983,7 +982,6 @@
test/tracedmodules \
email/test email/test/data \
json/tests \
- sqlite3/test \
bsddb/test \
ctypes/test \
idlelib/idle_test \
@@ -1006,6 +1004,11 @@
lib2to3/tests/data/fixers/myfixes
endif
+ifeq (@SQLITE3@,yes)
+LIBSUBDIRS += sqlite3
+TESTSUBDIRS += sqlite3/test
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
|
shibajee/buildroot
|
package/python/103-optional-sqlite.patch
|
patch
|
mit
| 1,534 |
Add an option to disable the tk module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 14 ++++++++++----
configure.in | 9 +++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -960,7 +960,7 @@
plat-mac/lib-scriptpackages/SystemEvents \
plat-mac/lib-scriptpackages/Terminal
PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
-LIBSUBDIRS= lib-tk site-packages \
+LIBSUBDIRS= site-packages \
encodings compiler hotshot \
email email/mime \
ensurepip ensurepip/_bundled \
@@ -974,8 +974,7 @@
lib-old \
curses $(MACHDEPS)
-TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
- lib-tk/test/test_ttk test test/audiodata test/capath test/data \
+TESTSUBDIRS = test test/audiodata test/capath test/data \
test/cjkencodings test/decimaltestdata test/xmltestdata \
test/imghdrdata \
test/subprocessdata \
@@ -1009,6 +1008,12 @@
TESTSUBDIRS += sqlite3/test
endif
+ifeq (@TK@,yes)
+LIBSUBDIRS += lib-tk
+TESTSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
+ lib-tk/test/test_ttk
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2642,6 +2642,15 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
+AC_SUBST(TK)
+AC_ARG_ENABLE(tk,
+ AS_HELP_STRING([--disable-tk], [disable tk]),
+ [ TK="${enableval}" ], [ TK=yes ])
+
+if test "$TK" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
+fi
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
|
shibajee/buildroot
|
package/python/104-optional-tk.patch
|
patch
|
mit
| 1,862 |
Add an option to disable the curses module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 6 +++++-
configure.in | 9 +++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -972,7 +972,7 @@
multiprocessing multiprocessing/dummy \
unittest \
lib-old \
- curses $(MACHDEPS)
+ $(MACHDEPS)
TESTSUBDIRS = test test/audiodata test/capath test/data \
test/cjkencodings test/decimaltestdata test/xmltestdata \
@@ -1014,6 +1014,10 @@
lib-tk/test/test_ttk
endif
+ifeq (@CURSES@,yes)
+LIBSUBDIRS += curses
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2651,6 +2651,15 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
fi
+AC_SUBST(CURSES)
+AC_ARG_ENABLE(curses,
+ AS_HELP_STRING([--disable-curses], [disable curses]),
+ [ CURSES="${enableval}" ], [ CURSES=yes ])
+
+if test "$CURSES" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
+fi
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
|
shibajee/buildroot
|
package/python/105-optional-curses.patch
|
patch
|
mit
| 1,417 |
Add an option to disable expat
This patch replaces the existing --with-system-expat option with a
--with-expat={system,builtin,none} option, which allows to tell Python
whether we want to use the system expat (already installed), the expat
builtin the Python sources, or no expat at all (which disables the
installation of XML modules).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 6 +++++-
configure.in | 18 +++++++++++++-----
setup.py | 2 +-
3 files changed, 19 insertions(+), 7 deletions(-)
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -968,7 +968,7 @@
logging bsddb csv importlib wsgiref \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
- distutils distutils/command $(XMLLIBSUBDIRS) \
+ distutils distutils/command \
multiprocessing multiprocessing/dummy \
unittest \
lib-old \
@@ -1018,6 +1018,10 @@
LIBSUBDIRS += curses
endif
+ifeq (@EXPAT@,yes)
+LIBSUBDIRS += $(XMLLIBSUBDIRS)
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2298,13 +2298,21 @@
AC_SUBST(DISABLED_EXTENSIONS)
# Check for use of the system expat library
-AC_MSG_CHECKING(for --with-system-expat)
-AC_ARG_WITH(system_expat,
- AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]),
+AC_MSG_CHECKING(for --with-expat)
+AC_ARG_WITH(expat,
+ AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]),
[],
- [with_system_expat="no"])
+ [with_expat="builtin"])
-AC_MSG_RESULT($with_system_expat)
+AC_MSG_RESULT($with_expat)
+
+if test "$with_expat" != "none"; then
+ EXPAT=yes
+else
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat"
+ EXPAT=no
+fi
+AC_SUBST(EXPAT)
# Check for use of the system libffi library
AC_MSG_CHECKING(for --with-system-ffi)
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -1463,7 +1463,7 @@
#
# More information on Expat can be found at www.libexpat.org.
#
- if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"):
+ if '--with-expat=system' in sysconfig.get_config_var("CONFIG_ARGS"):
expat_inc = []
define_macros = []
expat_lib = ['expat']
|
shibajee/buildroot
|
package/python/106-optional-expat.patch
|
patch
|
mit
| 2,711 |
Add an option to disable CJK codecs
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2650,6 +2650,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
+AC_ARG_ENABLE(codecs-cjk,
+ AS_HELP_STRING([--disable-codecs-cjk], [disable CJK codecs]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
|
shibajee/buildroot
|
package/python/107-optional-codecs-cjk.patch
|
patch
|
mit
| 723 |
Add an option to disable NIS
NIS is not necessarily available in uClibc, so we need an option to
not compile support for it.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2656,6 +2656,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk"
fi])
+AC_ARG_ENABLE(nis,
+ AS_HELP_STRING([--disable-nis], [disable NIS]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
|
shibajee/buildroot
|
package/python/108-optional-nis.patch
|
patch
|
mit
| 801 |
Add an option to disable unicodedata
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2662,6 +2662,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
+AC_ARG_ENABLE(unicodedata,
+ AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
|
shibajee/buildroot
|
package/python/109-optional-unicodedata.patch
|
patch
|
mit
| 693 |
Add an option to disable bsddb
bsddb has an external dependency on Berkeley DB. Since we want to be
able to build Python without it, this patch adds an option to disable
the build/installation of this Python module.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 10 ++++++++--
configure.in | 22 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -965,7 +965,7 @@
email email/mime \
ensurepip ensurepip/_bundled \
json \
- logging bsddb csv importlib wsgiref \
+ logging csv importlib wsgiref \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
distutils distutils/command \
@@ -981,7 +981,6 @@
test/tracedmodules \
email/test email/test/data \
json/tests \
- bsddb/test \
ctypes/test \
idlelib/idle_test \
distutils/tests \
@@ -1022,6 +1021,11 @@
LIBSUBDIRS += $(XMLLIBSUBDIRS)
endif
+ifeq (@BSDDB@,yes)
+LIBSUBDIRS += bsddb
+TESTSUBDIRS += bsddb/test
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2662,6 +2662,28 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
+AC_ARG_ENABLE(dbm,
+ AS_HELP_STRING([--disable-dbm], [disable DBM]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} dbm"
+ fi])
+
+AC_ARG_ENABLE(gdbm,
+ AS_HELP_STRING([--disable-gdbm], [disable GDBM]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} gdbm"
+ fi])
+
+AC_SUBST(BSDDB)
+AC_ARG_ENABLE(bsddb,
+ AS_HELP_STRING([--disable-bsddb], [disable BerkeyleyDB]),
+ [ if test "$enableval" = "no"; then
+ BSDDB=no
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _bsddb"
+ else
+ BSDDB=yes
+ fi], [ BSDDB=yes ])
+
AC_ARG_ENABLE(unicodedata,
AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]),
[ if test "$enableval" = "no"; then
|
shibajee/buildroot
|
package/python/110-optional-db.patch
|
patch
|
mit
| 2,290 |
Add an option to disable the ssl module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2662,6 +2662,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
+AC_ARG_ENABLE(ssl,
+ AS_HELP_STRING([--disable-ssl], [disable SSL]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl"
+ fi])
+
AC_ARG_ENABLE(dbm,
AS_HELP_STRING([--disable-dbm], [disable DBM]),
[ if test "$enableval" = "no"; then
|
shibajee/buildroot
|
package/python/111-optional-ssl.patch
|
patch
|
mit
| 691 |
Add an option to disable the bz2 module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2668,6 +2668,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl"
fi])
+AC_ARG_ENABLE(bz2,
+ AS_HELP_STRING([--disable-bz2], [disable BZIP2]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} bz2"
+ fi])
+
AC_ARG_ENABLE(dbm,
AS_HELP_STRING([--disable-dbm], [disable DBM]),
[ if test "$enableval" = "no"; then
|
shibajee/buildroot
|
package/python/112-optional-bzip2.patch
|
patch
|
mit
| 710 |
Add an option to disable the zlib module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2674,6 +2674,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} bz2"
fi])
+AC_ARG_ENABLE(zlib,
+ AS_HELP_STRING([--disable-zlib], [disable ZLIB]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} zlib"
+ fi])
+
AC_ARG_ENABLE(dbm,
AS_HELP_STRING([--disable-dbm], [disable DBM]),
[ if test "$enableval" = "no"; then
|
shibajee/buildroot
|
package/python/113-optional-zlib.patch
|
patch
|
mit
| 719 |
Do not install the idle editor
IDLE is the Python IDE built with the tkinter GUI toolkit. Since it's
highly unlikely to ever be useful in an embedded Linux system
generated by Buildroot, this patch simply disables the installation of
idle and the related Python modules. It saves 800 KB-900 KB of
installed .pyc files.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -967,7 +967,6 @@
json \
logging csv importlib wsgiref \
ctypes ctypes/macholib \
- idlelib idlelib/Icons \
distutils distutils/command \
multiprocessing multiprocessing/dummy \
unittest \
@@ -982,7 +981,6 @@
email/test email/test/data \
json/tests \
ctypes/test \
- idlelib/idle_test \
distutils/tests \
unittest/test
Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -2212,7 +2212,7 @@
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
- scripts = ['Tools/scripts/idle', 'Lib/smtpd.py']
+ scripts = ['Lib/smtpd.py']
if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
scripts += [ 'Tools/scripts/pydoc' ]
if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"):
|
shibajee/buildroot
|
package/python/114-remove-idle-editor.patch
|
patch
|
mit
| 1,391 |
From 30351d9b41a03c43d627d52d46e49ab91bfe342d Mon Sep 17 00:00:00 2001
From: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
Date: Thu, 8 Jan 2015 11:41:40 +0100
Subject: [PATCH 1/1] Add an option to disable the ossaudiodev module
Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -2726,6 +2726,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
fi
+AC_ARG_ENABLE(ossaudiodev,
+ AS_HELP_STRING([--disable-ossaudiodev], [disable OSSAUDIODEV]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ossaudiodev"
+ fi])
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
|
shibajee/buildroot
|
package/python/115-optional-ossaudiodev.patch
|
patch
|
mit
| 856 |
comment "python needs a toolchain w/ wchar, threads, dynamic library"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
config BR2_PACKAGE_PYTHON
bool "python"
depends on BR2_USE_WCHAR
# uses fork()
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_THREADS # libffi
depends on !BR2_STATIC_LIBS
select BR2_PACKAGE_LIBFFI
help
The python language interpreter.
http://www.python.org/
if BR2_PACKAGE_PYTHON
choice
prompt "python module format to install"
default BR2_PACKAGE_PYTHON_PYC_ONLY
help
Select Python module format to install on target (py, pyc or both)
config BR2_PACKAGE_PYTHON_PY_ONLY
bool ".py sources only"
config BR2_PACKAGE_PYTHON_PYC_ONLY
bool ".pyc compiled sources only"
config BR2_PACKAGE_PYTHON_PY_PYC
bool ".py sources and .pyc compiled"
endchoice
menu "core python modules"
comment "The following modules are unusual or require extra libraries"
config BR2_PACKAGE_PYTHON_BZIP2
select BR2_PACKAGE_BZIP2
bool "bzip2 module"
help
bzip2 module for Python
config BR2_PACKAGE_PYTHON_BSDDB
select BR2_PACKAGE_BERKELEYDB
bool "bsddb module"
help
bsddb module for Python.
config BR2_PACKAGE_PYTHON_CODECSCJK
bool "codecscjk module"
help
Chinese/Japanese/Korean codecs module for Python (large).
config BR2_PACKAGE_PYTHON_CURSES
select BR2_PACKAGE_NCURSES
bool "curses module"
help
curses module for Python.
config BR2_PACKAGE_PYTHON_OSSAUDIODEV
bool "ossaudiodev module"
help
ossaudiodev module for Python.
config BR2_PACKAGE_PYTHON_READLINE
select BR2_PACKAGE_READLINE
bool "readline"
help
readline module for Python (required for command-line
editing in the Python shell).
config BR2_PACKAGE_PYTHON_SSL
select BR2_PACKAGE_OPENSSL
bool "ssl"
help
_ssl module for Python (required for https in urllib etc).
config BR2_PACKAGE_PYTHON_UNICODEDATA
bool "unicodedata module"
default y
help
Unicode character database (used by stringprep module) (large).
if BR2_PACKAGE_PYTHON_UNICODEDATA
choice
prompt "Python unicode database format"
default BR2_PACKAGE_PYTHON_UCS2
help
Select Python unicode database format for target
config BR2_PACKAGE_PYTHON_UCS2
bool "Universal Character Set 2-byte (UCS2)"
config BR2_PACKAGE_PYTHON_UCS4
bool "Universal Character Set 4-byte (UCS4)"
endchoice
endif
config BR2_PACKAGE_PYTHON_SQLITE
bool "sqlite module"
select BR2_PACKAGE_SQLITE
help
SQLite database support
config BR2_PACKAGE_PYTHON_PYEXPAT
select BR2_PACKAGE_EXPAT
bool "xml module"
help
pyexpat and xml libraries for Python
config BR2_PACKAGE_PYTHON_ZLIB
bool "zlib module"
select BR2_PACKAGE_ZLIB
help
zlib support in Python
config BR2_PACKAGE_PYTHON_HASHLIB
bool "hashlib module"
select BR2_PACKAGE_OPENSSL
help
hashlib support in Python
endmenu
endif
|
shibajee/buildroot
|
package/python/Config.in
|
in
|
mit
| 2,839 |
# From https://www.python.org/downloads/release/python-2712/
md5 57dffcee9cee8bb2ab5f82af1d8e9a69 Python-2.7.12.tar.xz
# Locally calculated
sha256 d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978 Python-2.7.12.tar.xz
|
shibajee/buildroot
|
package/python/python.hash
|
hash
|
mit
| 234 |
################################################################################
#
# python
#
################################################################################
PYTHON_VERSION_MAJOR = 2.7
PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).12
PYTHON_SOURCE = Python-$(PYTHON_VERSION).tar.xz
PYTHON_SITE = http://python.org/ftp/python/$(PYTHON_VERSION)
PYTHON_LICENSE = Python software foundation license v2, others
PYTHON_LICENSE_FILES = LICENSE
PYTHON_LIBTOOL_PATCH = NO
# Python needs itself to be built, so in order to cross-compile
# Python, we need to build a host Python first. This host Python is
# also installed in $(HOST_DIR), as it is needed when cross-compiling
# third-party Python modules.
HOST_PYTHON_CONF_OPTS += \
--enable-static \
--without-cxx-main \
--disable-sqlite3 \
--disable-tk \
--with-expat=system \
--disable-curses \
--disable-codecs-cjk \
--disable-nis \
--enable-unicodedata \
--disable-dbm \
--disable-gdbm \
--disable-bsddb \
--disable-test-modules \
--disable-bz2 \
--disable-ssl \
--disable-ossaudiodev \
--disable-pyo-build
# Make sure that LD_LIBRARY_PATH overrides -rpath.
# This is needed because libpython may be installed at the same time that
# python is called.
HOST_PYTHON_CONF_ENV += \
LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags"
# Building host python in parallel sometimes triggers a "Bus error"
# during the execution of "./python setup.py build" in the
# installation step. It is probably due to the installation of a
# shared library taking place in parallel to the execution of
# ./python, causing spurious Bus error. Building host-python with
# MAKE1 has shown to workaround the problem.
HOST_PYTHON_MAKE = $(MAKE1)
PYTHON_DEPENDENCIES = host-python libffi
HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
PYTHON_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y)
PYTHON_DEPENDENCIES += readline
endif
ifeq ($(BR2_PACKAGE_PYTHON_CURSES),y)
PYTHON_DEPENDENCIES += ncurses
else
PYTHON_CONF_OPTS += --disable-curses
endif
ifeq ($(BR2_PACKAGE_PYTHON_PYEXPAT),y)
PYTHON_DEPENDENCIES += expat
PYTHON_CONF_OPTS += --with-expat=system
else
PYTHON_CONF_OPTS += --with-expat=none
endif
ifeq ($(BR2_PACKAGE_PYTHON_BSDDB),y)
PYTHON_DEPENDENCIES += berkeleydb
else
PYTHON_CONF_OPTS += --disable-bsddb
endif
ifeq ($(BR2_PACKAGE_PYTHON_SQLITE),y)
PYTHON_DEPENDENCIES += sqlite
else
PYTHON_CONF_OPTS += --disable-sqlite3
endif
ifeq ($(BR2_PACKAGE_PYTHON_SSL),y)
PYTHON_DEPENDENCIES += openssl
else
PYTHON_CONF_OPTS += --disable-ssl
endif
ifneq ($(BR2_PACKAGE_PYTHON_CODECSCJK),y)
PYTHON_CONF_OPTS += --disable-codecs-cjk
endif
ifneq ($(BR2_PACKAGE_PYTHON_UNICODEDATA),y)
PYTHON_CONF_OPTS += --disable-unicodedata
endif
# Default is UCS2 w/o a conf opt
ifeq ($(BR2_PACKAGE_PYTHON_UCS4),y)
PYTHON_CONF_OPTS += --enable-unicode=ucs4
endif
ifeq ($(BR2_PACKAGE_PYTHON_BZIP2),y)
PYTHON_DEPENDENCIES += bzip2
else
PYTHON_CONF_OPTS += --disable-bz2
endif
ifeq ($(BR2_PACKAGE_PYTHON_ZLIB),y)
PYTHON_DEPENDENCIES += zlib
else
PYTHON_CONF_OPTS += --disable-zlib
endif
ifeq ($(BR2_PACKAGE_PYTHON_HASHLIB),y)
PYTHON_DEPENDENCIES += openssl
endif
ifeq ($(BR2_PACKAGE_PYTHON_OSSAUDIODEV),y)
PYTHON_CONF_OPTS += --enable-ossaudiodev
else
PYTHON_CONF_OPTS += --disable-ossaudiodev
endif
PYTHON_CONF_ENV += \
ac_cv_have_long_long_format=yes \
ac_cv_file__dev_ptmx=yes \
ac_cv_file__dev_ptc=yes \
ac_cv_working_tzset=yes
PYTHON_CONF_OPTS += \
--without-cxx-main \
--without-doc-strings \
--with-system-ffi \
--disable-pydoc \
--disable-test-modules \
--disable-lib2to3 \
--disable-gdbm \
--disable-tk \
--disable-nis \
--disable-dbm \
--disable-pyo-build \
--disable-pyc-build
# This is needed to make sure the Python build process doesn't try to
# regenerate those files with the pgen program. Otherwise, it builds
# pgen for the target, and tries to run it on the host.
define PYTHON_TOUCH_GRAMMAR_FILES
touch $(@D)/Include/graminit.h $(@D)/Python/graminit.c
endef
PYTHON_POST_PATCH_HOOKS += PYTHON_TOUCH_GRAMMAR_FILES
#
# Remove useless files. In the config/ directory, only the Makefile
# and the pyconfig.h files are needed at runtime.
#
# idle & smtpd.py have bad shebangs and are mostly samples
#
define PYTHON_REMOVE_USELESS_FILES
rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR)-config
rm -f $(TARGET_DIR)/usr/bin/python2-config
rm -f $(TARGET_DIR)/usr/bin/python-config
rm -f $(TARGET_DIR)/usr/bin/smtpd.py
for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/config/ \
-type f -not -name pyconfig.h -a -not -name Makefile` ; do \
rm -f $$i ; \
done
endef
PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES
#
# Make sure libpython gets stripped out on target
#
define PYTHON_ENSURE_LIBPYTHON_STRIPPED
chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR)*.so
endef
PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_ENSURE_LIBPYTHON_STRIPPED
# Always install the python symlink in the target tree
define PYTHON_INSTALL_TARGET_PYTHON_SYMLINK
ln -sf python2 $(TARGET_DIR)/usr/bin/python
endef
PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_INSTALL_TARGET_PYTHON_SYMLINK
# Always install the python-config symlink in the staging tree
define PYTHON_INSTALL_STAGING_PYTHON_CONFIG_SYMLINK
ln -sf python2-config $(STAGING_DIR)/usr/bin/python-config
endef
PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_INSTALL_STAGING_PYTHON_CONFIG_SYMLINK
PYTHON_AUTORECONF = YES
# Some packages may have build scripts requiring python2.
# Only install the python symlink in the host tree if python3 is not enabled
# for the target, otherwise the default python program may be missing.
ifneq ($(BR2_PACKAGE_PYTHON3),y)
define HOST_PYTHON_INSTALL_PYTHON_SYMLINK
ln -sf python2 $(HOST_DIR)/usr/bin/python
ln -sf python2-config $(HOST_DIR)/usr/bin/python-config
endef
HOST_PYTHON_POST_INSTALL_HOOKS += HOST_PYTHON_INSTALL_PYTHON_SYMLINK
endif
# Provided to other packages
PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/
$(eval $(autotools-package))
$(eval $(host-autotools-package))
define PYTHON_CREATE_PYC_FILES
PYTHONPATH="$(PYTHON_PATH)" \
$(HOST_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR) \
support/scripts/pycompile.py \
$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)
endef
ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON_PY_PYC),y)
PYTHON_TARGET_FINALIZE_HOOKS += PYTHON_CREATE_PYC_FILES
endif
ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
define PYTHON_REMOVE_PY_FILES
find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.py' -print0 | \
xargs -0 --no-run-if-empty rm -f
endef
PYTHON_TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PY_FILES
endif
# Normally, *.pyc files should not have been compiled, but just in
# case, we make sure we remove all of them.
ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y)
define PYTHON_REMOVE_PYC_FILES
find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.pyc' -print0 | \
xargs -0 --no-run-if-empty rm -f
endef
PYTHON_TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PYC_FILES
endif
# In all cases, we don't want to keep the optimized .pyo files
define PYTHON_REMOVE_PYO_FILES
find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.pyo' -print0 | \
xargs -0 --no-run-if-empty rm -f
endef
PYTHON_TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PYO_FILES
|
shibajee/buildroot
|
package/python/python.mk
|
mk
|
mit
| 7,380 |
From d6093bad6c700312ff7ff4a7bb15c815dda6f46b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:28:34 +0100
Subject: [PATCH] setup.py: do not add invalid header locations
This piece of code incorrectly adds /usr/include to
self.compiler.include_dirs, and results in the following invalid
compilation line:
/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc
-fPIC -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g
-O3 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -pipe -Os
-I./Include -I/usr/include -I. -IInclude
-I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include
-I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Include
-I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1
-c /home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.c
-o build/temp.linux-arm-3.4/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.o
cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
The -I/usr/include is wrong when cross compiling, so we disable adding
INCLUDEDIR and LIBDIR from the host when cross compiling.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index da67731..dbd2a3c 100644
--- a/setup.py
+++ b/setup.py
@@ -511,7 +511,8 @@ class PyBuildExt(build_ext):
add_dir_to_list(dir_list, directory)
if os.path.normpath(sys.base_prefix) != '/usr' \
- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
+ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
+ and not cross_compiling:
# 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
--
2.6.4
|
shibajee/buildroot
|
package/python3/0001-setup.py-do-not-add-invalid-header-locations.patch
|
patch
|
mit
| 2,162 |
From 4ac038d30ec71b3f223ac7c91613856dd82b6347 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:29:04 +0100
Subject: [PATCH] Change the install location of _sysconfigdata.py
The _sysconfigdata.py module contains definitions that are needed when
building Python modules. In cross-compilation mode, when building
Python extensions for the target, we need to use the _sysconfigdata.py
of the target Python while executing the host Python.
However until now, the _sysconfigdata.py module was installed in
build/lib.<arch>-<version> directory, together with a number of
architecture-specific shared objects, which cannot be used with the
host Python.
To solve this problem, this patch moves _sysconfigdata.py to a
separate location, build/sysconfigdata.<arch>-<version>/, and only
this directory gets added to the PYTHONPATH of the host Python
interpreter when building Python modules for the target.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Makefile.pre.in | 12 ++++++++++--
configure.ac | 2 +-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 823def3..4d2a061 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -585,6 +585,9 @@ pybuilddir.txt: $(BUILDPYTHON)
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
+ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt
+ mkdir -p `cat pysysconfigdatadir.txt`
+ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt`
# Build the shared modules
# Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
@@ -1235,7 +1238,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
else true; \
fi; \
done
- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \
+ @for i in $(srcdir)/Lib/*.py ; \
do \
if test -x $$i; then \
$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
@@ -1245,6 +1248,11 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
echo $(INSTALL_DATA) $$i $(LIBDEST); \
fi; \
done
+ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
+ $(DESTDIR)$(LIBDEST)
+ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata
+ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
+ $(DESTDIR)$(LIBDEST)/sysconfigdata
@for d in $(LIBSUBDIRS); \
do \
a=$(srcdir)/Lib/$$d; \
@@ -1580,7 +1588,7 @@ clean: pycremoval
find build -name 'fficonfig.h' -exec rm -f {} ';' || true
find build -name '*.py' -exec rm -f {} ';' || true
find build -name '*.py[co]' -exec rm -f {} ';' || true
- -rm -f pybuilddir.txt
+ -rm -f pybuilddir.txt pysysconfigdatadir.txt
-rm -f Lib/lib2to3/*Grammar*.pickle
-rm -f Programs/_testembed Programs/_freeze_importlib
-rm -rf build
diff --git a/configure.ac b/configure.ac
index 694293e..76b70a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,7 @@ if test "$cross_compiling" = yes; then
AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
fi
AC_MSG_RESULT($interp)
- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
+ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
fi
elif test "$cross_compiling" = maybe; then
AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
--
2.6.4
|
shibajee/buildroot
|
package/python3/0002-Change-the-install-location-of-_sysconfigdata.py.patch
|
patch
|
mit
| 3,731 |
From 28f81597314ea3ed03935b519453a55cf6c3c20d Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:29:35 +0100
Subject: [PATCH] Make the build of pyc files conditional
This commit adds a new configure option --disable-pyc-build to disable
the compilation of pyc.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Makefile.pre.in | 2 ++
configure.ac | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 4d2a061..272f312 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1283,6 +1283,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
fi
+ifeq (@PYC_BUILD@,yes)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
@@ -1310,6 +1311,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+endif
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
diff --git a/configure.ac b/configure.ac
index 76b70a0..66d4642 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1056,6 +1056,12 @@ fi
AC_MSG_CHECKING(LDLIBRARY)
+AC_SUBST(PYC_BUILD)
+
+AC_ARG_ENABLE(pyc-build,
+ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]),
+ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ])
+
# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
# library that we build, but we do not want to link against it (we
# will find it with a -framework option). For this reason there is an
--
2.6.4
|
shibajee/buildroot
|
package/python3/0003-Make-the-build-of-pyc-files-conditional.patch
|
patch
|
mit
| 1,972 |
From 093caf46b7a742ee2f7bcf617a915ac1653aa8ac Mon Sep 17 00:00:00 2001
From: Vanya Sergeev <vsergeev@gmail.com>
Date: Wed, 23 Dec 2015 11:30:33 +0100
Subject: [PATCH] Disable buggy_getaddrinfo configure test when cross-compiling
with IPv6 support
Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 66d4642..c492594 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3662,7 +3662,7 @@ fi
AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
-if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
+if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes
then
if test $ipv6 = yes
then
--
2.6.4
|
shibajee/buildroot
|
package/python3/0004-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch
|
patch
|
mit
| 774 |
From 3a9f4aa255909ed152883eee787313efd20dbc58 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:31:08 +0100
Subject: [PATCH] Add infrastructure to disable the build of certain extensions
Some of the extensions part of the Python core have dependencies on
external libraries (sqlite, tk, etc.) or are relatively big and not
necessarly always useful (CJK codecs for example). By extensions, we
mean part of Python modules that are written in C and therefore
compiled to binary code.
Therefore, we introduce a small infrastructure that allows to disable
some of those extensions. This can be done inside the configure.ac by
adding values to the DISABLED_EXTENSIONS variable (which is a
word-separated list of extensions).
The implementation works as follow :
* configure.ac defines a DISABLED_EXTENSIONS variable, which is
substituted (so that when Makefile.pre is generated from
Makefile.pre.in, the value of the variable is substituted). For
now, this DISABLED_EXTENSIONS variable is empty, later patches will
use it.
* Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the
variables passed in the environment when calling the setup.py
script that actually builds and installs those extensions.
* setup.py is modified so that the existing "disabled_module_list" is
filled with those pre-disabled extensions listed in
DISABLED_EXTENSIONS.
Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>, and
then extended by Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Makefile.pre.in | 6 +++++-
configure.ac | 2 ++
setup.py | 5 ++++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 272f312..9420860 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -182,6 +182,8 @@ FILEMODE= 644
# configure script arguments
CONFIG_ARGS= @CONFIG_ARGS@
+# disabled extensions
+DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
# Subdirectories with code
SRCDIRS= @SRCDIRS@
@@ -600,6 +602,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt
esac; \
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
# Build static library
@@ -1425,7 +1428,8 @@ libainstall: all python-config
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
diff --git a/configure.ac b/configure.ac
index c492594..bfb599e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2588,6 +2588,8 @@ LIBS="$withval $LIBS"
PKG_PROG_PKG_CONFIG
+AC_SUBST(DISABLED_EXTENSIONS)
+
# Check for use of the system expat library
AC_MSG_CHECKING(for --with-system-expat)
AC_ARG_WITH(system_expat,
diff --git a/setup.py b/setup.py
index dbd2a3c..1ebfa50 100644
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,10 @@ host_platform = get_platform()
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
+try:
+ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
+except KeyError:
+ disabled_module_list = list()
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (after any relative
--
2.6.4
|
shibajee/buildroot
|
package/python3/0005-Add-infrastructure-to-disable-the-build-of-certain-e.patch
|
patch
|
mit
| 3,823 |
From 7c560d917ee0e536c76fac275d1cb0b6136269ab Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:32:23 +0100
Subject: [PATCH] distutils/sysconfig: use sysconfigdata
In order to make the use of sysconfig cross-compilation compatible,
use _sysconfigdata.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Lib/distutils/sysconfig.py | 37 ++++---------------------------------
1 file changed, 4 insertions(+), 33 deletions(-)
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 573724d..721edec 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -414,40 +414,11 @@ def expand_makefile_vars(s, vars):
_config_vars = None
def _init_posix():
- """Initialize the module as appropriate for POSIX systems."""
- g = {}
- # load the installed Makefile:
- try:
- filename = get_makefile_filename()
- parse_makefile(filename, g)
- except OSError as msg:
- my_msg = "invalid Python installation: unable to open %s" % filename
- if hasattr(msg, "strerror"):
- my_msg = my_msg + " (%s)" % msg.strerror
-
- raise DistutilsPlatformError(my_msg)
-
- # load the installed pyconfig.h:
- try:
- filename = get_config_h_filename()
- with open(filename) as file:
- parse_config_h(file, g)
- except OSError as msg:
- my_msg = "invalid Python installation: unable to open %s" % filename
- if hasattr(msg, "strerror"):
- my_msg = my_msg + " (%s)" % msg.strerror
-
- raise DistutilsPlatformError(my_msg)
-
- # On AIX, there are wrong paths to the linker scripts in the Makefile
- # -- these paths are relative to the Python source, but when installed
- # the scripts are in another directory.
- if python_build:
- g['LDSHARED'] = g['BLDSHARED']
-
+ # _sysconfigdata is generated at build time, see the sysconfig module
+ from _sysconfigdata import build_time_vars
global _config_vars
- _config_vars = g
-
+ _config_vars = {}
+ _config_vars.update(build_time_vars)
def _init_nt():
"""Initialize the module as appropriate for NT"""
--
2.6.4
|
shibajee/buildroot
|
package/python3/0006-distutils-sysconfig-use-sysconfigdata.patch
|
patch
|
mit
| 2,228 |
From e634929f76a45f5b683dc19bc01efed2ab83e19e Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:33:14 +0100
Subject: [PATCH] Adjust library/header paths for cross-compilation
When cross-compiling third-party extensions, the get_python_inc() or
get_python_lib() can be called, to return the path to headers or
libraries. However, they use the sys.prefix of the host Python, which
returns incorrect paths when cross-compiling (paths pointing to host
headers and libraries).
In order to fix this, we introduce the _python_sysroot, _python_prefix
and _python_exec_prefix variables, that allow to override these
values, and get correct header/library paths when cross-compiling
third-party Python modules.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Lib/distutils/command/build_ext.py | 5 ++++-
Lib/distutils/sysconfig.py | 15 +++++++++++----
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index d4cb11e..e7a0ba9 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -232,7 +232,10 @@ class build_ext(Command):
if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
if not sysconfig.python_build:
# building third party extensions
- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
+ libdir = sysconfig.get_config_var('LIBDIR')
+ if "_python_sysroot" in os.environ:
+ libdir = os.environ.get("_python_sysroot") + libdir
+ self.library_dirs.append(libdir)
else:
# building python standard extensions
self.library_dirs.append('.')
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 721edec..d20e2d8 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -17,10 +17,17 @@ import sys
from .errors import DistutilsPlatformError
# These are needed in a couple of spots, so just compute them once.
-PREFIX = os.path.normpath(sys.prefix)
-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-BASE_PREFIX = os.path.normpath(sys.base_prefix)
-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
+if "_python_sysroot" in os.environ:
+ _sysroot=os.environ.get('_python_sysroot')
+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
+ BASE_PREFIX = PREFIX
+ BASE_EXEC_PREFIX = EXEC_PREFIX
+else:
+ PREFIX = os.path.normpath(sys.prefix)
+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+ BASE_PREFIX = os.path.normpath(sys.base_prefix)
+ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
# Path to the base directory of the project. On Windows the binary may
# live in project/PCBuild/win32 or project/PCBuild/amd64.
--
2.6.4
|
shibajee/buildroot
|
package/python3/0007-Adjust-library-header-paths-for-cross-compilation.patch
|
patch
|
mit
| 3,010 |
From d7c568632f7cb83346096ea114a06f89a0b488d6 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:36:00 +0100
Subject: [PATCH] Don't look in /usr/lib/termcap for libraries
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/setup.py b/setup.py
index 1ebfa50..24a7153 100644
--- a/setup.py
+++ b/setup.py
@@ -753,12 +753,9 @@ class PyBuildExt(build_ext):
pass # Issue 7384: Already linked against curses or tinfo.
elif curses_library:
readline_libs.append(curses_library)
- elif self.compiler.find_library_file(lib_dirs +
- ['/usr/lib/termcap'],
- 'termcap'):
+ elif self.compiler.find_library_file(lib_dirs, 'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
--
2.6.4
|
shibajee/buildroot
|
package/python3/0008-Don-t-look-in-usr-lib-termcap-for-libraries.patch
|
patch
|
mit
| 1,309 |
From bac5ac529cc0902a340a5cd03308433c6e80d1f6 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:36:27 +0100
Subject: [PATCH] Don't add multiarch paths
The add_multiarch_paths() function leads, in certain build
environments, to the addition of host header paths to the CFLAGS,
which is not appropriate for cross-compilation. This patch fixes that
by simply removing the call to add_multiarch_paths() when we're
cross-compiling.
Investigation done by David <buildroot-2014@inbox.com>.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 24a7153..8380a64 100644
--- a/setup.py
+++ b/setup.py
@@ -474,10 +474,10 @@ class PyBuildExt(build_ext):
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')
+ self.add_multiarch_paths()
# only change this for cross builds for 3.3, issues on Mageia
if cross_compiling:
self.add_gcc_paths()
- self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
# CPPFLAGS for header and library files.
--
2.6.4
|
shibajee/buildroot
|
package/python3/0009-Don-t-add-multiarch-paths.patch
|
patch
|
mit
| 1,363 |
From 86ef08e36597e14cac06aef176f12375a27fdef5 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:43:24 +0100
Subject: [PATCH] Abort on failed module build
When building a Python module fails, the setup.py script currently
doesn't exit with an error, and simply continues. This is not a really
nice behavior, so this patch changes setup.py to abort with an error,
so that the build issue is clearly noticeable.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/setup.py b/setup.py
index 8380a64..15b39f5 100644
--- a/setup.py
+++ b/setup.py
@@ -296,6 +296,7 @@ class PyBuildExt(build_ext):
print("Failed to build these modules:")
print_three_column(failed)
print()
+ sys.exit(1)
if self.failed_on_import:
failed = self.failed_on_import[:]
--
2.6.4
|
shibajee/buildroot
|
package/python3/0010-Abort-on-failed-module-build.patch
|
patch
|
mit
| 972 |
From ace3ebd517ea0ac42208b6a06c7e8f82da3b9c1b Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch@tkos.co.il>
Date: Wed, 23 Dec 2015 11:44:02 +0100
Subject: [PATCH] Serial ioctl() workaround
The ioctls.h of some architectures (notably xtensa) references structs from
linux/serial.h. Make sure to include this header as well.
Also, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct,
but isn't actually referenced in modern kernels.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
Modules/termios.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Modules/termios.c b/Modules/termios.c
index b78d33e..58b0444 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -9,7 +9,9 @@
#endif
#include <termios.h>
+#include <linux/serial.h>
#include <sys/ioctl.h>
+#undef TIOCTTYGSTRUCT
/* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR,
* MDTR, MRI, and MRTS (appearantly used internally by some things
--
2.6.4
|
shibajee/buildroot
|
package/python3/0011-Serial-ioctl-workaround.patch
|
patch
|
mit
| 972 |
From 45f482813de828415906e6a416c9c35450c38da7 Mon Sep 17 00:00:00 2001
From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Date: Wed, 23 Dec 2015 11:44:30 +0100
Subject: [PATCH] Do not adjust the shebang of Python scripts for
cross-compilation
The copy_scripts() method in distutils copies the scripts listed in
the setup file and adjusts the first line to refer to the current
Python interpreter. When cross-compiling, this means that the adjusted
shebang refers to the host Python interpreter.
This patch modifies copy_scripts() to preserve the shebang when
cross-compilation is detected.
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
---
Lib/distutils/command/build_scripts.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py
index 90a8380..bdf4cf1 100644
--- a/Lib/distutils/command/build_scripts.py
+++ b/Lib/distutils/command/build_scripts.py
@@ -91,7 +91,7 @@ class build_scripts(Command):
adjust = True
post_interp = match.group(1) or b''
- if adjust:
+ if adjust and not '_python_sysroot' in os.environ:
log.info("copying and adjusting %s -> %s", script,
self.build_dir)
updated_files.append(outfile)
--
2.6.4
|
shibajee/buildroot
|
package/python3/0012-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch
|
patch
|
mit
| 1,368 |
From 5858abdc25acd522869103d64b60a0c9687e2ec1 Mon Sep 17 00:00:00 2001
From: Peter Korsgaard <peter@korsgaard.com>
Date: Thu, 20 Nov 2014 13:24:59 +0100
Subject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only match
beginning of strings
The build/real prefix handling using sed breaks if build != real and the
standard include / lib directories are used ($prefix/include and $prefix/lib).
E.G.
prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include".
If this gets installed with make DESTDIR="/foo" install, then we end up with
prefix_real = prefix = "/foo/usr" as expected, but
includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because of
the double sed invocation (prefix is already expanded). Work around it by
ensuring we only match the beginning of the string.
Submitted upstream: http://bugs.python.org/issue22907
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
Misc/python-config.sh.in | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
index 30c6927..f905a71 100644
--- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in
@@ -29,12 +29,12 @@ prefix_real=$(installed_prefix "$0")
# Use sed to fix paths from their built-to locations to their installed-to
# locations.
-prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#")
+prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#")
exec_prefix_build="@exec_prefix@"
-exec_prefix=$(echo "$exec_prefix_build" | sed "s#$exec_prefix_build#$prefix_real#")
-includedir=$(echo "@includedir@" | sed "s#$prefix_build#$prefix_real#")
-libdir=$(echo "@libdir@" | sed "s#$prefix_build#$prefix_real#")
-CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix_build#$prefix_real#")
+exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#")
+includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#")
+libdir=$(echo "@libdir@" | sed "s#^$prefix_build#$prefix_real#")
+CFLAGS=$(echo "@CFLAGS@" | sed "s#^$prefix_build#$prefix_real#")
VERSION="@VERSION@"
LIBM="@LIBM@"
LIBC="@LIBC@"
@@ -48,7 +48,7 @@ OPT="@OPT@"
PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
LDVERSION="@LDVERSION@"
LIBDEST=${prefix}/lib/python${VERSION}
-LIBPL=$(echo "@LIBPL@" | sed "s#$prefix_build#$prefix_real#")
+LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#")
SO="@EXT_SUFFIX@"
PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}"
--
2.6.4
|
shibajee/buildroot
|
package/python3/0013-Misc-python-config.sh.in-ensure-sed-invocations-only.patch
|
patch
|
mit
| 2,516 |
From be44636b36086ca1b6de24265b7c3cc0c2bae913 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:45:13 +0100
Subject: [PATCH] Do not harcode invalid path to ncursesw headers
Adding /usr/include/ncursesw is obviously invalid when
cross-compiling. Since the ncursesw headers are no longer installed in
usr/include/ncursesw/, but directly in usr/include, there is anyway no
need for a special header path.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/setup.py b/setup.py
index 15b39f5..9e08e7e 100644
--- a/setup.py
+++ b/setup.py
@@ -1296,7 +1296,6 @@ class PyBuildExt(build_ext):
panel_library = 'panel'
if curses_library == 'ncursesw':
curses_defines.append(('HAVE_NCURSESW', '1'))
- curses_includes.append('/usr/include/ncursesw')
# Bug 1464056: If _curses.so links with ncursesw,
# _curses_panel.so must link with panelw.
panel_library = 'panelw'
--
2.6.4
|
shibajee/buildroot
|
package/python3/0014-Do-not-harcode-invalid-path-to-ncursesw-headers.patch
|
patch
|
mit
| 1,094 |
From 46fda6fc83500bf5663397f9d28b618e6b6b20c1 Mon Sep 17 00:00:00 2001
From: Samuel Cabrero <samuelcabrero@gmail.com>
Date: Wed, 23 Dec 2015 11:45:48 +0100
Subject: [PATCH] Override system locale and set to default when adding gcc
paths
Forces the use of the default locale in the function
add_gcc_paths, which is called when cross compiling to add the
include and library paths. This is necessary because otherwise
the gcc output is localized and the output parsing fails, which
results in no paths added and detect_modules not able to find
any system library (eg. libz, libssl, etc.)
[Thomas: patch taken from https://bugs.python.org/issue23767.]
Signed-off-by: Samuel Cabrero <samuelcabrero@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 9e08e7e..3feca04 100644
--- a/setup.py
+++ b/setup.py
@@ -441,7 +441,7 @@ class PyBuildExt(build_ext):
tmpfile = os.path.join(self.build_temp, 'gccpaths')
if not os.path.exists(self.build_temp):
os.makedirs(self.build_temp)
- ret = os.system('%s -E -v - </dev/null 2>%s 1>/dev/null' % (gcc, tmpfile))
+ ret = os.system('LC_ALL=C %s -E -v - </dev/null 2>%s 1>/dev/null' % (gcc, tmpfile))
is_gcc = False
in_incdirs = False
inc_dirs = []
--
2.6.4
|
shibajee/buildroot
|
package/python3/0015-Override-system-locale-and-set-to-default-when-addin.patch
|
patch
|
mit
| 1,405 |
From d2b5be9a0627e38d2280ef865dab3e74b7d2bde4 Mon Sep 17 00:00:00 2001
From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
Date: Wed, 23 Dec 2015 11:46:14 +0100
Subject: [PATCH] Add importlib fix for PEP 3147 issue
Python 3 has a new standard for installing .pyc file, called PEP
3147. Unfortunately, this standard requires both the .py and .pyc
files to be installed for a Python module to be found. This is quite
annoying on space-constrained embedded systems, since the .py file is
technically not required for execution.
This patch changes cache_from_source() and source_from_cache() in
importlib to get rid of the "__pycache__" directory.
This effectively disables PEP 3147 for:
* The python standard library
* Packages built with distutils or setuptools
* Packages built with automake that use the `py-compile` helper
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
---
Lib/importlib/_bootstrap_external.py | 37 +++++-------------------------------
1 file changed, 5 insertions(+), 32 deletions(-)
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index 616b17f..e30129c 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -255,8 +255,6 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
a True value is the same as setting 'optimization' to the empty string
while a False value is equivalent to setting 'optimization' to '1'.
- If sys.implementation.cache_tag is None then NotImplementedError is raised.
-
"""
if debug_override is not None:
_warnings.warn('the debug_override parameter is deprecated; use '
@@ -267,10 +265,7 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
optimization = '' if debug_override else 1
head, tail = _path_split(path)
base, sep, rest = tail.rpartition('.')
- tag = sys.implementation.cache_tag
- if tag is None:
- raise NotImplementedError('sys.implementation.cache_tag is None')
- almost_filename = ''.join([(base if base else rest), sep, tag])
+ almost_filename = ''.join([(base if base else rest)])
if optimization is None:
if sys.flags.optimize == 0:
optimization = ''
@@ -281,39 +276,17 @@ def cache_from_source(path, debug_override=None, *, optimization=None):
if not optimization.isalnum():
raise ValueError('{!r} is not alphanumeric'.format(optimization))
almost_filename = '{}.{}{}'.format(almost_filename, _OPT, optimization)
- return _path_join(head, _PYCACHE, almost_filename + BYTECODE_SUFFIXES[0])
+ return _path_join(head, almost_filename + BYTECODE_SUFFIXES[0])
def source_from_cache(path):
"""Given the path to a .pyc. file, return the path to its .py file.
The .pyc file does not need to exist; this simply returns the path to
- the .py file calculated to correspond to the .pyc file. If path does
- not conform to PEP 3147/488 format, ValueError will be raised. If
- sys.implementation.cache_tag is None then NotImplementedError is raised.
-
+ the .py file calculated to correspond to the .pyc file.
"""
- if sys.implementation.cache_tag is None:
- raise NotImplementedError('sys.implementation.cache_tag is None')
- head, pycache_filename = _path_split(path)
- head, pycache = _path_split(head)
- if pycache != _PYCACHE:
- raise ValueError('{} not bottom-level directory in '
- '{!r}'.format(_PYCACHE, path))
- dot_count = pycache_filename.count('.')
- if dot_count not in {2, 3}:
- raise ValueError('expected only 2 or 3 dots in '
- '{!r}'.format(pycache_filename))
- elif dot_count == 3:
- optimization = pycache_filename.rsplit('.', 2)[-2]
- if not optimization.startswith(_OPT):
- raise ValueError("optimization portion of filename does not start "
- "with {!r}".format(_OPT))
- opt_level = optimization[len(_OPT):]
- if not opt_level.isalnum():
- raise ValueError("optimization level {!r} is not an alphanumeric "
- "value".format(optimization))
- base_filename = pycache_filename.partition('.')[0]
+ head, filename = _path_split(path)
+ base_filename = filename.partition('.')[0]
return _path_join(head, base_filename + SOURCE_SUFFIXES[0])
--
2.6.4
|
shibajee/buildroot
|
package/python3/0016-Add-importlib-fix-for-PEP-3147-issue.patch
|
patch
|
mit
| 4,454 |
From 1d2891204c6bf05d5e2eb0e5fa2ee78f6a2b755b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:47:00 +0100
Subject: [PATCH] Add an option to disable installation of test modules
The Python standard distribution comes with many test modules, that
are not necessarly useful on embedded targets.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 56 ++++++++++++++++++++++++++++++++++++--------------------
configure.ac | 6 ++++++
2 files changed, 42 insertions(+), 20 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 9420860..d4c771a 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1166,8 +1166,30 @@ maninstall: altmaninstall
PLATDIR= @PLATDIR@
MACHDEPS= $(PLATDIR)
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
-LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
- tkinter/test/test_ttk site-packages test \
+LIBSUBDIRS= tkinter \
+ site-packages \
+ asyncio \
+ collections concurrent concurrent/futures encodings \
+ email email/mime \
+ ensurepip ensurepip/_bundled \
+ html json http dbm xmlrpc \
+ sqlite3 \
+ logging csv wsgiref urllib \
+ lib2to3 lib2to3/fixes lib2to3/pgen2 \
+ ctypes ctypes/macholib \
+ idlelib idlelib/Icons \
+ distutils distutils/command $(XMLLIBSUBDIRS) \
+ importlib \
+ turtledemo \
+ multiprocessing multiprocessing/dummy \
+ unittest \
+ venv venv/scripts venv/scripts/posix \
+ curses pydoc_data $(MACHDEPS)
+
+TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
+ test test/test_asyncio \
+ test/test_email test/test_email/data \
+ test/test_json \
test/audiodata \
test/capath test/data \
test/cjkencodings test/decimaltestdata test/xmltestdata \
@@ -1199,28 +1221,22 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \
test/test_importlib/namespace_pkgs/project3/parent/child \
test/test_importlib/namespace_pkgs/module_and_namespace_package \
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
- asyncio \
- test/test_asyncio \
- collections concurrent concurrent/futures encodings \
- email email/mime test/test_email test/test_email/data \
- ensurepip ensurepip/_bundled \
- html json test/test_json http dbm xmlrpc \
- sqlite3 sqlite3/test \
- logging csv wsgiref urllib \
- lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
+ sqlite3/test \
+ lib2to3/tests \
lib2to3/tests/data lib2to3/tests/data/fixers \
lib2to3/tests/data/fixers/myfixes \
- ctypes ctypes/test ctypes/macholib \
- idlelib idlelib/Icons idlelib/idle_test \
- distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
- importlib test/test_importlib test/test_importlib/builtin \
+ ctypes/test \
+ idlelib/idle_test \
+ distutils/tests \
+ test/test_importlib test/test_importlib/builtin \
test/test_importlib/extension test/test_importlib/frozen \
test/test_importlib/import_ test/test_importlib/source \
- turtledemo \
- multiprocessing multiprocessing/dummy \
- unittest unittest/test unittest/test/testmock \
- venv venv/scripts venv/scripts/posix \
- curses pydoc_data $(MACHDEPS)
+ unittest/test unittest/test/testmock
+
+ifeq (@TEST_MODULES@,yes)
+LIBSUBDIRS += $(TESTSUBDIRS)
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
diff --git a/configure.ac b/configure.ac
index bfb599e..9f3d226 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2895,6 +2895,12 @@ if test "$posix_threads" = "yes"; then
fi
+AC_SUBST(TEST_MODULES)
+
+AC_ARG_ENABLE(test-modules,
+ AS_HELP_STRING([--disable-test-modules], [disable test modules]),
+ [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
--
2.6.4
|
shibajee/buildroot
|
package/python3/0017-Add-an-option-to-disable-installation-of-test-module.patch
|
patch
|
mit
| 4,026 |
From a83b79b964700604de386800f86e5a55f53a0e17 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:47:11 +0100
Subject: [PATCH] Add an option to disable pydoc
It removes 0.5 MB of data from the target plus the pydoc script
itself.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 8 +++++++-
configure.ac | 5 +++++
setup.py | 9 +++++++--
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index d4c771a..a98ad65 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1134,7 +1134,9 @@ bininstall: altbininstall
-rm -f $(DESTDIR)$(BINDIR)/idle3
(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
+ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
+endif
-rm -f $(DESTDIR)$(BINDIR)/2to3
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
@@ -1184,7 +1186,7 @@ LIBSUBDIRS= tkinter \
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/posix \
- curses pydoc_data $(MACHDEPS)
+ curses $(MACHDEPS)
TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
test test/test_asyncio \
@@ -1233,6 +1235,10 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
test/test_importlib/import_ test/test_importlib/source \
unittest/test unittest/test/testmock
+ifeq (@PYDOC@,yes)
+LIBSUBDIRS += pydoc_data
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
diff --git a/configure.ac b/configure.ac
index 9f3d226..e9b6d6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2894,6 +2894,11 @@ if test "$posix_threads" = "yes"; then
AC_CHECK_FUNCS(pthread_atfork)
fi
+AC_SUBST(PYDOC)
+
+AC_ARG_ENABLE(pydoc,
+ AS_HELP_STRING([--disable-pydoc], [disable pydoc]),
+ [ PYDOC="${enableval}" ], [ PYDOC=yes ])
AC_SUBST(TEST_MODULES)
diff --git a/setup.py b/setup.py
index 3feca04..137911d 100644
--- a/setup.py
+++ b/setup.py
@@ -2220,6 +2220,12 @@ def main():
# turn off warnings when deprecated modules are imported
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
+
+ scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3',
+ 'Lib/smtpd.py']
+ if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
+ scripts += [ 'Tools/scripts/pydoc3' ]
+
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
@@ -2244,8 +2250,7 @@ def main():
# If you change the scripts installed here, you also need to
# check the PyBuildScripts command above, and change the links
# created by the bininstall target in Makefile.pre.in
- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
- "Tools/scripts/2to3", "Tools/scripts/pyvenv"]
+ scripts = scripts,
)
# --install-platlib
--
2.6.4
|
shibajee/buildroot
|
package/python3/0018-Add-an-option-to-disable-pydoc.patch
|
patch
|
mit
| 3,144 |
From 3c877ea9f09913586f87064b7a2b9d2b49cb05aa Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:48:44 +0100
Subject: [PATCH] Add an option to disable lib2to3
lib2to3 is a library to convert Python 2.x code to Python 3.x. As
such, it is probably not very useful on embedded system targets.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 16 ++++++++++++----
configure.ac | 6 ++++++
setup.py | 5 +++--
3 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index a98ad65..3823940 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1138,7 +1138,9 @@ ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
endif
-rm -f $(DESTDIR)$(BINDIR)/2to3
+ifeq (@LIB2TO3@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
+endif
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
(cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv)
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
@@ -1177,7 +1179,6 @@ LIBSUBDIRS= tkinter \
html json http dbm xmlrpc \
sqlite3 \
logging csv wsgiref urllib \
- lib2to3 lib2to3/fixes lib2to3/pgen2 \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
distutils distutils/command $(XMLLIBSUBDIRS) \
@@ -1224,9 +1225,6 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
test/test_importlib/namespace_pkgs/module_and_namespace_package \
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
sqlite3/test \
- lib2to3/tests \
- lib2to3/tests/data lib2to3/tests/data/fixers \
- lib2to3/tests/data/fixers/myfixes \
ctypes/test \
idlelib/idle_test \
distutils/tests \
@@ -1239,6 +1237,14 @@ ifeq (@PYDOC@,yes)
LIBSUBDIRS += pydoc_data
endif
+ifeq (@LIB2TO3@,yes)
+LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
+TESTSUBDIRS += lib2to3/tests \
+ lib2to3/tests/data \
+ lib2to3/tests/data/fixers \
+ lib2to3/tests/data/fixers/myfixes
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
@@ -1337,10 +1343,12 @@ ifeq (@PYC_BUILD@,yes)
-d $(LIBDEST)/site-packages -f \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
endif
+ifeq (@LIB2TO3@,yes)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
+endif
# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
diff --git a/configure.ac b/configure.ac
index e9b6d6f..652ad88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2906,6 +2906,12 @@ AC_ARG_ENABLE(test-modules,
AS_HELP_STRING([--disable-test-modules], [disable test modules]),
[ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
+AC_SUBST(LIB2TO3)
+
+AC_ARG_ENABLE(lib2to3,
+ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
+ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
diff --git a/setup.py b/setup.py
index 137911d..722308b 100644
--- a/setup.py
+++ b/setup.py
@@ -2221,10 +2221,11 @@ def main():
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
- scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3',
- 'Lib/smtpd.py']
+ scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py']
if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
scripts += [ 'Tools/scripts/pydoc3' ]
+ if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"):
+ scripts += [ 'Tools/scripts/2to3' ]
setup(# PyPI Metadata (PEP 301)
name = "Python",
--
2.6.4
|
shibajee/buildroot
|
package/python3/0019-Add-an-option-to-disable-lib2to3.patch
|
patch
|
mit
| 4,016 |
From 9ae1dce0a2fa01fc3dbc83d8b8c1b56e4b1b162b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:01 +0100
Subject: [PATCH] Add option to disable the sqlite3 module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 7 +++++--
configure.ac | 9 +++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 3823940..c822dbd 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1177,7 +1177,6 @@ LIBSUBDIRS= tkinter \
email email/mime \
ensurepip ensurepip/_bundled \
html json http dbm xmlrpc \
- sqlite3 \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
@@ -1224,7 +1223,6 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
test/test_importlib/namespace_pkgs/project3/parent/child \
test/test_importlib/namespace_pkgs/module_and_namespace_package \
test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \
- sqlite3/test \
ctypes/test \
idlelib/idle_test \
distutils/tests \
@@ -1245,6 +1243,11 @@ TESTSUBDIRS += lib2to3/tests \
lib2to3/tests/data/fixers/myfixes
endif
+ifeq (@SQLITE3@,yes)
+LIBSUBDIRS += sqlite3
+TESTSUBDIRS += sqlite3/test
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
diff --git a/configure.ac b/configure.ac
index 652ad88..cae12ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2894,6 +2894,15 @@ if test "$posix_threads" = "yes"; then
AC_CHECK_FUNCS(pthread_atfork)
fi
+AC_SUBST(SQLITE3)
+AC_ARG_ENABLE(sqlite3,
+ AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]),
+ [ SQLITE3="${enableval}" ], [ SQLITE3=yes ])
+
+if test "$SQLITE3" = "no" ; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
+fi
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
--
2.6.4
|
shibajee/buildroot
|
package/python3/0020-Add-option-to-disable-the-sqlite3-module.patch
|
patch
|
mit
| 1,996 |
From d0d42570e5a23c3bf559e0413ec97729fd2f9e24 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:14 +0100
Subject: [PATCH] Add an option to disable the tk module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 11 ++++++++---
configure.ac | 9 +++++++++
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index c822dbd..0a93c27 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1170,7 +1170,7 @@ maninstall: altmaninstall
PLATDIR= @PLATDIR@
MACHDEPS= $(PLATDIR)
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
-LIBSUBDIRS= tkinter \
+LIBSUBDIRS= \
site-packages \
asyncio \
collections concurrent concurrent/futures encodings \
@@ -1188,8 +1188,7 @@ LIBSUBDIRS= tkinter \
venv venv/scripts venv/scripts/posix \
curses $(MACHDEPS)
-TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
- test test/test_asyncio \
+TESTSUBDIRS = test test/test_asyncio \
test/test_email test/test_email/data \
test/test_json \
test/audiodata \
@@ -1248,6 +1247,12 @@ LIBSUBDIRS += sqlite3
TESTSUBDIRS += sqlite3/test
endif
+ifeq (@TK@,yes)
+LIBSUBDIRS += tkinter
+TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
+ tkinter/test/test_ttk
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
diff --git a/configure.ac b/configure.ac
index cae12ad..787b185 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2903,6 +2903,15 @@ if test "$SQLITE3" = "no" ; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
+AC_SUBST(TK)
+AC_ARG_ENABLE(tk,
+ AS_HELP_STRING([--disable-tk], [disable tk]),
+ [ TK="${enableval}" ], [ TK=yes ])
+
+if test "$TK" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
+fi
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
--
2.6.4
|
shibajee/buildroot
|
package/python3/0021-Add-an-option-to-disable-the-tk-module.patch
|
patch
|
mit
| 1,978 |
From d04ec780bf7c0825ab260bd1d6b7292141b2dcde Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:30 +0100
Subject: [PATCH] Add an option to disable the curses module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 6 +++++-
configure.ac | 9 +++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 0a93c27..b97c21e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1186,7 +1186,7 @@ LIBSUBDIRS= \
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/posix \
- curses $(MACHDEPS)
+ $(MACHDEPS)
TESTSUBDIRS = test test/test_asyncio \
test/test_email test/test_email/data \
@@ -1253,6 +1253,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
tkinter/test/test_ttk
endif
+ifeq (@CURSES@,yes)
+LIBSUBDIRS += curses
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
diff --git a/configure.ac b/configure.ac
index 787b185..0be47b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2912,6 +2912,15 @@ if test "$TK" = "no"; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
fi
+AC_SUBST(CURSES)
+AC_ARG_ENABLE(curses,
+ AS_HELP_STRING([--disable-curses], [disable curses]),
+ [ CURSES="${enableval}" ], [ CURSES=yes ])
+
+if test "$CURSES" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel"
+fi
+
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
--
2.6.4
|
shibajee/buildroot
|
package/python3/0022-Add-an-option-to-disable-the-curses-module.patch
|
patch
|
mit
| 1,601 |
From 6281850ee8c3fb6d93b4997833af0cca4a48947b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:42 +0100
Subject: [PATCH] Add an option to disable expat
This patch replaces the existing --with-system-expat option with a
--with-expat={system,builtin,none} option, which allows to tell Python
whether we want to use the system expat (already installed), the expat
builtin the Python sources, or no expat at all (which disables the
installation of XML modules).
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
Makefile.pre.in | 6 +++++-
configure.ac | 18 +++++++++++++-----
setup.py | 2 +-
3 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index b97c21e..bdfee19 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1180,7 +1180,7 @@ LIBSUBDIRS= \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
idlelib idlelib/Icons \
- distutils distutils/command $(XMLLIBSUBDIRS) \
+ distutils distutils/command \
importlib \
turtledemo \
multiprocessing multiprocessing/dummy \
@@ -1257,6 +1257,10 @@ ifeq (@CURSES@,yes)
LIBSUBDIRS += curses
endif
+ifeq (@EXPAT@,yes)
+LIBSUBDIRS += $(XMLLIBSUBDIRS)
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
diff --git a/configure.ac b/configure.ac
index 0be47b2..e6bcacc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2591,13 +2591,21 @@ PKG_PROG_PKG_CONFIG
AC_SUBST(DISABLED_EXTENSIONS)
# Check for use of the system expat library
-AC_MSG_CHECKING(for --with-system-expat)
-AC_ARG_WITH(system_expat,
- AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]),
+AC_MSG_CHECKING(for --with-expat)
+AC_ARG_WITH(expat,
+ AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]),
[],
- [with_system_expat="no"])
+ [with_expat="builtin"])
-AC_MSG_RESULT($with_system_expat)
+AC_MSG_RESULT($with_expat)
+
+if test "$with_expat" != "none"; then
+ EXPAT=yes
+else
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat"
+ EXPAT=no
+fi
+AC_SUBST(EXPAT)
# Check for use of the system libffi library
AC_MSG_CHECKING(for --with-system-ffi)
diff --git a/setup.py b/setup.py
index 722308b..ecddb6a 100644
--- a/setup.py
+++ b/setup.py
@@ -1434,7 +1434,7 @@ class PyBuildExt(build_ext):
#
# More information on Expat can be found at www.libexpat.org.
#
- if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"):
+ if '--with-expat=system' in sysconfig.get_config_var("CONFIG_ARGS"):
expat_inc = []
define_macros = []
expat_lib = ['expat']
--
2.6.4
|
shibajee/buildroot
|
package/python3/0023-Add-an-option-to-disable-expat.patch
|
patch
|
mit
| 2,865 |
From 18265d05ee97ad0c43995acdadce2458b57d7d64 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:49:55 +0100
Subject: [PATCH] Add an option to disable CJK codecs
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index e6bcacc..38b7515 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2911,6 +2911,12 @@ if test "$SQLITE3" = "no" ; then
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
+AC_ARG_ENABLE(codecs-cjk,
+ AS_HELP_STRING([--disable-codecs-cjk], [disable CJK codecs]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.6.4
|
shibajee/buildroot
|
package/python3/0024-Add-an-option-to-disable-CJK-codecs.patch
|
patch
|
mit
| 935 |
From 733ee65f308ec48be427463c06f372ca116ccada Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:50:11 +0100
Subject: [PATCH] Add an option to disable NIS
NIS is not necessarily available in uClibc, so we need an option to
not compile support for it.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index 38b7515..f25733a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2917,6 +2917,12 @@ AC_ARG_ENABLE(codecs-cjk,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022"
fi])
+AC_ARG_ENABLE(nis,
+ AS_HELP_STRING([--disable-nis], [disable NIS]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.6.4
|
shibajee/buildroot
|
package/python3/0025-Add-an-option-to-disable-NIS.patch
|
patch
|
mit
| 1,006 |
From 64fa1fc3a9aea7ffba7b96d08a14df91051f2b6f Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:50:27 +0100
Subject: [PATCH] Add an option to disable unicodedata
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index f25733a..a7ddb2b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2923,6 +2923,12 @@ AC_ARG_ENABLE(nis,
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
+AC_ARG_ENABLE(unicodedata,
+ AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata"
+ fi])
+
AC_SUBST(TK)
AC_ARG_ENABLE(tk,
AS_HELP_STRING([--disable-tk], [disable tk]),
--
2.6.4
|
shibajee/buildroot
|
package/python3/0026-Add-an-option-to-disable-unicodedata.patch
|
patch
|
mit
| 887 |
From 2766bcdd8f9b7395ce32a6d8480ef0a2186f2098 Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Wed, 23 Dec 2015 11:50:42 +0100
Subject: [PATCH] Add an option to disable IDLE
IDLE is an IDE embedded into python, written using Tk, so it doesn't make
much sense to have it into our build.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
Makefile.pre.in | 7 ++++++-
configure.ac | 6 ++++++
setup.py | 4 +++-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index bdfee19..2466615 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1132,7 +1132,9 @@ bininstall: altbininstall
-rm -f $(DESTDIR)$(LIBPC)/python3.pc
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
-rm -f $(DESTDIR)$(BINDIR)/idle3
+ifeq (@IDLE@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
+endif
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
@@ -1179,7 +1181,6 @@ LIBSUBDIRS= \
html json http dbm xmlrpc \
logging csv wsgiref urllib \
ctypes ctypes/macholib \
- idlelib idlelib/Icons \
distutils distutils/command \
importlib \
turtledemo \
@@ -1261,6 +1262,10 @@ ifeq (@EXPAT@,yes)
LIBSUBDIRS += $(XMLLIBSUBDIRS)
endif
+ifeq (@IDLE@,yes)
+LIBSUBDIRS += idlelib idlelib/Icons
+endif
+
ifeq (@TEST_MODULES@,yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif
diff --git a/configure.ac b/configure.ac
index a7ddb2b..6b59792 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2965,6 +2965,12 @@ AC_ARG_ENABLE(lib2to3,
AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
[ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
+AC_SUBST(IDLE)
+
+AC_ARG_ENABLE(idle3,
+ AS_HELP_STRING([--disable-idle3], [disable idle3 IDE]),
+ [ IDLE="${enableval}" ], [ IDLE=yes ])
+
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
diff --git a/setup.py b/setup.py
index ecddb6a..7fe68e8 100644
--- a/setup.py
+++ b/setup.py
@@ -2221,11 +2221,13 @@ def main():
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
- scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py']
+ scripts = ['Lib/smtpd.py']
if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"):
scripts += [ 'Tools/scripts/pydoc3' ]
if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"):
scripts += [ 'Tools/scripts/2to3' ]
+ if not '--disable-idle3' in sysconfig.get_config_var("CONFIG_ARGS"):
+ scripts += [ 'Tools/scripts/idle3' ]
setup(# PyPI Metadata (PEP 301)
name = "Python",
--
2.6.4
|
shibajee/buildroot
|
package/python3/0027-Add-an-option-to-disable-IDLE.patch
|
patch
|
mit
| 2,759 |
From ff77defc777a57d4caee5183796fd44dd265e78b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:51:31 +0100
Subject: [PATCH] Add an option to disable decimal
This patch replaces the existing --with-system-libmpdec option with a
--with-libmpdec={system,builtin,none} option, which allows to tell
Python whether we want to use the system libmpdec (already installed),
the libmpdec builtin the Python sources, or no libmpdec at all.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.ac | 17 ++++++++++++-----
setup.py | 2 +-
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6b59792..51e1760 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2624,13 +2624,20 @@ AC_SUBST(LIBFFI_INCLUDEDIR)
AC_MSG_RESULT($with_system_ffi)
# Check for use of the system libmpdec library
-AC_MSG_CHECKING(for --with-system-libmpdec)
-AC_ARG_WITH(system_libmpdec,
- AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec library]),
+AC_MSG_CHECKING(for --with-libmpdec)
+AC_ARG_WITH(libmpdec,
+ AS_HELP_STRING([--with-libmpdec], [select which libmpdec version to use: system, builtin, none]),
[],
- [with_system_libmpdec="no"])
+ [with_libmpdec="builtin"])
-AC_MSG_RESULT($with_system_libmpdec)
+AC_MSG_RESULT($with_libmpdec)
+if test "$with_libmpdec" != "none"; then
+ MPDEC=yes
+else
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _decimal"
+ MPDEC=no
+fi
+AC_SUBST(MPDEC)
# Check for support for loadable sqlite extensions
AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
diff --git a/setup.py b/setup.py
index 7fe68e8..364b350 100644
--- a/setup.py
+++ b/setup.py
@@ -1988,7 +1988,7 @@ class PyBuildExt(build_ext):
def _decimal_ext(self):
extra_compile_args = []
undef_macros = []
- if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"):
+ if '--with-libmpdec=system' in sysconfig.get_config_var("CONFIG_ARGS"):
include_dirs = []
libraries = [':libmpdec.so.2']
sources = ['_decimal/_decimal.c']
--
2.6.4
|
shibajee/buildroot
|
package/python3/0028-Add-an-option-to-disable-decimal.patch
|
patch
|
mit
| 2,250 |
From 789b0f99d7c1d25bfa9c05fd12f4d55bb70f377b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 11:51:58 +0100
Subject: [PATCH] Add an option to disable the ossaudiodev module
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/configure.ac b/configure.ac
index 51e1760..c4c2353 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2639,6 +2639,12 @@ else
fi
AC_SUBST(MPDEC)
+AC_ARG_ENABLE(ossaudiodev,
+ AS_HELP_STRING([--disable-ossaudiodev], [disable OSSAUDIODEV]),
+ [ if test "$enableval" = "no"; then
+ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ossaudiodev"
+ fi])
+
# Check for support for loadable sqlite extensions
AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
AC_ARG_ENABLE(loadable-sqlite-extensions,
--
2.6.4
|
shibajee/buildroot
|
package/python3/0029-Add-an-option-to-disable-the-ossaudiodev-module.patch
|
patch
|
mit
| 897 |
From 4f851142b8f3149d23654117621285df34ec768b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Wed, 23 Dec 2015 13:58:00 +0100
Subject: [PATCH] Support PGEN_FOR_BUILD and FREEZE_IMPORTLIB_FOR_BUILD
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Makefile.pre.in | 10 ++++++++++
configure.ac | 3 +++
2 files changed, 13 insertions(+)
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 2466615..fdf622d 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -712,10 +712,15 @@ Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
############################################################################
# Importlib
+ifeq (@FREEZE_IMPORTLIB_FOR_BUILD@,)
Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
$(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+else
+Programs/_freeze_importlib: @FREEZE_IMPORTLIB_FOR_BUILD@
+ cp $^ $@
+endif
Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
./Programs/_freeze_importlib \
@@ -789,8 +794,13 @@ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
$(GRAMMAR_C): $(GRAMMAR_H)
touch $(GRAMMAR_C)
+ifeq (@PGEN_FOR_BUILD@,)
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
+else
+$(PGEN): @PGEN_FOR_BUILD@
+ cp $^ $@
+endif
Parser/grammar.o: $(srcdir)/Parser/grammar.c \
$(srcdir)/Include/token.h \
diff --git a/configure.ac b/configure.ac
index c4c2353..750c232 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,9 @@ else
fi
AC_SUBST(PYTHON_FOR_BUILD)
+AC_SUBST(PGEN_FOR_BUILD)
+AC_SUBST(FREEZE_IMPORTLIB_FOR_BUILD)
+
dnl Ensure that if prefix is specified, it does not end in a slash. If
dnl it does, we get path names containing '//' which is both ugly and
dnl can cause trouble.
--
2.6.4
|
shibajee/buildroot
|
package/python3/0030-Support-PGEN_FOR_BUILD-and-FREEZE_IMPORTLIB_FOR_BUIL.patch
|
patch
|
mit
| 2,039 |
comment "python3 needs a toolchain w/ wchar, threads, dynamic library"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
config BR2_PACKAGE_PYTHON3
bool "python3"
depends on !BR2_PACKAGE_PYTHON
depends on BR2_USE_WCHAR
# uses fork()
depends on BR2_USE_MMU
depends on BR2_TOOLCHAIN_HAS_THREADS # libffi
depends on !BR2_STATIC_LIBS
select BR2_PACKAGE_LIBFFI
help
The python language interpreter.
http://www.python.org/
if BR2_PACKAGE_PYTHON3
choice
prompt "python3 module format to install"
default BR2_PACKAGE_PYTHON3_PYC_ONLY
help
Select Python module format to install on target (py, pyc or both)
config BR2_PACKAGE_PYTHON3_PY_ONLY
bool ".py sources only"
config BR2_PACKAGE_PYTHON3_PYC_ONLY
bool ".pyc compiled sources only"
config BR2_PACKAGE_PYTHON3_PY_PYC
bool ".py sources and .pyc compiled"
endchoice
menu "core python3 modules"
comment "The following modules are unusual or require extra libraries"
config BR2_PACKAGE_PYTHON3_BZIP2
select BR2_PACKAGE_BZIP2
bool "bz2 module"
help
bzip2 module for Python3
config BR2_PACKAGE_PYTHON3_CODECSCJK
bool "codecscjk module"
help
Chinese/Japanese/Korean codecs module for Python (large).
config BR2_PACKAGE_PYTHON3_CURSES
select BR2_PACKAGE_NCURSES
bool "curses module"
help
curses module for Python3.
config BR2_PACKAGE_PYTHON3_DECIMAL
select BR2_PACKAGE_MPDECIMAL
bool "decimal module"
help
decimal module for Python3.
config BR2_PACKAGE_PYTHON3_OSSAUDIODEV
bool "ossaudiodev module"
help
ossaudiodev module for Python3.
config BR2_PACKAGE_PYTHON3_READLINE
select BR2_PACKAGE_READLINE
bool "readline"
help
readline module for Python3 (required for command-line
editing in the Python shell).
config BR2_PACKAGE_PYTHON3_SSL
select BR2_PACKAGE_OPENSSL
bool "ssl"
help
_ssl module for Python3 (required for https in urllib etc).
config BR2_PACKAGE_PYTHON3_UNICODEDATA
bool "unicodedata module"
default y
help
Unicode character database (used by stringprep module) (large).
config BR2_PACKAGE_PYTHON3_SQLITE
bool "sqlite module"
select BR2_PACKAGE_SQLITE
help
SQLite database support
config BR2_PACKAGE_PYTHON3_PYEXPAT
select BR2_PACKAGE_EXPAT
bool "xml module"
help
pyexpat and xml libraries for Python3.
config BR2_PACKAGE_PYTHON3_ZLIB
bool "zlib module"
select BR2_PACKAGE_ZLIB
help
zlib support in Python3
endmenu
endif
|
shibajee/buildroot
|
package/python3/Config.in
|
in
|
mit
| 2,434 |
# From https://www.python.org/downloads/release/python-352/
md5 8906efbacfcdc7c3c9198aeefafd159e Python-3.5.2.tar.xz
# Locally computed
sha256 0010f56100b9b74259ebcd5d4b295a32324b58b517403a10d1a2aa7cb22bca40 Python-3.5.2.tar.xz
|
shibajee/buildroot
|
package/python3/python3.hash
|
hash
|
mit
| 228 |
################################################################################
#
# python3
#
################################################################################
PYTHON3_VERSION_MAJOR = 3.5
PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).2
PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz
PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION)
PYTHON3_LICENSE = Python software foundation license v2, others
PYTHON3_LICENSE_FILES = LICENSE
# Python itself doesn't use libtool, but it includes the source code
# of libffi, which uses libtool. Unfortunately, it uses a beta version
# of libtool for which we don't have a matching patch. However, this
# is not a problem, because we don't use the libffi copy included in
# the Python sources, but instead use an external libffi library.
PYTHON3_LIBTOOL_PATCH = NO
# Python needs itself and a "pgen" program to build itself, both being
# provided in the Python sources. So in order to cross-compile Python,
# we need to build a host Python first. This host Python is also
# installed in $(HOST_DIR), as it is needed when cross-compiling
# third-party Python modules.
HOST_PYTHON3_CONF_OPTS += \
--without-ensurepip \
--without-cxx-main \
--disable-sqlite3 \
--disable-tk \
--with-expat=system \
--disable-curses \
--disable-codecs-cjk \
--disable-nis \
--enable-unicodedata \
--disable-test-modules \
--disable-idle3 \
--disable-ossaudiodev
# Make sure that LD_LIBRARY_PATH overrides -rpath.
# This is needed because libpython may be installed at the same time that
# python is called.
HOST_PYTHON3_CONF_ENV += \
LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags"
PYTHON3_DEPENDENCIES = host-python3 libffi
HOST_PYTHON3_DEPENDENCIES = host-expat host-zlib
PYTHON3_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)
PYTHON3_DEPENDENCIES += readline
endif
ifeq ($(BR2_PACKAGE_PYTHON3_CURSES),y)
PYTHON3_DEPENDENCIES += ncurses
else
PYTHON3_CONF_OPTS += --disable-curses
endif
ifeq ($(BR2_PACKAGE_PYTHON3_DECIMAL),y)
PYTHON3_DEPENDENCIES += mpdecimal
PYTHON3_CONF_OPTS += --with-libmpdec=system
else
PYTHON3_CONF_OPTS += --with-libmpdec=none
endif
ifeq ($(BR2_PACKAGE_PYTHON3_PYEXPAT),y)
PYTHON3_DEPENDENCIES += expat
PYTHON3_CONF_OPTS += --with-expat=system
else
PYTHON3_CONF_OPTS += --with-expat=none
endif
ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
PYTHON3_CONF_OPTS += --enable-old-stdlib-cache
endif
ifeq ($(BR2_PACKAGE_PYTHON3_SQLITE),y)
PYTHON3_DEPENDENCIES += sqlite
else
PYTHON3_CONF_OPTS += --disable-sqlite3
endif
ifeq ($(BR2_PACKAGE_PYTHON3_SSL),y)
PYTHON3_DEPENDENCIES += openssl
endif
ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y)
PYTHON3_CONF_OPTS += --disable-codecs-cjk
endif
ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y)
PYTHON3_CONF_OPTS += --disable-unicodedata
endif
ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y)
PYTHON3_DEPENDENCIES += bzip2
endif
ifeq ($(BR2_PACKAGE_PYTHON3_ZLIB),y)
PYTHON3_DEPENDENCIES += zlib
endif
ifeq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y)
PYTHON3_CONF_OPTS += --enable-ossaudiodev
else
PYTHON3_CONF_OPTS += --disable-ossaudiodev
endif
PYTHON3_CONF_ENV += \
ac_cv_have_long_long_format=yes \
ac_cv_file__dev_ptmx=yes \
ac_cv_file__dev_ptc=yes \
ac_cv_working_tzset=yes
# uClibc is known to have a broken wcsftime() implementation, so tell
# Python 3 to fall back to strftime() instead.
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
PYTHON3_CONF_ENV += ac_cv_func_wcsftime=no
endif
PYTHON3_CONF_OPTS += \
--without-ensurepip \
--without-cxx-main \
--with-system-ffi \
--disable-pydoc \
--disable-test-modules \
--disable-lib2to3 \
--disable-tk \
--disable-nis \
--disable-idle3 \
--disable-pyc-build
# Python builds two tools to generate code: 'pgen' and
# '_freeze_importlib'. Unfortunately, for the target Python, they are
# built for the target, while we need to run them at build time. So
# when installing host-python, we copy them to
# $(HOST_DIR)/usr/bin. And then, when building the target python
# package, we tell the configure script where they are located.
define HOST_PYTHON3_INSTALL_TOOLS
cp $(@D)/Parser/pgen $(HOST_DIR)/usr/bin/python-pgen
cp $(@D)/Programs/_freeze_importlib $(HOST_DIR)/usr/bin/python-freeze-importlib
endef
HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_TOOLS
PYTHON3_CONF_ENV += \
PGEN_FOR_BUILD=$(HOST_DIR)/usr/bin/python-pgen \
FREEZE_IMPORTLIB_FOR_BUILD=$(HOST_DIR)/usr/bin/python-freeze-importlib
#
# Remove useless files. In the config/ directory, only the Makefile
# and the pyconfig.h files are needed at runtime.
#
define PYTHON3_REMOVE_USELESS_FILES
rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)-config
rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config
rm -f $(TARGET_DIR)/usr/bin/python3-config
rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3
for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/ \
-type f -not -name pyconfig.h -a -not -name Makefile` ; do \
rm -f $$i ; \
done
rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/__pycache__/
rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/lib-dynload/sysconfigdata/__pycache__
rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/collections/__pycache__
rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/importlib/__pycache__
endef
PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_USELESS_FILES
#
# Make sure libpython gets stripped out on target
#
define PYTHON3_ENSURE_LIBPYTHON_STRIPPED
chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON3_VERSION_MAJOR)*.so
endef
PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_ENSURE_LIBPYTHON_STRIPPED
PYTHON3_AUTORECONF = YES
define PYTHON3_INSTALL_SYMLINK
ln -fs python3 $(TARGET_DIR)/usr/bin/python
endef
ifneq ($(BR2_PACKAGE_PYTHON),y)
PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK
endif
# Some packages may have build scripts requiring python3, whatever is the
# python version chosen for the target.
# Only install the python symlink in the host tree if python3 is enabled
# for the target.
ifeq ($(BR2_PACKAGE_PYTHON3),y)
define HOST_PYTHON3_INSTALL_SYMLINK
ln -fs python3 $(HOST_DIR)/usr/bin/python
ln -fs python3-config $(HOST_DIR)/usr/bin/python-config
endef
HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK
endif
# Provided to other packages
PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/
$(eval $(autotools-package))
$(eval $(host-autotools-package))
define PYTHON3_CREATE_PYC_FILES
PYTHONPATH="$(PYTHON3_PATH)" \
$(HOST_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR) \
support/scripts/pycompile.py \
$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)
endef
ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PY_PYC),y)
PYTHON3_TARGET_FINALIZE_HOOKS += PYTHON3_CREATE_PYC_FILES
endif
ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
define PYTHON3_REMOVE_PY_FILES
find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.py' -print0 | \
xargs -0 --no-run-if-empty rm -f
endef
PYTHON3_TARGET_FINALIZE_HOOKS += PYTHON3_REMOVE_PY_FILES
endif
# Normally, *.pyc files should not have been compiled, but just in
# case, we make sure we remove all of them.
ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y)
define PYTHON3_REMOVE_PYC_FILES
find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.pyc' -print0 | \
xargs -0 --no-run-if-empty rm -f
endef
PYTHON3_TARGET_FINALIZE_HOOKS += PYTHON3_REMOVE_PYC_FILES
endif
# In all cases, we don't want to keep the optimized .opt-1.pyc and
# .opt-2.pyc files, since they can't work without their non-optimized
# variant.
define PYTHON3_REMOVE_OPTIMIZED_PYC_FILES
find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.opt-1.pyc' -print0 -o -name '*.opt-2.pyc' -print0 | \
xargs -0 --no-run-if-empty rm -f
endef
PYTHON3_TARGET_FINALIZE_HOOKS += PYTHON3_REMOVE_OPTIMIZED_PYC_FILES
|
shibajee/buildroot
|
package/python3/python3.mk
|
mk
|
mit
| 7,943 |
[PATCH] fix make install to respect DESTDIR
And also ensure destination directories exist.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
src/Makefile.in | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
Index: qdecoder-r12.0.5/src/Makefile.in
===================================================================
--- qdecoder-r12.0.5.orig/src/Makefile.in
+++ qdecoder-r12.0.5/src/Makefile.in
@@ -78,17 +78,18 @@
${LN_S} -f ${SLIBREALNAME} ${SLIBNAME}
install: all
- ${INSTALL_DATA} qdecoder.h ${HEADERDIR}/qdecoder.h
- ${INSTALL_DATA} ${LIBNAME} ${LIBDIR}/${LIBNAME}
- ${INSTALL_DATA} ${SLIBREALNAME} ${LIBDIR}/${SLIBREALNAME}
- ( cd ${LIBDIR}; ${LN_S} -f ${SLIBREALNAME} ${SLIBNAME} )
+ mkdir -p ${DESTDIR}/${HEADERDIR} ${DESTDIR}/${LIBDIR}
+ ${INSTALL_DATA} qdecoder.h ${DESTDIR}/${HEADERDIR}/qdecoder.h
+ ${INSTALL_DATA} ${LIBNAME} ${DESTDIR}/${LIBDIR}/${LIBNAME}
+ ${INSTALL_DATA} ${SLIBREALNAME} ${DESTDIR}/${LIBDIR}/${SLIBREALNAME}
+ ( cd ${DESTDIR}/${LIBDIR}; ${LN_S} -f ${SLIBREALNAME} ${SLIBNAME} )
deinstall: uninstall
uninstall:
- ${RM} -f ${HEADERDIR}/qdecoder.h
- ${RM} -f ${LIBDIR}/${LIBNAME}
- ${RM} -f ${LIBDIR}/${SLIBREALNAME}
- ${RM} -f ${LIBDIR}/${SLIBNAME}
+ ${RM} -f ${DESTDIR}/${HEADERDIR}/qdecoder.h
+ ${RM} -f ${DESTDIR}/${LIBDIR}/${LIBNAME}
+ ${RM} -f ${DESTDIR}/${LIBDIR}/${SLIBREALNAME}
+ ${RM} -f ${DESTDIR}/${LIBDIR}/${SLIBNAME}
doc:
doxygen doxygen.conf
|
shibajee/buildroot
|
package/qdecoder/0001-fix-make-install.patch
|
patch
|
mit
| 1,435 |
[PATCH] configure.ac: drop hardcoded paths
Causing problems with cross compilation.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
configure.ac | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Index: qdecoder-r12.0.5/configure.ac
===================================================================
--- qdecoder-r12.0.5.orig/configure.ac
+++ qdecoder-r12.0.5/configure.ac
@@ -81,10 +81,7 @@
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile])
-## Set path
-PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
-CPPFLAGS="$CPPFLAGS -I/usr/include -I/usr/local/include -I./ -D_GNU_SOURCE"
-LDFLAGS="$LDFLAGS -L/usr/lib -L/usr/local/lib"
+CPPFLAGS="$CPPFLAGS -I./ -D_GNU_SOURCE"
## Set autoconf setting
#AC_CANONICAL_TARGET
|
shibajee/buildroot
|
package/qdecoder/0002-configure.ac-drop-hardcoded-paths.patch
|
patch
|
mit
| 811 |
Fixes build error
qcgireq.c: In function '_parse_multipart_value_into_disk':
qcgireq.c:738:60: error: 'errno' undeclared (first use in this function)
DEBUG("I/O error. (errno=%d)", (ioerror == true) ? errno : 0);
Patch downloaded from upstream repo:
https://github.com/wolkykim/qdecoder/commit/574f0216a51e3e852cd94e2a0a3b52dc64e74548
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
From 574f0216a51e3e852cd94e2a0a3b52dc64e74548 Mon Sep 17 00:00:00 2001
From: nyov <nyov@nexnode.net>
Date: Fri, 5 Sep 2014 18:41:10 +0000
Subject: [PATCH] add missing header include
fixes #7
---
src/qcgireq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qcgireq.c b/src/qcgireq.c
index dcb8c57..d34ff83 100644
--- a/src/qcgireq.c
+++ b/src/qcgireq.c
@@ -139,6 +139,7 @@
#ifndef _WIN32
#include <dirent.h>
#endif
+#include <errno.h>
#include "qdecoder.h"
#include "internal.h"
|
shibajee/buildroot
|
package/qdecoder/0003-errno.patch
|
patch
|
mit
| 898 |
config BR2_PACKAGE_QDECODER
bool "qdecoder"
depends on !BR2_STATIC_LIBS
help
qDecoder is a simple and powerful CGI library
for the C/C++ programming language.
http://wolkykim.github.io/qdecoder
|
shibajee/buildroot
|
package/qdecoder/Config.in
|
in
|
mit
| 207 |
# Locally calculated
sha256 641d3df4895626d7a530c5d26724e9b5887e9845d4b47f42c1cbce4a17ebf6af qdecoder-r12.0.5.tar.gz
|
shibajee/buildroot
|
package/qdecoder/qdecoder.hash
|
hash
|
mit
| 118 |
################################################################################
#
# qdecoder
#
################################################################################
QDECODER_VERSION = r12.0.5
QDECODER_SITE = $(call github,wolkykim,qdecoder,$(QDECODER_VERSION))
QDECODER_LICENSE = BSD-2
QDECODER_LICENSE_FILES = COPYING
# we patch configure.ac
QDECODER_AUTORECONF = YES
QDECODER_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
QDECODER_INSTALL_STAGING = YES
$(eval $(autotools-package))
|
shibajee/buildroot
|
package/qdecoder/qdecoder.mk
|
mk
|
mit
| 495 |
config BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
bool
# Only tested on these architectures
default y if BR2_aarch64 || BR2_i386 || BR2_mips || BR2_mipsel \
|| BR2_x86_64 || BR2_arm
comment "QEMU requires a toolchain with wchar, threads"
depends on BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
depends on BR2_USE_MMU
depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_USE_WCHAR)
config BR2_PACKAGE_QEMU
bool "QEMU"
depends on BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_WCHAR # gettext
depends on BR2_USE_MMU # fork()
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_PIXMAN
select BR2_PACKAGE_ZLIB
help
QEMU is a generic and open source machine emulator and virtualizer.
When used as a machine emulator, QEMU can run OSes and programs made
for one machine (e.g. an ARM board) on a different machine (e.g.
your own PC). By using dynamic translation, it achieves very good
performance.
When used as a virtualizer, QEMU achieves near native performances
by executing the guest code directly on the host CPU. QEMU supports
virtualization when executing under the Xen hypervisor or using the
KVM kernel module in Linux. When using KVM, QEMU can virtualize x86,
server and embedded PowerPC, and S390 guests.
http://qemu.org/
if BR2_PACKAGE_QEMU
comment "Emulators selection"
config BR2_PACKAGE_QEMU_CUSTOM_TARGETS
string "Enable specific targets"
help
Enter here the list of QEMU targets you want to build. For example:
System emulation | User-land emulation
----------------------+-----------------------
i386-softmmu | i386-linux-user
arm-softmmu | ppc-linux-user
x86_64-softmmu | sparc-bsd-user
... | ...
config QEMU_FOO
bool # To break the indentation
if BR2_PACKAGE_QEMU_CUSTOM_TARGETS = ""
comment "... or you can select emulator families to enable, below:"
config BR2_PACKAGE_QEMU_SYSTEM
bool "Enable all systems emulation"
depends on !BR2_STATIC_LIBS # dtc
select BR2_PACKAGE_QEMU_FDT
help
Say 'y' to build all system emulators/virtualisers that QEMU supports.
comment "systems emulation needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
config BR2_PACKAGE_QEMU_LINUX_USER
bool "Enable all Linux user-land emulation"
help
Say 'y' to build all Linux user-land emulators that QEMU supports.
# Note: bsd-user can not be build on Linux
endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == ""
config BR2_PACKAGE_QEMU_HAS_EMULS
def_bool y
depends on BR2_PACKAGE_QEMU_SYSTEM || BR2_PACKAGE_QEMU_LINUX_USER || BR2_PACKAGE_QEMU_CUSTOM_TARGETS != ""
if BR2_PACKAGE_QEMU_HAS_EMULS
comment "Frontends"
config BR2_PACKAGE_QEMU_SDL
bool "Enable SDL frontend"
select BR2_PACKAGE_SDL
help
Say 'y' to enable the SDL frontend, that is, a graphical window
presenting the VM's display.
comment "Misc. features"
config BR2_PACKAGE_QEMU_FDT
bool "Enable FDT"
depends on !BR2_STATIC_LIBS # dtc
select BR2_PACKAGE_DTC
help
Say 'y' here to have QEMU capable of constructing Device Trees,
and passing them to the VMs.
comment "FDT support needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
endif # BR2_PACKAGE_QEMU_HAS_EMULS
endif # BR2_PACKAGE_QEMU
|
shibajee/buildroot
|
package/qemu/Config.in
|
in
|
mit
| 3,272 |
config BR2_PACKAGE_HOST_QEMU
bool "host qemu"
select BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE \
if !BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE
depends on BR2_arm || BR2_armeb || BR2_aarch64 || \
BR2_i386 || BR2_m68k || BR2_microblazeel || \
BR2_microblazebe || BR2_mips || BR2_mipsel || \
BR2_mips64 || BR2_mips64el || BR2_powerpc || \
BR2_powerpc64 || BR2_powerpc64le || BR2_sh || \
BR2_sparc || BR2_x86_64
help
QEMU is a generic and open source machine emulator and virtualizer.
This option builds an emulator for your selected architecture.
http://www.qemu.org
if BR2_PACKAGE_HOST_QEMU
comment "Emulators selection"
config BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE
bool "Enable system emulation"
help
Enables the build of the system emulator, which allows to
boot an entire system in Qemu.
config BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
bool "Enable Linux user-land emulation"
help
Enables the build of the user-land emulator, which allows to
run user-space applications.
config BR2_PACKAGE_HOST_QEMU_VDE2
bool "VDE2 support"
help
Enables VDE2 support. VDE2 stands for Virtual Distributed
Ethernet and can be used to create virtual switches to
"plug" both physical and virtual machines in them.
endif
|
shibajee/buildroot
|
package/qemu/Config.in.host
|
host
|
mit
| 1,327 |
# Locally computed, tarball verified with GPG signature
sha256 c9ac4a651b273233d21b8bec32e30507cb9cce7900841febc330956a1a8434ec qemu-2.6.0.tar.bz2
|
shibajee/buildroot
|
package/qemu/qemu.hash
|
hash
|
mit
| 148 |
################################################################################
#
# qemu
#
################################################################################
QEMU_VERSION = 2.6.0
QEMU_SOURCE = qemu-$(QEMU_VERSION).tar.bz2
QEMU_SITE = http://wiki.qemu.org/download
QEMU_LICENSE = GPLv2, LGPLv2.1, MIT, BSD-3c, BSD-2c, Others/BSD-1c
QEMU_LICENSE_FILES = COPYING COPYING.LIB
# NOTE: there is no top-level license file for non-(L)GPL licenses;
# the non-(L)GPL license texts are specified in the affected
# individual source files.
#-------------------------------------------------------------
# Host-qemu
HOST_QEMU_DEPENDENCIES = host-pkgconf host-python host-zlib host-libglib2 host-pixman
# BR ARCH qemu
# ------- ----
# arm arm
# armeb armeb
# bfin not supported
# i486 i386
# i586 i386
# i686 i386
# x86_64 x86_64
# m68k m68k
# microblaze microblaze
# mips mips
# mipsel mipsel
# mips64 mips64
# mips64el mips64el
# powerpc ppc
# sh2a not supported
# sh4 sh4
# sh4eb sh4eb
# sh4a sh4
# sh4aeb sh4eb
# sh64 not supported
# sparc sparc
HOST_QEMU_ARCH = $(ARCH)
ifeq ($(HOST_QEMU_ARCH),i486)
HOST_QEMU_ARCH = i386
endif
ifeq ($(HOST_QEMU_ARCH),i586)
HOST_QEMU_ARCH = i386
endif
ifeq ($(HOST_QEMU_ARCH),i686)
HOST_QEMU_ARCH = i386
endif
ifeq ($(HOST_QEMU_ARCH),powerpc)
HOST_QEMU_ARCH = ppc
endif
ifeq ($(HOST_QEMU_ARCH),sh4a)
HOST_QEMU_ARCH = sh4
endif
ifeq ($(HOST_QEMU_ARCH),sh4aeb)
HOST_QEMU_ARCH = sh4eb
endif
ifeq ($(BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE),y)
HOST_QEMU_TARGETS += $(HOST_QEMU_ARCH)-softmmu
HOST_QEMU_OPTS += --enable-system --enable-fdt
HOST_QEMU_DEPENDENCIES += host-dtc
else
HOST_QEMU_OPTS += --disable-system
endif
ifeq ($(BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE),y)
HOST_QEMU_TARGETS += $(HOST_QEMU_ARCH)-linux-user
HOST_QEMU_OPTS += --enable-linux-user
HOST_QEMU_HOST_SYSTEM_TYPE = $(shell uname -s)
ifneq ($(HOST_QEMU_HOST_SYSTEM_TYPE),Linux)
$(error "qemu-user can only be used on Linux hosts")
endif
# kernel version as major*256 + minor
HOST_QEMU_HOST_SYSTEM_VERSION = $(shell uname -r | awk -F. '{ print $$1 * 256 + $$2 }')
HOST_QEMU_TARGET_SYSTEM_VERSION = $(shell echo $(BR2_TOOLCHAIN_HEADERS_AT_LEAST) | awk -F. '{ print $$1 * 256 + $$2 }')
HOST_QEMU_COMPARE_VERSION = $(shell test $(HOST_QEMU_HOST_SYSTEM_VERSION) -ge $(HOST_QEMU_TARGET_SYSTEM_VERSION) && echo OK)
#
# The principle of qemu-user is that it emulates the instructions of
# the target architecture when running the binary, and then when this
# binary does a system call, it converts this system call into a
# system call on the host machine. This mechanism makes an assumption:
# that the target binary will not do system calls that do not exist on
# the host. This basically requires that the target binary should be
# built with kernel headers that are older or the same as the kernel
# version running on the host machine.
#
ifeq ($(BR_BUILDING),y)
ifneq ($(HOST_QEMU_COMPARE_VERSION),OK)
$(error "Refusing to build qemu-user: target Linux version newer than host's.")
endif
endif # BR_BUILDING
else # BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
HOST_QEMU_OPTS += --disable-linux-user
endif # BR2_PACKAGE_HOST_QEMU_LINUX_USER_MODE
ifeq ($(BR2_PACKAGE_HOST_QEMU_VDE2),y)
HOST_QEMU_OPTS += --enable-vde
HOST_QEMU_DEPENDENCIES += host-vde2
endif
define HOST_QEMU_CONFIGURE_CMDS
cd $(@D); $(HOST_CONFIGURE_OPTS) ./configure \
--target-list="$(HOST_QEMU_TARGETS)" \
--prefix="$(HOST_DIR)/usr" \
--interp-prefix=$(STAGING_DIR) \
--cc="$(HOSTCC)" \
--host-cc="$(HOSTCC)" \
--python=$(HOST_DIR)/usr/bin/python2 \
--extra-cflags="$(HOST_CFLAGS)" \
--extra-ldflags="$(HOST_LDFLAGS)" \
$(HOST_QEMU_OPTS)
endef
define HOST_QEMU_BUILD_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D)
endef
define HOST_QEMU_INSTALL_CMDS
$(HOST_MAKE_ENV) $(MAKE) -C $(@D) install
endef
$(eval $(host-generic-package))
# variable used by other packages
QEMU_USER = $(HOST_DIR)/usr/bin/qemu-$(HOST_QEMU_ARCH)
#-------------------------------------------------------------
# Target-qemu
QEMU_DEPENDENCIES = host-pkgconf host-python libglib2 zlib pixman
# Need the LIBS variable because librt and libm are
# not automatically pulled. :-(
QEMU_LIBS = -lrt -lm
QEMU_OPTS =
QEMU_VARS = \
LIBTOOL=$(HOST_DIR)/usr/bin/libtool \
PYTHON=$(HOST_DIR)/usr/bin/python2 \
PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
# If we want to specify only a subset of targets, we must still enable all
# of them, so that QEMU properly builds its list of default targets, from
# which it then checks if the specified sub-set is valid. That's what we
# do in the first part of the if-clause.
# Otherwise, if we do not want to pass a sub-set of targets, we then need
# to either enable or disable -user and/or -system emulation appropriately.
# That's what we do in the else-clause.
ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),)
QEMU_OPTS += --enable-system --enable-linux-user
QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))"
else
ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y)
QEMU_OPTS += --enable-system
else
QEMU_OPTS += --disable-system
endif
ifeq ($(BR2_PACKAGE_QEMU_LINUX_USER),y)
QEMU_OPTS += --enable-linux-user
else
QEMU_OPTS += --disable-linux-user
endif
endif
ifeq ($(BR2_PACKAGE_QEMU_SDL),y)
QEMU_OPTS += --enable-sdl
QEMU_DEPENDENCIES += sdl
QEMU_VARS += SDL_CONFIG=$(BR2_STAGING_DIR)/usr/bin/sdl-config
else
QEMU_OPTS += --disable-sdl
endif
ifeq ($(BR2_PACKAGE_QEMU_FDT),y)
QEMU_OPTS += --enable-fdt
QEMU_DEPENDENCIES += dtc
else
QEMU_OPTS += --disable-fdt
endif
define QEMU_CONFIGURE_CMDS
( cd $(@D); \
LIBS='$(QEMU_LIBS)' \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
$(QEMU_VARS) \
./configure \
--prefix=/usr \
--cross-prefix=$(TARGET_CROSS) \
--with-system-pixman \
--audio-drv-list= \
--enable-kvm \
--enable-attr \
--enable-vhost-net \
--disable-bsd-user \
--disable-xen \
--disable-slirp \
--disable-vnc \
--disable-virtfs \
--disable-brlapi \
--disable-curses \
--disable-curl \
--disable-bluez \
--disable-uuid \
--disable-vde \
--disable-linux-aio \
--disable-cap-ng \
--disable-docs \
--disable-spice \
--disable-rbd \
--disable-libiscsi \
--disable-usb-redir \
--disable-strip \
--disable-seccomp \
--disable-sparse \
--disable-tools \
$(QEMU_OPTS) \
)
endef
define QEMU_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
endef
define QEMU_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(QEMU_MAKE_ENV) DESTDIR=$(TARGET_DIR) install
endef
$(eval $(generic-package))
|
shibajee/buildroot
|
package/qemu/qemu.mk
|
mk
|
mit
| 7,628 |
Don't require Qt GUI module
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
diff -Nrup qextserialport-f83b4e7ca922e53.orig/qextserialport.pro qextserialport-f83b4e7ca922e53/qextserialport.pro
--- qextserialport-f83b4e7ca922e53.orig/qextserialport.pro 2012-10-17 09:13:53.000000000 +0200
+++ qextserialport-f83b4e7ca922e53/qextserialport.pro 2012-11-13 22:48:29.249431510 +0100
@@ -41,6 +41,8 @@ macx:qesp_mac_framework {
win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all
+!win32*:!wince*:QT -= gui
+
#generate proper library name
greaterThan(QT_MAJOR_VERSION, 4) {
QESP_LIB_BASENAME = QtExtSerialPort
|
shibajee/buildroot
|
package/qextserialport/0001-gui.patch
|
patch
|
mit
| 670 |
Create a main include file QExtSerialPort
This main include file will be installed in
<QExtSerialPort/QExtSerialPort> so that Qt applications can use this
library by including header files in a Qt-like style.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: qextserialport-ef4af2a2ee3f/src/QExtSerialPort
===================================================================
--- /dev/null
+++ qextserialport-ef4af2a2ee3f/src/QExtSerialPort
@@ -0,0 +1,2 @@
+#include "qextserialport.h"
+#include "qextserialenumerator.h"
|
shibajee/buildroot
|
package/qextserialport/0002-main-include.patch
|
patch
|
mit
| 549 |
Add a pkgconfig file to ease usage with applications
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: qextserialport-ef4af2a2ee3f/qextserialport.pc
===================================================================
--- /dev/null
+++ qextserialport-ef4af2a2ee3f/qextserialport.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include/QExtSerialPort
+
+Name: QtExtSerialPort
+Description: QtExtSerialPort library
+Version: 1.2.0
+Libs: -L${libdir} -lqextserialport
+Cflags: -I${includedir}
|
shibajee/buildroot
|
package/qextserialport/0003-pkgconfig.patch
|
patch
|
mit
| 570 |
config BR2_PACKAGE_QEXTSERIALPORT
bool "qextserialport"
depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5
help
A Qt library to manage serial ports
http://code.google.com/p/qextserialport/
|
shibajee/buildroot
|
package/qextserialport/Config.in
|
in
|
mit
| 193 |
# locally computed
sha256 23e3b10a8d8a1e2fb071047144222c43d150748ce6670e5d047ba5b0502ad0b2 qextserialport-ada321a9ee463f628e7b781b8ed00ff219152158.tar.gz
|
shibajee/buildroot
|
package/qextserialport/qextserialport.hash
|
hash
|
mit
| 156 |
################################################################################
#
# qextserialport
#
################################################################################
QEXTSERIALPORT_VERSION = ada321a9ee463f628e7b781b8ed00ff219152158
QEXTSERIALPORT_SITE = $(call github,qextserialport,qextserialport,$(QEXTSERIALPORT_VERSION))
QEXTSERIALPORT_LICENSE = MIT
QEXTSERIALPORT_LICENSE_FILES = LICENSE.md
QEXTSERIALPORT_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_QT),y)
QEXTSERIALPORT_DEPENDENCIES += qt
define QEXTSERIALPORT_CONFIGURE_CMDS
(cd $(@D); $(TARGET_MAKE_ENV) $(QT_QMAKE))
endef
else ifeq ($(BR2_PACKAGE_QT5),y)
QEXTSERIALPORT_DEPENDENCIES += qt5base
define QEXTSERIALPORT_CONFIGURE_CMDS
(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
endef
endif
define QEXTSERIALPORT_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
endef
define QEXTSERIALPORT_INSTALL_STAGING_CMDS
mkdir -p $(STAGING_DIR)/usr/include/QExtSerialPort
cp $(@D)/src/*.h $(STAGING_DIR)/usr/include/QExtSerialPort/
cp $(@D)/src/QExtSerialPort $(STAGING_DIR)/usr/include/QExtSerialPort/
cp -a $(@D)/*.so* $(STAGING_DIR)/usr/lib/
cp $(@D)/qextserialport.pc $(STAGING_DIR)/usr/lib/pkgconfig/
endef
define QEXTSERIALPORT_INSTALL_TARGET_CMDS
cp -a $(@D)/*.so.* $(TARGET_DIR)/usr/lib
endef
$(eval $(generic-package))
|
shibajee/buildroot
|
package/qextserialport/qextserialport.mk
|
mk
|
mit
| 1,302 |
config BR2_PACKAGE_QHULL
bool "qhull"
depends on BR2_INSTALL_LIBSTDCPP
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 # needs gcc >= 4.4
help
Qhull computes the convex hull, Delaunay triangulation,
Voronoi diagram, halfspace intersection about a point,
furthest-site Delaunay triangulation, and furthest-site
Voronoi diagram. The source code runs in 2-d, 3-d, 4-d, and
higher dimensions. Qhull implements the Quickhull algorithm
for computing the convex hull. It handles roundoff errors
from floating point arithmetic. It computes volumes, surface
areas, and approximations to the convex hull.
http://www.qhull.org
comment "qhull needs a toolchain w/ C++, dynamic library, gcc >= 4.4"
depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
|
shibajee/buildroot
|
package/qhull/Config.in
|
in
|
mit
| 831 |
# From http://www.qhull.org/download/qhull-2015.2.md5sum
md5 e6270733a826a6a7c32b796e005ec3dc qhull-2015-src-7.2.0.tgz
# Locally computed
sha256 78b010925c3b577adc3d58278787d7df08f7c8fb02c3490e375eab91bb58a436 qhull-2015-src-7.2.0.tgz
|
shibajee/buildroot
|
package/qhull/qhull.hash
|
hash
|
mit
| 235 |
################################################################################
#
# qhull
#
################################################################################
QHULL_VERSION = 7.2.0
QHULL_SITE = http://www.qhull.org/download
QHULL_SOURCE = qhull-2015-src-$(QHULL_VERSION).tgz
QHULL_INSTALL_STAGING = YES
QHULL_LICENSE = BSD-Style
QHULL_LICENSE_FILES = COPYING.txt
$(eval $(cmake-package))
|
shibajee/buildroot
|
package/qhull/qhull.mk
|
mk
|
mit
| 405 |
From 45ec86156819c0872d023b05001682a8d2d2dc25 Mon Sep 17 00:00:00 2001
From: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
Date: Sat, 6 Apr 2013 16:54:25 +0200
Subject: [PATCH] fix Qt4 package error in CMakeLists.txt
Avoid checking for uic executable by cmake as it results configure
time error if QtGui isn't installed.
Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index adb65e9..81854b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ IF (Qt5Core_FOUND)
ELSE()
MESSAGE ("Qt5 not found, searching for Qt4")
# Find Qt4
- FIND_PACKAGE( Qt4 REQUIRED )
+ FIND_PACKAGE( Qt4 COMPONENTS QtCore REQUIRED )
# Include the cmake file needed to use qt4
INCLUDE( ${QT_USE_FILE} )
--
2.1.1
|
shibajee/buildroot
|
package/qjson/0001-fix-Qt4-package-error-in-CMakeLists.txt.patch
|
patch
|
mit
| 855 |
config BR2_PACKAGE_QJSON
bool "qjson"
depends on !BR2_STATIC_LIBS
depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5
help
QJson is a Qt-based library that maps JSON data to
QVariant objects and vice versa.
http://qjson.sourceforge.net
comment "qjson needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
|
shibajee/buildroot
|
package/qjson/Config.in
|
in
|
mit
| 373 |
# locally computed
sha256 863f0dd6b7199f84acf1e2487735830fab316a9a3a5e1651130ad153a231f2ed qjson-ba273682a9d33a7b3090e74f4742b5f3bf6c9b02.tar.gz
|
shibajee/buildroot
|
package/qjson/qjson.hash
|
hash
|
mit
| 147 |
################################################################################
#
# qjson
#
################################################################################
QJSON_VERSION = ba273682a9d33a7b3090e74f4742b5f3bf6c9b02
QJSON_SITE = $(call github,flavio,qjson,$(QJSON_VERSION))
QJSON_INSTALL_STAGING = YES
QJSON_DEPENDENCIES = \
$(if $(BR2_PACKAGE_QT),qt) \
$(if $(BR2_PACKAGE_QT5),qt5base)
QJSON_LICENSE = LGPLv2.1
QJSON_LICENSE_FILES = COPYING.lib
$(eval $(cmake-package))
|
shibajee/buildroot
|
package/qjson/qjson.mk
|
mk
|
mit
| 490 |
Remove absolute paths to host locations
Signed-off-by: Sagaert Johan <sagaert.johan@skynet.be>
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -85,10 +85,8 @@
## Set path
PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
-CPPFLAGS="$CPPFLAGS -I/usr/include -I/usr/local/include"
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-LDFLAGS="$LDFLAGS -L/usr/lib -L/usr/local/lib"
## Set autoconf setting
#AC_CANONICAL_TARGET
|
shibajee/buildroot
|
package/qlibc/0001-remove-absolute-paths.patch
|
patch
|
mit
| 590 |
From dbdc772a35244b45c725a72fad5ddade9bd7d521 Mon Sep 17 00:00:00 2001
From: pcarpent <pierre-francois.carpentier@c-s.fr>
Date: Tue, 15 Dec 2015 10:23:44 +0100
Subject: [PATCH] fix makefile
add DESTDIR variables in install targets
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
(downloaded from upstream commit not included in v2.4.1
https://github.com/wolkykim/qlibc/commit/dbdc772a35244b45c725a72fad5ddade9bd7d521)
---
src/Makefile.in | 110 ++++++++++++++++++++++++++++----------------------------
1 file changed, 55 insertions(+), 55 deletions(-)
diff --git a/src/Makefile.in b/src/Makefile.in
index 8a7ab43..4e274ed 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -122,70 +122,70 @@ qlibcext: ${QLIBCEXT_OBJS}
install: ${INSTALL_TARGETS}
install-qlibc: qlibc
- ${MKDIR_P} ${INST_INCDIR}/qlibc
- ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibc.h ${INST_INCDIR}/qlibc/qlibc.h
- ${MKDIR_P} ${INST_INCDIR}/qlibc/containers/
- ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qtreetbl.h ${INST_INCDIR}/qlibc/containers/qtreetbl.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qhashtbl.h ${INST_INCDIR}/qlibc/containers/qhashtbl.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qhasharr.h ${INST_INCDIR}/qlibc/containers/qhasharr.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qlisttbl.h ${INST_INCDIR}/qlibc/containers/qlisttbl.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qlist.h ${INST_INCDIR}/qlibc/containers/qlist.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qvector.h ${INST_INCDIR}/qlibc/containers/qvector.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qqueue.h ${INST_INCDIR}/qlibc/containers/qqueue.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qstack.h ${INST_INCDIR}/qlibc/containers/qstack.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qgrow.h ${INST_INCDIR}/qlibc/containers/qgrow.h
- ${MKDIR_P} ${INST_INCDIR}/qlibc/utilities/
- ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qcount.h ${INST_INCDIR}/qlibc/utilities/qcount.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qencode.h ${INST_INCDIR}/qlibc/utilities/qencode.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qfile.h ${INST_INCDIR}/qlibc/utilities/qfile.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qhash.h ${INST_INCDIR}/qlibc/utilities/qhash.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qio.h ${INST_INCDIR}/qlibc/utilities/qio.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qsocket.h ${INST_INCDIR}/qlibc/utilities/qsocket.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qstring.h ${INST_INCDIR}/qlibc/utilities/qstring.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qsystem.h ${INST_INCDIR}/qlibc/utilities/qsystem.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qtime.h ${INST_INCDIR}/qlibc/utilities/qtime.h
- ${MKDIR_P} ${INST_INCDIR}/qlibc/ipc/
- ${INSTALL_DATA} ${QLIBC_INCDIR}/ipc/qsem.h ${INST_INCDIR}/qlibc/ipc/qsem.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/ipc/qshm.h ${INST_INCDIR}/qlibc/ipc/qshm.h
- ${MKDIR_P} ${INST_LIBDIR}
- ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBC_LIBNAME} ${INST_LIBDIR}/${QLIBC_LIBNAME}
- ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBC_SLIBREALNAME} ${INST_LIBDIR}/${QLIBC_SLIBREALNAME}
- ( cd ${INST_LIBDIR}; ${LN_S} -f ${QLIBC_SLIBREALNAME} ${QLIBC_SLIBNAME} )
+ ${MKDIR_P} $(DESTDIR)/${INST_INCDIR}/qlibc
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibc.h $(DESTDIR)/${INST_INCDIR}/qlibc/qlibc.h
+ ${MKDIR_P} $(DESTDIR)/${INST_INCDIR}/qlibc/containers/
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qtreetbl.h $(DESTDIR)/${INST_INCDIR}/qlibc/containers/qtreetbl.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qhashtbl.h $(DESTDIR)/${INST_INCDIR}/qlibc/containers/qhashtbl.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qhasharr.h $(DESTDIR)/${INST_INCDIR}/qlibc/containers/qhasharr.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qlisttbl.h $(DESTDIR)/${INST_INCDIR}/qlibc/containers/qlisttbl.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qlist.h $(DESTDIR)/${INST_INCDIR}/qlibc/containers/qlist.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qvector.h $(DESTDIR)/${INST_INCDIR}/qlibc/containers/qvector.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qqueue.h $(DESTDIR)/${INST_INCDIR}/qlibc/containers/qqueue.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qstack.h $(DESTDIR)/${INST_INCDIR}/qlibc/containers/qstack.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/containers/qgrow.h $(DESTDIR)/${INST_INCDIR}/qlibc/containers/qgrow.h
+ ${MKDIR_P} $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qcount.h $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/qcount.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qencode.h $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/qencode.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qfile.h $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/qfile.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qhash.h $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/qhash.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qio.h $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/qio.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qsocket.h $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/qsocket.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qstring.h $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/qstring.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qsystem.h $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/qsystem.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/utilities/qtime.h $(DESTDIR)/${INST_INCDIR}/qlibc/utilities/qtime.h
+ ${MKDIR_P} $(DESTDIR)/${INST_INCDIR}/qlibc/ipc/
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/ipc/qsem.h $(DESTDIR)/${INST_INCDIR}/qlibc/ipc/qsem.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/ipc/qshm.h $(DESTDIR)/${INST_INCDIR}/qlibc/ipc/qshm.h
+ ${MKDIR_P} $(DESTDIR)/${INST_LIBDIR}
+ ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBC_LIBNAME} $(DESTDIR)/${INST_LIBDIR}/${QLIBC_LIBNAME}
+ ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBC_SLIBREALNAME} $(DESTDIR)/${INST_LIBDIR}/${QLIBC_SLIBREALNAME}
+ ( cd $(DESTDIR)/${INST_LIBDIR}; ${LN_S} -f ${QLIBC_SLIBREALNAME} ${QLIBC_SLIBNAME} )
uninstall-qlibc:
- ${RM} -f ${INST_INCDIR}/qlibc/qlibc.h
- ${RM} -rf ${INST_INCDIR}/qlibc/containers
- ${RM} -rf ${INST_INCDIR}/qlibc/utilities
- ${RM} -rf ${INST_INCDIR}/qlibc/ipc
- ${RM} -f ${INST_LIBDIR}/${QLIBC_LIBNAME}
- ${RM} -f ${INST_LIBDIR}/${QLIBC_SLIBREALNAME}
- ${RM} -f ${INST_LIBDIR}/${QLIBC_SLIBNAME}
+ ${RM} -f $(DESTDIR)/${INST_INCDIR}/qlibc/qlibc.h
+ ${RM} -rf $(DESTDIR)/${INST_INCDIR}/qlibc/containers
+ ${RM} -rf $(DESTDIR)/${INST_INCDIR}/qlibc/utilities
+ ${RM} -rf $(DESTDIR)/${INST_INCDIR}/qlibc/ipc
+ ${RM} -f $(DESTDIR)/${INST_LIBDIR}/${QLIBC_LIBNAME}
+ ${RM} -f $(DESTDIR)/${INST_LIBDIR}/${QLIBC_SLIBREALNAME}
+ ${RM} -f $(DESTDIR)/${INST_LIBDIR}/${QLIBC_SLIBNAME}
install-qlibcext: qlibcext
- ${MKDIR_P} ${INST_INCDIR}/qlibc
- ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext.h ${INST_INCDIR}/qlibc/qlibcext.h
- ${MKDIR_P} ${INST_INCDIR}/qlibc/extensions/
- ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qconfig.h ${INST_INCDIR}/qlibc/extensions/qconfig.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qaconf.h ${INST_INCDIR}/qlibc/extensions/qaconf.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qlog.h ${INST_INCDIR}/qlibc/extensions/qlog.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qhttpclient.h ${INST_INCDIR}/qlibc/extensions/qhttpclient.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qdatabase.h ${INST_INCDIR}/qlibc/extensions/qdatabase.h
- ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qtokenbucket.h ${INST_INCDIR}/qlibc/extensions/qtokenbucket.h
- ${MKDIR_P} ${INST_LIBDIR}
- ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBCEXT_LIBNAME} ${INST_LIBDIR}/${QLIBCEXT_LIBNAME}
- ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBCEXT_SLIBREALNAME} ${INST_LIBDIR}/${QLIBCEXT_SLIBREALNAME}
- ( cd ${INST_LIBDIR}; ${LN_S} -f ${QLIBCEXT_SLIBREALNAME} ${QLIBCEXT_SLIBNAME} )
+ ${MKDIR_P} $(DESTDIR)/${INST_INCDIR}/qlibc
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext.h $(DESTDIR)/${INST_INCDIR}/qlibc/qlibcext.h
+ ${MKDIR_P} $(DESTDIR)/${INST_INCDIR}/qlibc/extensions/
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qconfig.h $(DESTDIR)/${INST_INCDIR}/qlibc/extensions/qconfig.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qaconf.h $(DESTDIR)/${INST_INCDIR}/qlibc/extensions/qaconf.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qlog.h $(DESTDIR)/${INST_INCDIR}/qlibc/extensions/qlog.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qhttpclient.h $(DESTDIR)/${INST_INCDIR}/qlibc/extensions/qhttpclient.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qdatabase.h $(DESTDIR)/${INST_INCDIR}/qlibc/extensions/qdatabase.h
+ ${INSTALL_DATA} ${QLIBC_INCDIR}/extensions/qtokenbucket.h $(DESTDIR)/${INST_INCDIR}/qlibc/extensions/qtokenbucket.h
+ ${MKDIR_P} $(DESTDIR)/${INST_LIBDIR}
+ ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBCEXT_LIBNAME} $(DESTDIR)/${INST_LIBDIR}/${QLIBCEXT_LIBNAME}
+ ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBCEXT_SLIBREALNAME} $(DESTDIR)/${INST_LIBDIR}/${QLIBCEXT_SLIBREALNAME}
+ ( cd $(DESTDIR)/${INST_LIBDIR}; ${LN_S} -f ${QLIBCEXT_SLIBREALNAME} ${QLIBCEXT_SLIBNAME} )
uninstall-qlibcext:
- ${RM} -f ${INST_INCDIR}/qlibc/qlibcext.h
- ${RM} -rf ${INST_INCDIR}/qlibc/extensions
- ${RM} -f ${INST_LIBDIR}/${QLIBCEXT_LIBNAME}
- ${RM} -f ${INST_LIBDIR}/${QLIBCEXT_SLIBREALNAME}
- ${RM} -f ${INST_LIBDIR}/${QLIBCEXT_SLIBNAME}
+ ${RM} -f $(DESTDIR)/${INST_INCDIR}/qlibc/qlibcext.h
+ ${RM} -rf $(DESTDIR)/${INST_INCDIR}/qlibc/extensions
+ ${RM} -f $(DESTDIR)/${INST_LIBDIR}/${QLIBCEXT_LIBNAME}
+ ${RM} -f $(DESTDIR)/${INST_LIBDIR}/${QLIBCEXT_SLIBREALNAME}
+ ${RM} -f $(DESTDIR)/${INST_LIBDIR}/${QLIBCEXT_SLIBNAME}
deinstall: uninstall
uninstall: uninstall-qlibc uninstall-qlibcext
- ${RMDIR} ${INST_INCDIR}/qlibc
+ ${RMDIR} $(DESTDIR)/${INST_INCDIR}/qlibc
clean:
${RM} -f ${QLIBC_OBJS}
|
shibajee/buildroot
|
package/qlibc/0002-obey-destdir.patch
|
patch
|
mit
| 9,537 |
Allow to explicitly disable openssl and mysql
AC_ARG_WITH() is being incorrectly used: the third argument indicates
the action that needs to be taken when a value was passed, when not
the option is enabled. Therefore, the result of the existing code was
that when you passed --without-mysql or --without-openssl, the
$withval variable would get the value 'yes', which is obviously wrong.
Instead, we simply empty this third argument, because $withval is
already properly filled with 'yes' or 'no' by the AC_ARG_WITH()
function.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -170,7 +170,7 @@
## --with section
##
-AC_ARG_WITH([openssl],[AS_HELP_STRING([--with-openssl], [This will enable HTTPS support in qhttpclient extension API. When it's enabled, user applications will need to link openssl library with -lssl option.])],[withval=yes],[withval=no])
+AC_ARG_WITH([openssl],[AS_HELP_STRING([--with-openssl], [This will enable HTTPS support in qhttpclient extension API. When it's enabled, user applications will need to link openssl library with -lssl option.])],[],[withval=no])
if test "$withval" = yes; then
if test "$with_openssl" = yes; then
with_openssl="/usr/include"
@@ -185,7 +185,7 @@
fi
fi
-AC_ARG_WITH([mysql],[AS_HELP_STRING([--with-mysql], [This will enable MySQL database support in qdatabase extension API. When it's enabled, user applications need to link mysql client library. (ex: -lmysqlclient)])],[withval=yes],[withval=no])
+AC_ARG_WITH([mysql],[AS_HELP_STRING([--with-mysql], [This will enable MySQL database support in qdatabase extension API. When it's enabled, user applications need to link mysql client library. (ex: -lmysqlclient)])],[],[withval=no])
if test "$withval" = yes; then
if test "$with_mysql" = yes; then
with_mysql="/usr/include/mysql"
|
shibajee/buildroot
|
package/qlibc/0003-fix-openssl-mysql-checks.patch
|
patch
|
mit
| 1,958 |
config BR2_PACKAGE_QLIBC
bool "qlibc"
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_WCHAR
depends on !BR2_STATIC_LIBS
help
qLibc is currently one of the most functionally complete
public licensed C/C++ libraries. The C/C++ library which
includes all kinds of containers and general library
routines. It provides ready-made set of common container
APIs with consistant API look.
https://github.com/wolkykim/qlibc
comment "qlibc needs a toolchain w/ threads, wchar, dynamic library"
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || BR2_STATIC_LIBS
|
shibajee/buildroot
|
package/qlibc/Config.in
|
in
|
mit
| 643 |
# Locally calculated
sha256 1f9aa5eefd28c45d409130a35104816d41405da64fe900f70a1c41150891501a qlibc-v2.4.1.tar.gz
|
shibajee/buildroot
|
package/qlibc/qlibc.hash
|
hash
|
mit
| 114 |
################################################################################
#
# qlibc
#
################################################################################
QLIBC_VERSION = v2.4.1
QLIBC_SITE = $(call github,wolkykim,qlibc,$(QLIBC_VERSION))
QLIBC_LICENSE = BSD-2c
QLIBC_LICENSE_FILES = LICENSE
# We're patching configure.ac
QLIBC_AUTORECONF = YES
QLIBC_INSTALL_STAGING = YES
QLIBC_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv)
# The configure.ac checks for these use AC_CHECK_FILE() which doesn't
# work for cross-compilation. If someone wants to enable the support
# for OpenSSL or MySQL, some changes to the configure.ac will be
# needed.
QLIBC_CONF_OPTS = --without-mysql --without-openssl
$(eval $(autotools-package))
|
shibajee/buildroot
|
package/qlibc/qlibc.mk
|
mk
|
mit
| 750 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.