mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Python2: rename Python to Python2
This commit is contained in:
parent
adf3f57e6c
commit
971f56b37c
@ -131,6 +131,7 @@ reset_pkg_vars() {
|
||||
PKG_LICENSE="unknown"
|
||||
PKG_AUTORECONF="no"
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_PYTHON_VERSION="python2.7"
|
||||
}
|
||||
|
||||
kernel_path() {
|
||||
|
@ -16,23 +16,23 @@
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Python"
|
||||
PKG_NAME="Python2"
|
||||
PKG_VERSION="2.7.13"
|
||||
PKG_SHA256="35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.python.org/"
|
||||
PKG_URL="http://www.python.org/ftp/python/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_URL="http://www.python.org/ftp/python/$PKG_VERSION/${PKG_NAME::-1}-$PKG_VERSION.tar.xz"
|
||||
PKG_SOURCE_DIR="${PKG_NAME::-1}-$PKG_VERSION*"
|
||||
PKG_DEPENDS_HOST="zlib:host bzip2:host sqlite:host"
|
||||
PKG_DEPENDS_TARGET="toolchain sqlite expat zlib bzip2 openssl libffi Python:host"
|
||||
PKG_DEPENDS_TARGET="toolchain sqlite expat zlib bzip2 openssl libffi Python2:host"
|
||||
PKG_SECTION="lang"
|
||||
PKG_SHORTDESC="python: The Python programming language"
|
||||
PKG_LONGDESC="Python is an interpreted object-oriented programming language, and is often compared with Tcl, Perl, Java or Scheme."
|
||||
PKG_SHORTDESC="python2: The Python2 programming language"
|
||||
PKG_LONGDESC="Python2 is an interpreted object-oriented programming language, and is often compared with Tcl, Perl, Java or Scheme."
|
||||
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="yes"
|
||||
|
||||
PY_DISABLED_MODULES="_tkinter nis gdbm bsddb ossaudiodev"
|
||||
PKG_PY_DISABLED_MODULES="_tkinter nis gdbm bsddb ossaudiodev"
|
||||
|
||||
PKG_CONFIGURE_OPTS_HOST="--cache-file=config.cache \
|
||||
--without-cxx-main \
|
||||
@ -74,7 +74,7 @@ post_patch() {
|
||||
make_host() {
|
||||
make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$HOST_LIBDIR" \
|
||||
PYTHON_DISABLE_MODULES="readline _curses _curses_panel $PY_DISABLED_MODULES"
|
||||
PYTHON_DISABLE_MODULES="readline _curses _curses_panel $PKG_PY_DISABLED_MODULES"
|
||||
|
||||
# python distutils per default adds -L$LIBDIR when linking binary extensions
|
||||
sed -e "s|^ 'LIBDIR':.*| 'LIBDIR': '/usr/lib',|g" -i $(cat pybuilddir.txt)/_sysconfigdata.py
|
||||
@ -83,7 +83,7 @@ make_host() {
|
||||
makeinstall_host() {
|
||||
make -j1 PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$HOST_LIBDIR" \
|
||||
PYTHON_DISABLE_MODULES="readline _curses _curses_panel $PY_DISABLED_MODULES" \
|
||||
PYTHON_DISABLE_MODULES="readline _curses _curses_panel $PKG_PY_DISABLED_MODULES" \
|
||||
install
|
||||
}
|
||||
|
||||
@ -93,28 +93,27 @@ pre_configure_target() {
|
||||
|
||||
make_target() {
|
||||
make -j1 CC="$CC" LDFLAGS="$TARGET_LDFLAGS -L." \
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
|
||||
PYTHON_DISABLE_MODULES="$PKG_PY_DISABLED_MODULES" \
|
||||
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$TARGET_LIBDIR"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
make -j1 CC="$CC" DESTDIR=$SYSROOT_PREFIX \
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
|
||||
PYTHON_DISABLE_MODULES="$PKG_PY_DISABLED_MODULES" \
|
||||
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$TARGET_LIBDIR" \
|
||||
install
|
||||
|
||||
make -j1 CC="$CC" DESTDIR=$INSTALL \
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
|
||||
PYTHON_DISABLE_MODULES="$PKG_PY_DISABLED_MODULES" \
|
||||
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$TARGET_LIBDIR" \
|
||||
install
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
EXCLUDE_DIRS="bsddb idlelib lib-tk lib2to3 msilib pydoc_data test unittest"
|
||||
for dir in $EXCLUDE_DIRS; do
|
||||
for dir in bsddb idlelib lib-tk lib2to3 msilib pydoc_data test unittest; do
|
||||
rm -rf $INSTALL/usr/lib/python*/$dir
|
||||
done
|
||||
|
||||
@ -125,9 +124,9 @@ post_makeinstall_target() {
|
||||
rm -rf $INSTALL/usr/bin/smtpd.py
|
||||
rm -rf $INSTALL/usr/bin/python*-config
|
||||
|
||||
cd $INSTALL/usr/lib/python2.7
|
||||
python -Wi -t -B $PKG_BUILD/Lib/compileall.py -d /usr/lib/python2.7 -f .
|
||||
find $INSTALL/usr/lib/python2.7 -name "*.py" -exec rm -f {} \; &>/dev/null
|
||||
cd $INSTALL/usr/lib/$PKG_PYTHON_VERSION
|
||||
$TOOLCHAIN/bin/python -Wi -t -B $PKG_BUILD/Lib/compileall.py -d /usr/lib/$PKG_PYTHON_VERSION -f .
|
||||
find $INSTALL/usr/lib/$PKG_PYTHON_VERSION -name "*.py" -exec rm -f {} \; &>/dev/null
|
||||
|
||||
# strip
|
||||
chmod u+w $INSTALL/usr/lib/libpython*.so.*
|
Loading…
x
Reference in New Issue
Block a user