Skip to contentSkip to conversation

package/python3-cython: new package

PATCH New Fabrice Fontaine 3 participants 5 messages Jul 28, 2020 – Aug 8, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/python3-cython: new package

The host-setools package needs to be built for the host-python3, even when the target Python is not necessarily Python 3.x. Since it depends on host-python-cython, we need a Python 3 variant of it, which this patch introduces.

---
 package/python-cython/python-cython.mk     |  1 +
 package/python3-cython/python3-cython.hash |  1 +
 package/python3-cython/python3-cython.mk   | 16 ++++++++++++++++
 3 files changed, 18 insertions(+)
 create mode 120000 package/python3-cython/python3-cython.hash
 create mode 100644 package/python3-cython/python3-cython.mk
package/python-cython/python-cython.mk +1 -0
index cf19e35b8b..d2b0812f62 100644
@@ -4,6 +4,7 @@
 #
 ################################################################################
 
+# Please keep in sync with package/python3-cython/python3-cython.mk
 PYTHON_CYTHON_VERSION = 0.29.17
 PYTHON_CYTHON_SOURCE = Cython-$(PYTHON_CYTHON_VERSION).tar.gz
 PYTHON_CYTHON_SITE = https://files.pythonhosted.org/packages/99/36/a3dc962cc6d08749aa4b9d85af08b6e354d09c5468a3e0edc610f44c856b
package/python3-cython/python3-cython.hash new file +1 -0
new file mode 120000
index 0000000000..70dde64105
@@ -0,0 +1 @@
+../python-cython/python-cython.hash
\ No newline at end of file
package/python3-cython/python3-cython.mk new file +16 -0
new file mode 100644
index 0000000000..473a0f2d40
@@ -0,0 +1,16 @@
+################################################################################
+#
+# python3-cython
+#
+################################################################################
+
+# Please keep in sync with package/python-cython/python-cython.mk
+PYTHON3_CYTHON_VERSION = 0.29.17
+PYTHON3_CYTHON_SOURCE = Cython-$(PYTHON3_CYTHON_VERSION).tar.gz
+PYTHON3_CYTHON_SITE = https://files.pythonhosted.org/packages/99/36/a3dc962cc6d08749aa4b9d85af08b6e354d09c5468a3e0edc610f44c856b
+PYTHON3_CYTHON_SETUP_TYPE = setuptools
+PYTHON3_CYTHON_LICENSE = Apache-2.0
+PYTHON3_CYTHON_LICENSE_FILES = COPYING.txt LICENSE.txt
+HOST_PYTHON3_CYTHON_NEEDS_HOST_PYTHON = python3
+
+$(eval $(host-python-package))
Signature · 1 line
2.27.0
#1 lore raw

PATCH 2/2 package/setools: install for host-python3

setools needs python3 since version 4.2.0 and
https://github.com/SELinuxProject/setools/commit/e292a77c52ed882707c8d165e77914837367313f

However today in Buildroot, when no target python is selected, or when BR2_PACKAGE_PYTHON=y, all host python modules are installed for host-python, i.e Python 2. But this module won't install in Python 2, so let's force its host variant to be installed with Python 3 on the host. Of course, for that to work, its dependency must also be built for host-python3, so we change it to the newly introduced host-python3-cython package.

Fixes:
- http://autobuild.buildroot.org/results/c2febcea5fbd8a21709721524ae9e9b5fc0896f9

---
 package/setools/Config.in  | 2 +-
 package/setools/setools.mk | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
package/setools/Config.in +1 -1
index b26029a162..3ab7f55948 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_SETOOLS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_WCHAR
 	depends on BR2_USE_MMU
-	depends on BR2_PACKAGE_PYTHON3 # python-networkx
+	depends on BR2_PACKAGE_PYTHON3
 	select BR2_PACKAGE_PYTHON_NETWORKX # runtime
 	select BR2_PACKAGE_PYTHON_SETUPTOOLS
 	select BR2_PACKAGE_LIBSELINUX
package/setools/setools.mk +2 -1
index 24da3613c4..c1a3a909cb 100644
@@ -11,7 +11,8 @@ SETOOLS_INSTALL_STAGING = YES
 SETOOLS_LICENSE = GPL-2.0+, LGPL-2.1+
 SETOOLS_LICENSE_FILES = COPYING COPYING.GPL COPYING.LGPL
 SETOOLS_SETUP_TYPE = setuptools
-HOST_SETOOLS_DEPENDENCIES = host-python-cython host-libselinux host-libsepol host-python-networkx
+HOST_SETOOLS_DEPENDENCIES = host-python3-cython host-libselinux host-libsepol host-python-networkx
+HOST_SETOOLS_NEEDS_HOST_PYTHON = python3
 
 define SETOOLS_FIX_SETUP
 	# By default, setup.py will look for libsepol.a in the host machines
Signature · 1 line
2.27.0
#2 lore raw

PATCH 2/2 package/setools: install for host-python3

All;

Quoted 51 lines · Fabrice Fontaine

setools needs python3 since version 4.2.0 and
https://github.com/SELinuxProject/setools/commit/e292a77c52ed882707c8d165e77914837367313f

