39 lines
981 B
Makefile
39 lines
981 B
Makefile
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||
|
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
|
||
|
|
||
|
PKG_NAME="pyyaml"
|
||
|
PKG_VERSION="d0d660d035905d9c49fc0f8dafb579d2cc68c0c8"
|
||
|
PKG_SHA256=""
|
||
|
PKG_LICENSE="OSS"
|
||
|
PKG_SITE="https://github.com/yaml/pyyaml"
|
||
|
PKG_URL="$PKG_SITE/archive/$PKG_VERSION.tar.gz"
|
||
|
PKG_DEPENDS_TARGET="toolchain Python2 distutilscross:host"
|
||
|
PKG_LONGDESC="Python 2 and 3 compatibility library "
|
||
|
PKG_TOOLCHAIN="manual"
|
||
|
|
||
|
make_host() {
|
||
|
python3 setup.py build
|
||
|
}
|
||
|
|
||
|
makeinstall_host() {
|
||
|
python3 setup.py install --prefix=$TOOLCHAIN
|
||
|
}
|
||
|
|
||
|
pre_make_target() {
|
||
|
export PYTHONXCPREFIX="$SYSROOT_PREFIX/usr"
|
||
|
export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -L$SYSROOT_PREFIX/lib"
|
||
|
export LDSHARED="$CC -shared"
|
||
|
}
|
||
|
|
||
|
make_target() {
|
||
|
python setup.py build
|
||
|
}
|
||
|
|
||
|
makeinstall_target() {
|
||
|
python setup.py install --root=$INSTALL --prefix=/usr
|
||
|
}
|
||
|
|
||
|
post_makeinstall_target() {
|
||
|
find $INSTALL/usr/lib/python*/site-packages/ -name "*.py" -exec rm -rf {} ";"
|
||
|
}
|