mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
i2c-tools: Don't use distutilscross
This commit is contained in:
parent
7aa2153ada
commit
472dda0a4d
@ -7,37 +7,26 @@ PKG_SHA256="1f899e43603184fac32f34d72498fc737952dbc9c97a8dd9467fadfdf4600cf9"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://i2c.wiki.kernel.org/index.php/I2C_Tools"
|
||||
PKG_URL="https://www.kernel.org/pub/software/utils/i2c-tools/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
PKG_DEPENDS_TARGET="toolchain Python3 distutilscross:host"
|
||||
PKG_DEPENDS_TARGET="toolchain Python3"
|
||||
PKG_LONGDESC="A heterogeneous set of I2C tools for Linux."
|
||||
PKG_BUILD_FLAGS="-sysroot"
|
||||
|
||||
pre_make_target() {
|
||||
export PYTHONXCPREFIX="${SYSROOT_PREFIX}/usr"
|
||||
export LDSHARED="${CC} -shared"
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make CC="${CC}" \
|
||||
AR="${AR}" \
|
||||
CFLAGS="${TARGET_CFLAGS}" \
|
||||
CPPFLAGS="${TARGET_CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}" \
|
||||
PYTHON=${TOOLCHAIN}/bin/python3 \
|
||||
CPPFLAGS="${TARGET_CPPFLAGS}" \
|
||||
all
|
||||
|
||||
make EXTRA="py-smbus" \
|
||||
CC="${CC}" \
|
||||
AR="${AR}" \
|
||||
CFLAGS="${TARGET_CFLAGS}" \
|
||||
CPPFLAGS="${TARGET_CPPFLAGS} -I${SYSROOT_PREFIX}/usr/include/${PKG_PYTHON_VERSION}" \
|
||||
PYTHON=${TOOLCHAIN}/bin/python3 \
|
||||
all-python
|
||||
(
|
||||
cd py-smbus
|
||||
python_target_env python3 setup.py build
|
||||
)
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
make EXTRA="py-smbus" \
|
||||
DESTDIR=${INSTALL} \
|
||||
PREFIX="/usr" \
|
||||
prefix="/usr" \
|
||||
PYTHON=${TOOLCHAIN}/bin/python3 \
|
||||
install
|
||||
(
|
||||
cd py-smbus
|
||||
exec_thread_safe python_target_env python3 setup.py install --root=${INSTALL} --prefix=/usr
|
||||
)
|
||||
}
|
||||
|
@ -0,0 +1,38 @@
|
||||
From cf3541b8a7ed50782edd05836020d31230fb86c6 Mon Sep 17 00:00:00 2001
|
||||
From: Ross Burton <ross.burton@arm.com>
|
||||
Date: Wed, 19 Jan 2022 12:08:53 +0100
|
||||
Subject: py-smbus: Use setuptools instead of distutils
|
||||
|
||||
As per [1], distutils is deprecated in Python 3.10 and will be removed
|
||||
entirely in Python 3.12.
|
||||
|
||||
As setuptools is essentially an enhanced version of distutils, it's
|
||||
trivial to port to that.
|
||||
|
||||
[1] https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated
|
||||
|
||||
Signed-off-by: Ross Burton <ross.burton@arm.com>
|
||||
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
||||
|
||||
Upstream: https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/commit/?id=cf3541b8a7ed50782edd05836020d31230fb86c6
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
py-smbus/setup.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/py-smbus/setup.py b/py-smbus/setup.py
|
||||
index 28a4500..26db33a 100644
|
||||
--- a/py-smbus/setup.py
|
||||
+++ b/py-smbus/setup.py
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
-from distutils.core import setup, Extension
|
||||
+from setuptools import setup, Extension
|
||||
|
||||
setup( name="smbus",
|
||||
version="1.1",
|
||||
--
|
||||
cgit
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -ur a/py-smbus/Module.mk b/py-smbus/Module.mk
|
||||
--- a/py-smbus/Module.mk 2014-02-20 09:37:15.711233000 +0100
|
||||
+++ b/py-smbus/Module.mk 2019-12-14 08:20:51.730946457 +0100
|
||||
@@ -22,7 +22,7 @@
|
||||
rm -rf py-smbus/build
|
||||
|
||||
install-python:
|
||||
- $(DISTUTILS) install
|
||||
+ $(DISTUTILS) install --prefix=$(DESTDIR)$(PREFIX)
|
||||
|
||||
all: all-python
|
||||
|
Loading…
x
Reference in New Issue
Block a user