commit:     0a8718f32bdb0c1265ca3f08056c6d7a0ab1ac97
Author:     Denis Reva <denis7774 <AT> gmail <DOT> com>
AuthorDate: Sat Feb 25 12:05:31 2023 +0000
Commit:     Denis Reva <denis7774 <AT> gmail <DOT> com>
CommitDate: Sat Feb 25 12:05:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0a8718f3

-r10: migrated to setuptools via patch

as initial preparation to python3.12

Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>

 .../files/gbinder-1.0.0-setuppy-extensions.patch   | 22 -------------
 .../gbinder/files/gbinder-1.1.1-setuptools.patch   | 37 ++++++++++++++++++++++
 ...binder-9999.ebuild => gbinder-1.1.1-r10.ebuild} | 20 ++++++++----
 dev-python/gbinder/gbinder-9999.ebuild             |  8 ++---
 4 files changed, 55 insertions(+), 32 deletions(-)

diff --git a/dev-python/gbinder/files/gbinder-1.0.0-setuppy-extensions.patch 
b/dev-python/gbinder/files/gbinder-1.0.0-setuppy-extensions.patch
deleted file mode 100644
index 5990393e3..000000000
--- a/dev-python/gbinder/files/gbinder-1.0.0-setuppy-extensions.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 79d40e9e564772973f7f085ed5c48e3fc625e0f5 Mon Sep 17 00:00:00 2001
-From: Erfan Abdi <[email protected]>
-Date: Mon, 6 Sep 2021 13:57:22 +0430
-Subject: [PATCH] setup: Drop None from keywords
-
----
- setup.py | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/setup.py b/setup.py
-index cf3a42e..ed2b1ed 100644
---- a/setup.py
-+++ b/setup.py
-@@ -19,6 +19,8 @@ def pkgconfig(package, kw):
- 
- extension_kwargs = { 'sources': ["gbinder" + file_ext] }
- extension_kwargs = pkgconfig('libgbinder', extension_kwargs)
-+if None in extension_kwargs:
-+    del extension_kwargs[None]
- extensions = [Extension('gbinder', **extension_kwargs)]
- 
- if USE_CYTHON:

diff --git a/dev-python/gbinder/files/gbinder-1.1.1-setuptools.patch 
b/dev-python/gbinder/files/gbinder-1.1.1-setuptools.patch
new file mode 100644
index 000000000..94bda6295
--- /dev/null
+++ b/dev-python/gbinder/files/gbinder-1.1.1-setuptools.patch
@@ -0,0 +1,37 @@
+From 32cfbabe5ed37815358cc3515ce6551b6b7b87ae Mon Sep 17 00:00:00 2001
+From: Herrie <[email protected]>
+Date: Sat, 23 Jul 2022 20:38:22 +0200
+Subject: [PATCH] setup.py: Migrate away from deprecated distutils.core to
+ setuptools
+
+distutils will be removed in Python 3.12, but already gives issues with 3.10 
as well.
+
+/mnt/5ba5d474-0b2d-49d6-a5a6-9de20c3ac967/kirkstone/webos-ports/tmp-glibc/work/core2-64-webos-linux/python3-gbinder/1.0.0+gitAUTOINC+da16278f0d-r0/git/setup.py:2:
 DeprecationWarning: The distutils package is deprecated and slated for removal 
in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
+  from distutils.core import setup, Extension
+Compiling gbinder.pyx because it changed.
+[1/1] Cythonizing gbinder.pyx
+usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
+   or: setup.py --help [cmd1 cmd2 ...]
+   or: setup.py --help-commands
+   or: setup.py cmd --help
+
+error: invalid command 'bdist_wheel'
+ERROR: 'python3 setup.py bdist_wheel sdist --cython' execution failed.
+WARNING: exit code 1 from a shell command.
+
+Signed-off-by: Herman van Hazendonk <[email protected]>
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index ed2b1ed..6060f84 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,5 +1,5 @@
+ import sys, subprocess
+-from distutils.core import setup, Extension
++from setuptools import setup, Extension
+ 
+ 
+ def pkgconfig(package, kw):

diff --git a/dev-python/gbinder/gbinder-9999.ebuild 
b/dev-python/gbinder/gbinder-1.1.1-r10.ebuild
similarity index 68%
copy from dev-python/gbinder/gbinder-9999.ebuild
copy to dev-python/gbinder/gbinder-1.1.1-r10.ebuild
index 913d0d608..aa03fbfe9 100644
--- a/dev-python/gbinder/gbinder-9999.ebuild
+++ b/dev-python/gbinder/gbinder-1.1.1-r10.ebuild
@@ -3,7 +3,9 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
+
+DISTUTILS_USE_PEP517="setuptools"
 
 inherit distutils-r1
 
@@ -12,8 +14,7 @@ if [[ ${PV} != *9999* ]]; then
        MY_P="${MY_PN}-${PV}"
        S="${WORKDIR}/${MY_P}"
        
SRC_URI="https://github.com/erfanoabdi/gbinder-python/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-       KEYWORDS="~amd64"
-       PATCHES=( "${FILESDIR}/${P}-setuppy-extensions.patch" )
+       KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 else
        inherit git-r3
        EGIT_REPO_URI="https://github.com/erfanoabdi/gbinder-python.git";
@@ -24,13 +25,20 @@ HOMEPAGE="https://github.com/erfanoabdi/gbinder-python";
 LICENSE="GPL-3"
 SLOT="0"
 
-DEPEND="dev-libs/gbinder"
+PATCHES=(
+       "${FILESDIR}"/gbinder-1.1.1-setuptools.patch
+)
+
+
+DEPEND="dev-libs/gbinder
+       dev-libs/libglibutil"
 RDEPEND="${DEPEND}"
 BDEPEND="
        virtual/pkgconfig
        dev-python/cython[${PYTHON_USEDEP}]
+       ${DISTUTILS_DEPS}
 "
 
-python_compile() {
-       distutils-r1_python_compile --cython
+python_configure_all () {
+       DISTUTILS_ARGS=( --cython )
 }

diff --git a/dev-python/gbinder/gbinder-9999.ebuild 
b/dev-python/gbinder/gbinder-9999.ebuild
index 913d0d608..b93707756 100644
--- a/dev-python/gbinder/gbinder-9999.ebuild
+++ b/dev-python/gbinder/gbinder-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
 
 inherit distutils-r1
 
@@ -12,8 +12,7 @@ if [[ ${PV} != *9999* ]]; then
        MY_P="${MY_PN}-${PV}"
        S="${WORKDIR}/${MY_P}"
        
SRC_URI="https://github.com/erfanoabdi/gbinder-python/archive/${PV}.tar.gz -> 
${P}.tar.gz"
-       KEYWORDS="~amd64"
-       PATCHES=( "${FILESDIR}/${P}-setuppy-extensions.patch" )
+       KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 else
        inherit git-r3
        EGIT_REPO_URI="https://github.com/erfanoabdi/gbinder-python.git";
@@ -24,7 +23,8 @@ HOMEPAGE="https://github.com/erfanoabdi/gbinder-python";
 LICENSE="GPL-3"
 SLOT="0"
 
-DEPEND="dev-libs/gbinder"
+DEPEND="dev-libs/gbinder
+       dev-libs/libglibutil"
 RDEPEND="${DEPEND}"
 BDEPEND="
        virtual/pkgconfig

Reply via email to