However today in Buildroot, when no target python is selected, or when BR2_PACKAGE_PYTHON=y, all host python modules are installed for host-python, i.e Python 2. But this module won't install in Python 2, so let's force its host variant to be installed with Python 3 on the host. Of course, for that to work, its dependency must also be built for host-python3, so we change it to the newly introduced host-python3-cython package.

Fixes:
- http://autobuild.buildroot.org/results/c2febcea5fbd8a21709721524ae9e9b5fc0896f9

---
 package/setools/Config.in  | 2 +-
 package/setools/setools.mk | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
package/setools/Config.in +1 -1
index b26029a162..3ab7f55948 100644
@@ -4,7 +4,7 @@ config BR2_PACKAGE_SETOOLS
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on BR2_USE_WCHAR
        depends on BR2_USE_MMU
-       depends on BR2_PACKAGE_PYTHON3 # python-networkx
+       depends on BR2_PACKAGE_PYTHON3
        select BR2_PACKAGE_PYTHON_NETWORKX # runtime
        select BR2_PACKAGE_PYTHON_SETUPTOOLS
        select BR2_PACKAGE_LIBSELINUX
package/setools/setools.mk +2 -2
index 24da3613c4..c1a3a909cb 100644
@@ -11,7 +11,8 @@ SETOOLS_INSTALL_STAGING = YES
 SETOOLS_LICENSE = GPL-2.0+, LGPL-2.1+
 SETOOLS_LICENSE_FILES = COPYING COPYING.GPL COPYING.LGPL
 SETOOLS_SETUP_TYPE = setuptools
-HOST_SETOOLS_DEPENDENCIES = host-python-cython host-libselinux host-libsepol host-python-networkx
+HOST_SETOOLS_DEPENDENCIES = host-python3-cython host-libselinux host-libsepol host-python-networkx
+HOST_SETOOLS_NEEDS_HOST_PYTHON = python3
 
 define SETOOLS_FIX_SETUP
        # By default, setup.py will look for libsepol.a in the host machines
--

2.27.0

#3 lore raw

PATCH 1/2 package/python3-cython: new package

In reply to Fabrice Fontaine

All;

Quoted 60 lines · Fabrice Fontaine

The host-setools package needs to be built for the host-python3, even when the target Python is not necessarily Python 3.x. Since it depends on host-python-cython, we need a Python 3 variant of it, which this patch introduces.

---
 package/python-cython/python-cython.mk     |  1 +
 package/python3-cython/python3-cython.hash |  1 +
 package/python3-cython/python3-cython.mk   | 16 ++++++++++++++++
 3 files changed, 18 insertions(+)
 create mode 120000 package/python3-cython/python3-cython.hash
 create mode 100644 package/python3-cython/python3-cython.mk
package/python-cython/python-cython.mk +1 -0
index cf19e35b8b..d2b0812f62 100644
@@ -4,6 +4,7 @@
 #
 ################################################################################
 
+# Please keep in sync with package/python3-cython/python3-cython.mk
 PYTHON_CYTHON_VERSION = 0.29.17
 PYTHON_CYTHON_SOURCE = Cython-$(PYTHON_CYTHON_VERSION).tar.gz
 PYTHON_CYTHON_SITE = https://files.pythonhosted.org/packages/99/36/a3dc962cc6d08749aa4b9d85af08b6e354d09c5468a3e0edc610f44c856b
package/python3-cython/python3-cython.hash new file +1 -0
new file mode 120000
index 0000000000..70dde64105
@@ -0,0 +1 @@
+../python-cython/python-cython.hash
\ No newline at end of file
package/python3-cython/python3-cython.mk new file +16 -1
new file mode 100644
index 0000000000..473a0f2d40
@@ -0,0 +1,16 @@
+################################################################################
+#
+# python3-cython
+#
+################################################################################
+
+# Please keep in sync with package/python-cython/python-cython.mk
+PYTHON3_CYTHON_VERSION = 0.29.17
+PYTHON3_CYTHON_SOURCE = Cython-$(PYTHON3_CYTHON_VERSION).tar.gz
+PYTHON3_CYTHON_SITE = https://files.pythonhosted.org/packages/99/36/a3dc962cc6d08749aa4b9d85af08b6e354d09c5468a3e0edc610f44c856b
+PYTHON3_CYTHON_SETUP_TYPE = setuptools
+PYTHON3_CYTHON_LICENSE = Apache-2.0
+PYTHON3_CYTHON_LICENSE_FILES = COPYING.txt LICENSE.txt
+HOST_PYTHON3_CYTHON_NEEDS_HOST_PYTHON = python3
+
+$(eval $(host-python-package))
--

2.27.0

#4 lore raw

PATCH 1/2 package/python3-cython: new package

In reply to Fabrice Fontaine
Quoted 5 lines · On Tue, 28 Jul 2020 11:26:56 +0200 Fabrice Fontaine…

The host-setools package needs to be built for the host-python3, even when the target Python is not necessarily Python 3.x. Since it depends on host-python-cython, we need a Python 3 variant of it, which this patch introduces.

Quoted 8 lines
---
 package/python-cython/python-cython.mk     |  1 +
 package/python3-cython/python3-cython.hash |  1 +
 package/python3-cython/python3-cython.mk   | 16 ++++++++++++++++
 3 files changed, 18 insertions(+)
 create mode 120000 package/python3-cython/python3-cython.hash
 create mode 100644 package/python3-cython/python3-cython.mk

Both patches applied to master. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com