Skip to contentSkip to conversation

package/gtest: drop python2 host support

PATCH In review Peter Korsgaard 2 participants 2 messages Feb 10, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gtest: drop python2 host support

And simplify the package a bit while we're at it.

---
 package/gtest/gtest.mk | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
package/gtest/gtest.mk +2 -11
index 673e626c45..e7ce89a3f4 100644
@@ -19,16 +19,7 @@ endif
 
 HOST_GTEST_LICENSE = Apache-2.0
 HOST_GTEST_LICENSE_FILES = googlemock/scripts/generator/LICENSE
-ifeq ($(BR2_PACKAGE_PYTHON3),y)
-HOST_GTEST_PYTHON_VERSION = $(PYTHON3_VERSION_MAJOR)
-HOST_GTEST_DEPENDENCIES += host-python3
-else
-HOST_GTEST_PYTHON_VERSION = $(PYTHON_VERSION_MAJOR)
-HOST_GTEST_DEPENDENCIES += host-python
-endif
-
-HOST_GTEST_GMOCK_PYTHONPATH = \
-	$(HOST_DIR)/lib/python$(HOST_GTEST_PYTHON_VERSION)/site-packages
+HOST_GTEST_DEPENDENCIES = host-python3
 
 # While it is possible to build gtest as shared library, using this gtest shared
 # library requires to set some special configure option in the project using
@@ -56,7 +47,7 @@ define HOST_GTEST_POST_INSTALL_PYTHON
 	$(INSTALL) -D -m 0755 $(@D)/googlemock/scripts/generator/gmock_gen.py \
 		$(HOST_DIR)/bin/gmock_gen
 	cp -rp $(@D)/googlemock/scripts/generator/cpp \
-		$(HOST_GTEST_GMOCK_PYTHONPATH)
+		$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
 endef
 
 HOST_GTEST_POST_INSTALL_HOOKS += HOST_GTEST_POST_INSTALL_PYTHON
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Peter, All,

On 2022-02-10 20:14 +0100, Peter Korsgaard spake thusly:

Quoted 3 lines

And simplify the package a bit while we're at it.

Appied to master, along with your three other python-related patches.

Regards,
Yann E. MORIN.

Quoted 42 lines
---
 package/gtest/gtest.mk | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
package/gtest/gtest.mk +2 -11
index 673e626c45..e7ce89a3f4 100644
@@ -19,16 +19,7 @@ endif
 
 HOST_GTEST_LICENSE = Apache-2.0
 HOST_GTEST_LICENSE_FILES = googlemock/scripts/generator/LICENSE
-ifeq ($(BR2_PACKAGE_PYTHON3),y)
-HOST_GTEST_PYTHON_VERSION = $(PYTHON3_VERSION_MAJOR)
-HOST_GTEST_DEPENDENCIES += host-python3
-else
-HOST_GTEST_PYTHON_VERSION = $(PYTHON_VERSION_MAJOR)
-HOST_GTEST_DEPENDENCIES += host-python
-endif
-
-HOST_GTEST_GMOCK_PYTHONPATH = \
-	$(HOST_DIR)/lib/python$(HOST_GTEST_PYTHON_VERSION)/site-packages
+HOST_GTEST_DEPENDENCIES = host-python3
 
 # While it is possible to build gtest as shared library, using this gtest shared
 # library requires to set some special configure option in the project using
@@ -56,7 +47,7 @@ define HOST_GTEST_POST_INSTALL_PYTHON
 	$(INSTALL) -D -m 0755 $(@D)/googlemock/scripts/generator/gmock_gen.py \
 		$(HOST_DIR)/bin/gmock_gen
 	cp -rp $(@D)/googlemock/scripts/generator/cpp \
-		$(HOST_GTEST_GMOCK_PYTHONPATH)
+		$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
 endef
 
 HOST_GTEST_POST_INSTALL_HOOKS += HOST_GTEST_POST_INSTALL_PYTHON
Signature · 6 lines
2.20.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot