distribution/packages/tools/sysutils/six/package.mk

31 lines
967 B
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2019-present Shanti Gilbert (https://github.com/shantigilbert)
PKG_NAME="six"
PKG_VERSION="aa4e90bcd7b7bc13a71dfaebcb2021f4caaa8432"
PKG_SHA256="c96447798c18575887c4eddc9bf05fc09ba52d008584f0e5c2d8337795572d61"
PKG_LICENSE="OSS"
PKG_SITE="https://github.com/benjaminp/six"
2023-02-24 13:53:43 +00:00
PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz"
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_TARGET="toolchain Python3 distutilscross:host"
PKG_LONGDESC="Python 2 and 3 compatibility library "
PKG_TOOLCHAIN="manual"
pre_make_target() {
2023-02-24 13:53:43 +00:00
export PYTHONXCPREFIX="${SYSROOT_PREFIX}/usr"
export LDFLAGS="${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib"
export LDSHARED="${CC} -shared"
2022-02-05 14:23:32 +00:00
}
make_target() {
python3 setup.py build --cross-compile
}
makeinstall_target() {
2023-02-24 13:53:43 +00:00
python3 setup.py install --root=${INSTALL} --prefix=/usr
2022-02-05 14:23:32 +00:00
}
post_makeinstall_target() {
2023-02-24 13:53:43 +00:00
find ${INSTALL}/usr/lib/python*/site-packages/ -name "*.py" -exec rm -rf {} ";"
2022-02-05 14:23:32 +00:00
}