diff options
| author | Ross Burton <ross@burtonini.com> | 2022-01-14 16:55:39 +0000 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2022-01-18 09:01:51 -0800 |
| commit | 08b6679ad0c249d76a33f558b7d3e1136a84e99b (patch) | |
| tree | 6f74be06a067318b9f988ee73d99e890cd5c93ec | |
| parent | b298118df9cc1b633df82f06c485d489429428f7 (diff) | |
| download | meta-openembedded-08b6679ad0c249d76a33f558b7d3e1136a84e99b.tar.gz | |
sanlock: port to setuptools
Port setup.py to setuptools as distutils is now deprecated.
Also, set S to the top of the git repo and use SETUPTOOLS_SETUP_PATH
to run the correct script, which means paths outside of the Python
module are neater.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-extended/sanlock/sanlock/setuptools.patch | 18 | ||||
| -rw-r--r-- | meta-oe/recipes-extended/sanlock/sanlock_3.8.4.bb | 19 |
2 files changed, 28 insertions, 9 deletions
diff --git a/meta-oe/recipes-extended/sanlock/sanlock/setuptools.patch b/meta-oe/recipes-extended/sanlock/sanlock/setuptools.patch new file mode 100644 index 0000000000..bc2c68c1c5 --- /dev/null +++ b/meta-oe/recipes-extended/sanlock/sanlock/setuptools.patch | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | Switch to setuptools as distutils is deprecated. | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
| 5 | |||
| 6 | diff --git a/python/setup.py b/python/setup.py | ||
| 7 | index b3bfaf1..dfbaf21 100644 | ||
| 8 | --- a/python/setup.py | ||
| 9 | +++ b/python/setup.py | ||
| 10 | @@ -4,7 +4,7 @@ | ||
| 11 | # modify, copy, or redistribute it subject to the terms and conditions | ||
| 12 | # of the GNU General Public License v.2. | ||
| 13 | |||
| 14 | -from distutils.core import setup, Extension | ||
| 15 | +from setuptools import setup, Extension | ||
| 16 | |||
| 17 | sanlocklib = ['sanlock'] | ||
| 18 | sanlock = Extension(name='sanlock', | ||
diff --git a/meta-oe/recipes-extended/sanlock/sanlock_3.8.4.bb b/meta-oe/recipes-extended/sanlock/sanlock_3.8.4.bb index 8a9702d869..3c08c4e003 100644 --- a/meta-oe/recipes-extended/sanlock/sanlock_3.8.4.bb +++ b/meta-oe/recipes-extended/sanlock/sanlock_3.8.4.bb | |||
| @@ -9,31 +9,32 @@ HOMEPAGE = "https://pagure.io/sanlock" | |||
| 9 | SECTION = "utils" | 9 | SECTION = "utils" |
| 10 | 10 | ||
| 11 | LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" | 11 | LICENSE = "LGPLv2+ & GPLv2 & GPLv2+" |
| 12 | LIC_FILES_CHKSUM = "file://../README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" | 12 | LIC_FILES_CHKSUM = "file://README.license;md5=60487bf0bf429d6b5aa72b6d37a0eb22" |
| 13 | 13 | ||
| 14 | PV .= "+git${SRCPV}" | 14 | PV .= "+git${SRCPV}" |
| 15 | 15 | ||
| 16 | SRC_URI = "git://pagure.io/sanlock.git;protocol=http;branch=master \ | 16 | SRC_URI = "git://pagure.io/sanlock.git;protocol=http;branch=master \ |
| 17 | file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch;patchdir=../ \ | 17 | file://0001-sanlock-Replace-cp-a-with-cp-R-no-dereference-preser.patch \ |
| 18 | file://setuptools.patch \ | ||
| 18 | " | 19 | " |
| 19 | SRCREV = "a181e951376d49a82eef17920c8ebedec80b4823" | 20 | SRCREV = "a181e951376d49a82eef17920c8ebedec80b4823" |
| 20 | 21 | ||
| 21 | S = "${WORKDIR}/git/python" | 22 | S = "${WORKDIR}/git" |
| 22 | 23 | ||
| 23 | DEPENDS = "libaio util-linux" | 24 | DEPENDS = "libaio util-linux" |
| 24 | 25 | ||
| 25 | inherit distutils3 useradd | 26 | inherit setuptools3 useradd |
| 26 | 27 | ||
| 27 | do_configure[noexec] = "1" | 28 | SETUPTOOLS_SETUP_PATH = "${S}/python" |
| 28 | 29 | ||
| 29 | do_compile:prepend () { | 30 | do_compile:prepend () { |
| 30 | oe_runmake -C ${S}/../wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" | 31 | oe_runmake -C ${S}/wdmd CMD_LDFLAGS="${LDFLAGS}" LIB_LDFLAGS="${LDFLAGS}" |
| 31 | oe_runmake -C ${S}/../src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}" | 32 | oe_runmake -C ${S}/src CMD_LDFLAGS="${LDFLAGS}" LIB_ENTIRE_LDFLAGS="${LDFLAGS}" LIB_CLIENT_LDFLAGS="${LDFLAGS}" |
| 32 | } | 33 | } |
| 33 | 34 | ||
| 34 | do_install:prepend () { | 35 | do_install:prepend () { |
| 35 | oe_runmake -C ${S}/../wdmd DESTDIR=${D} LIBDIR=${libdir} install | 36 | oe_runmake -C ${S}/wdmd DESTDIR=${D} LIBDIR=${libdir} install |
| 36 | oe_runmake -C ${S}/../src DESTDIR=${D} LIBDIR=${libdir} install | 37 | oe_runmake -C ${S}/src DESTDIR=${D} LIBDIR=${libdir} install |
| 37 | } | 38 | } |
| 38 | 39 | ||
| 39 | SANLOCKGROUP ?= "sanlock" | 40 | SANLOCKGROUP ?= "sanlock" |
