package/mongodb: needs host-python2
PATCH 1/1 package/mongodb: needs host-python2
mongodb (like gnuradio) needs host-python2 however there is no way to enforce this so add a dependency on !BR2_PACKAGE_PYTHON3. Indeed, if BR2_PACKAGE_PYTHON3 is selected, then buildroot will only build and install host-python-typing for host-python3.
This issue was not raised in the previous version of mongodb as host-scons was the only dependency however we now have host-python-typing and host-python-pyyaml dependencies and it does not seem right to enforce python2 on those packages
Fixes:
- http://autobuild.buildroot.org/results/693bdba2c01a1b69f56d6ee75094a6a0fc3f40b4
--- package/mongodb/Config.in | 1 + 1 file changed, 1 insertion(+)
package/mongodb/Config.in +1 -0
@@ -1,6 +1,7 @@ # from https://docs.mongodb.com/manual/installation/#supported-platforms config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS bool + depends on !BR2_PACKAGE_PYTHON3 # ARM needs LDREX/STREX, so ARMv6+ default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 default y if BR2_aarch64 || BR2_powerpc64 || BR2_x86_64
Signature · 1 line
2.14.1
PATCH 1/1 package/mongodb: needs host-python2
Hi Fabrice,
Quoted 4 lines · Fabrice Fontaine
mongodb (like gnuradio) needs host-python2 however there is no way to enforce this so add a dependency on !BR2_PACKAGE_PYTHON3. Indeed, if
BR2_PACKAGE_PYTHON3is selected, then buildroot will only build and install host-python-typing for host-python3.
We really should find a better solution, because this certainly sucks...
However, IIUC, the problem is really that scons needs host-python2, not mongodb
itself. So I guess a better fix is to bump scons to 3.0.4 which supports python3.
Quoted 18 lines
This issue was not raised in the previous version of mongodb as host-scons was the only dependency however we now have host-python-typing and host-python-pyyaml dependencies and it does not seem right to enforce python2 on those packages
Fixes:
- http://autobuild.buildroot.org/results/693bdba2c01a1b69f56d6ee75094a6a0fc3f40b4Signed-off-by Fabrice Fontaine <[email protected]>--- package/mongodb/Config.in | 1 + 1 file changed, 1 insertion(+)package/mongodb/Config.in +0
-0
package/mongodb/Config.in line 4
Quoted 4 lines
package/mongodb/Config.in +1
-0@@ -1,6 +1,7 @@ # from https://docs.mongodb.com/manual/installation/#supported-platforms config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS bool + depends on !BR2_PACKAGE_PYTHON3
check-package complains here - the depends should be after the defaults.
However, ARCH_SUPPORTS is supposed to be for architecture dependencies only.
So, this should be in the package itself and in the comment.
Regards,
Arnout
Quoted 4 lines
package/mongodb/Config.in +0
-0# ARM needs LDREX/STREX, so ARMv6+ default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 default y if BR2_aarch64 || BR2_powerpc64 || BR2_x86_64
PATCH 1/1 package/mongodb: needs host-python2
Hi Arnout,
Le jeu. 7 mars 2019 ? 23:51, Arnout Vandecappelle <[email protected]> a ?crit :
Quoted 9 lines
Hi Fabrice,
Quoted 4 lines · Fabrice Fontaine
mongodb (like gnuradio) needs host-python2 however there is no way to enforce this so add a dependency on !BR2_PACKAGE_PYTHON3. Indeed, if
BR2_PACKAGE_PYTHON3is selected, then buildroot will only build and install host-python-typing for host-python3.
Quoted 4 lines
We really should find a better solution, because this certainly sucks...
However, IIUC, the problem is really that scons needs host-python2, not mongodb
itself. So I guess a better fix is to bump scons to 3.0.4 which supports python3.
Nope, the issue is not only linked to scons.
Following your advice, I tried to bump it but it still does not work because the mongodb python files (such as SConstruct) uses python2 syntax such as:
File "/home/fabrice/buildroot/output/build/mongodb-r4.0.6/SConstruct", line 906
print( "python version: " + " ".join( [ i for i in sys.version_info ] ) )
SyntaxError: invalid syntax
File "/home/fabrice/buildroot/output/build/mongodb-r4.0.6/SConstruct",
line 2102
'CheckFlag' : lambda(ctx) : CheckFlagTest(ctx, tool, extension, flag)
Two PRs are opened to add python3:
- https://github.com/mongodb/mongo/pull/1195
- https://github.com/mongodb/mongo/pull/1216
However, none of them made it to upstream :-/
The issue is really the same than with gnuradio (see the past review:
https://patchwork.ozlabs.org/patch/935105): mongodb has a dependency on host-python2 that can't be currently enforced in buildroot (as
http://patchwork.ozlabs.org/project/buildroot/list/?series=41852 was rejected).
Quoted 26 lines
Quoted 19 lines
This issue was not raised in the previous version of mongodb as host-scons was the only dependency however we now have host-python-typing and host-python-pyyaml dependencies and it does not seem right to enforce python2 on those packages
Fixes:
- http://autobuild.buildroot.org/results/693bdba2c01a1b69f56d6ee75094a6a0fc3f40b4Signed-off-by Fabrice Fontaine <[email protected]>--- package/mongodb/Config.in | 1 + 1 file changed, 1 insertion(+)package/mongodb/Config.in +0
-0package/mongodb/Config.in line 4
Quoted 4 lines
package/mongodb/Config.in +1
-0@@ -1,6 +1,7 @@ # from https://docs.mongodb.com/manual/installation/#supported-platforms config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS bool + depends on !BR2_PACKAGE_PYTHON3check-package complains here - the depends should be after the defaults.
Quoted 2 lines
However,
ARCH_SUPPORTSis supposed to be for architecture dependencies only.
So, this should be in the package itself and in the comment.
OK, I'll send a v2.
Quoted 8 lines
Regards,
ArnoutQuoted 4 lines
package/mongodb/Config.in +0
-0# ARM needs LDREX/STREX, so ARMv6+ default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 default y if BR2_aarch64 || BR2_powerpc64 || BR2_x86_64
Best Regards,
Fabrice