diff options
Diffstat (limited to 'meta/recipes-devtools/python/python_2.7.13.bb')
| -rw-r--r-- | meta/recipes-devtools/python/python_2.7.13.bb | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.13.bb b/meta/recipes-devtools/python/python_2.7.13.bb index dbafb955f9..337c7447bb 100644 --- a/meta/recipes-devtools/python/python_2.7.13.bb +++ b/meta/recipes-devtools/python/python_2.7.13.bb | |||
| @@ -202,12 +202,14 @@ RPROVIDES_${PN} += "${PN}-modules" | |||
| 202 | INCLUDE_PYCS ?= "1" | 202 | INCLUDE_PYCS ?= "1" |
| 203 | 203 | ||
| 204 | python(){ | 204 | python(){ |
| 205 | import json | ||
| 205 | 206 | ||
| 206 | pythondir = d.getVar('THISDIR',True) | 207 | filename = os.path.join(d.getVar('THISDIR'), 'python', 'python2-manifest.json') |
| 208 | # This python changes the datastore based on the contents of a file, so mark | ||
| 209 | # that dependency. | ||
| 210 | bb.parse.mark_dependency(d, filename) | ||
| 207 | 211 | ||
| 208 | # Read JSON manifest | 212 | with open(filename) as manifest_file: |
| 209 | import json | ||
| 210 | with open(pythondir+'/python/python2-manifest.json') as manifest_file: | ||
| 211 | python_manifest=json.load(manifest_file) | 213 | python_manifest=json.load(manifest_file) |
| 212 | 214 | ||
| 213 | include_pycs = d.getVar('INCLUDE_PYCS') | 215 | include_pycs = d.getVar('INCLUDE_PYCS') |
| @@ -215,7 +217,6 @@ python(){ | |||
| 215 | packages = d.getVar('PACKAGES').split() | 217 | packages = d.getVar('PACKAGES').split() |
| 216 | pn = d.getVar('PN') | 218 | pn = d.getVar('PN') |
| 217 | 219 | ||
| 218 | |||
| 219 | newpackages=[] | 220 | newpackages=[] |
| 220 | 221 | ||
| 221 | for key in python_manifest: | 222 | for key in python_manifest: |
| @@ -250,25 +251,22 @@ python(){ | |||
| 250 | d.setVar('ALLOW_EMPTY_${PN}-modules', '1') | 251 | d.setVar('ALLOW_EMPTY_${PN}-modules', '1') |
| 251 | } | 252 | } |
| 252 | 253 | ||
| 253 | do_split_packages[file-checksums] += "${THISDIR}/python/python2-manifest.json:True" | ||
| 254 | |||
| 255 | # Files needed to create a new manifest | 254 | # Files needed to create a new manifest |
| 256 | SRC_URI += "file://create_manifest2.py file://get_module_deps2.py file://python2-manifest.json" | 255 | SRC_URI += "file://create_manifest2.py file://get_module_deps2.py file://python2-manifest.json" |
| 257 | 256 | ||
| 258 | do_create_manifest() { | 257 | do_create_manifest() { |
| 259 | 258 | # This task should be run with every new release of Python. | |
| 260 | # This task should be run with every new release of Python. | 259 | # We must ensure that PACKAGECONFIG enables everything when creating |
| 261 | # We must ensure that PACKAGECONFIG enables everything when creating | 260 | # a new manifest, this is to base our new manifest on a complete |
| 262 | # a new manifest, this is to base our new manifest on a complete | 261 | # native python build, containing all dependencies, otherwise the task |
| 263 | # native python build, containing all dependencies, otherwise the task | 262 | # wont be able to find the required files. |
| 264 | # wont be able to find the required files. | 263 | # e.g. BerkeleyDB is an optional build dependency so it may or may not |
| 265 | # e.g. BerkeleyDB is an optional build dependency so it may or may not | 264 | # be present, we must ensure it is. |
| 266 | # be present, we must ensure it is. | 265 | |
| 267 | 266 | cd ${WORKDIR} | |
| 268 | cd ${WORKDIR} | 267 | # This needs to be executed by python-native and NOT by HOST's python |
| 269 | # This needs to be executed by python-native and NOT by HOST's python | 268 | nativepython create_manifest2.py |
| 270 | nativepython create_manifest2.py | 269 | cp python2-manifest.json.new ${THISDIR}/python/python2-manifest.json |
| 271 | cp python2-manifest.json.new ${THISDIR}/python/python2-manifest.json | ||
| 272 | } | 270 | } |
| 273 | 271 | ||
| 274 | # bitbake python -c create_manifest | 272 | # bitbake python -c create_manifest |
