diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3-native_3.5.3.bb')
-rw-r--r-- | meta/recipes-devtools/python/python3-native_3.5.3.bb | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/meta/recipes-devtools/python/python3-native_3.5.3.bb b/meta/recipes-devtools/python/python3-native_3.5.3.bb index 8cd9c88a82..3053c4bace 100644 --- a/meta/recipes-devtools/python/python3-native_3.5.3.bb +++ b/meta/recipes-devtools/python/python3-native_3.5.3.bb | |||
@@ -42,8 +42,6 @@ DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native s | |||
42 | 42 | ||
43 | inherit native | 43 | inherit native |
44 | 44 | ||
45 | require python-native-${PYTHON_MAJMIN}-manifest.inc | ||
46 | |||
47 | # uninative may be used on pre glibc 2.25 systems which don't have getentropy | 45 | # uninative may be used on pre glibc 2.25 systems which don't have getentropy |
48 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip ac_cv_func_getentropy=no" | 46 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip ac_cv_func_getentropy=no" |
49 | 47 | ||
@@ -77,8 +75,30 @@ do_install() { | |||
77 | sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT | 75 | sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT |
78 | done | 76 | done |
79 | 77 | ||
80 | # Tests are large and we don't need them in the native sysroot | 78 | # Add a symlink to the native Python so that scripts can just invoke |
81 | rm ${D}${libdir}/python${PYTHON_MAJMIN}/test -rf | 79 | # "nativepython" and get the right one without needing absolute paths |
80 | # (these often end up too long for the #! parser in the kernel as the | ||
81 | # buffer is 128 bytes long). | ||
82 | ln -s python3-native/python3 ${D}${bindir}/nativepython3 | ||
82 | } | 83 | } |
83 | 84 | ||
84 | RPROVIDES += "python3-misc-native" | 85 | python(){ |
86 | |||
87 | # Read JSON manifest | ||
88 | import json | ||
89 | pythondir = d.getVar('THISDIR',True) | ||
90 | with open(pythondir+'/python3/python3-manifest.json') as manifest_file: | ||
91 | python_manifest=json.load(manifest_file) | ||
92 | |||
93 | rprovides = d.getVar('RPROVIDES').split() | ||
94 | |||
95 | # Hardcoded since it cant be python3-native-foo, should be python3-foo-native | ||
96 | pn = 'python3' | ||
97 | |||
98 | for key in python_manifest: | ||
99 | pypackage = pn + '-' + key + '-native' | ||
100 | if pypackage not in rprovides: | ||
101 | rprovides.append(pypackage) | ||
102 | |||
103 | d.setVar('RPROVIDES', ' '.join(rprovides)) | ||
104 | } | ||