diff options
-rw-r--r-- | meta/recipes-devtools/python/python-native-2.7-manifest.inc | 11 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python-native_2.7.13.bb | 9 | ||||
-rwxr-xr-x | scripts/contrib/python/generate-manifest-2.7.py | 37 |
3 files changed, 42 insertions, 15 deletions
diff --git a/meta/recipes-devtools/python/python-native-2.7-manifest.inc b/meta/recipes-devtools/python/python-native-2.7-manifest.inc new file mode 100644 index 0000000000..f45147b2bc --- /dev/null +++ b/meta/recipes-devtools/python/python-native-2.7-manifest.inc | |||
@@ -0,0 +1,11 @@ | |||
1 | |||
2 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. | ||
3 | # Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py --native' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
4 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy | ||
5 | |||
6 | |||
7 | |||
8 | RPROVIDES+="python-2to3-native python-argparse-native python-audio-native python-bsddb-native python-codecs-native python-compile-native python-compiler-native python-compression-native python-contextlib-native python-core-native python-crypt-native python-ctypes-native python-curses-native python-datetime-native python-db-native python-debugger-native python-dev-native python-difflib-native python-distutils-native python-distutils-staticdev-native python-doctest-native python-email-native python-fcntl-native python-gdbm-native python-hotshot-native python-html-native python-idle-native python-image-native python-importlib-native python-io-native python-json-native python-lang-native python-logging-native python-mailbox-native python-math-native python-mime-native python-mmap-native python-multiprocessing-native python-netclient-native python-netserver-native python-numbers-native python-pickle-native python-pkgutil-native python-plistlib-native python-pprint-native python-profile-native python-pydoc-native python-re-native python-readline-native python-resource-native python-robotparser-native python-shell-native python-smtpd-native python-sqlite3-native python-sqlite3-tests-native python-stringold-native python-subprocess-native python-syslog-native python-terminal-native python-tests-native python-textutils-native python-threading-native python-tkinter-native python-unittest-native python-unixadmin-native python-xml-native python-xmlrpc-native python-zlib-native " | ||
9 | |||
10 | |||
11 | |||
diff --git a/meta/recipes-devtools/python/python-native_2.7.13.bb b/meta/recipes-devtools/python/python-native_2.7.13.bb index 9a6430dba5..7edf153489 100644 --- a/meta/recipes-devtools/python/python-native_2.7.13.bb +++ b/meta/recipes-devtools/python/python-native_2.7.13.bb | |||
@@ -25,14 +25,7 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:" | |||
25 | 25 | ||
26 | inherit native | 26 | inherit native |
27 | 27 | ||
28 | RPROVIDES += "python-distutils-native \ | 28 | require python-native-${PYTHON_MAJMIN}-manifest.inc |
29 | python-compression-native \ | ||
30 | python-textutils-native \ | ||
31 | python-codecs-native \ | ||
32 | python-core-native \ | ||
33 | python-unittest-native \ | ||
34 | python-io-native \ | ||
35 | " | ||
36 | 29 | ||
37 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}" | 30 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}" |
38 | 31 | ||
diff --git a/scripts/contrib/python/generate-manifest-2.7.py b/scripts/contrib/python/generate-manifest-2.7.py index f2ecf8d3f5..6f7a4c39e0 100755 --- a/scripts/contrib/python/generate-manifest-2.7.py +++ b/scripts/contrib/python/generate-manifest-2.7.py | |||
@@ -9,10 +9,14 @@ | |||
9 | # * Updated to no longer generate special -dbg package, instead use the | 9 | # * Updated to no longer generate special -dbg package, instead use the |
10 | # single system -dbg | 10 | # single system -dbg |
11 | # * Update version with ".1" to indicate this change | 11 | # * Update version with ".1" to indicate this change |
12 | # | ||
13 | # February 26, 2017 -- Ming Liu <peter.x.liu@external.atlascopco.com> | ||
14 | # * Updated to support generating manifest for native python | ||
12 | 15 | ||
13 | import os | 16 | import os |
14 | import sys | 17 | import sys |
15 | import time | 18 | import time |
19 | import argparse | ||
16 | 20 | ||
17 | VERSION = "2.7.2" | 21 | VERSION = "2.7.2" |
18 | 22 | ||
@@ -21,16 +25,17 @@ __version__ = "20110222.2" | |||
21 | 25 | ||
22 | class MakefileMaker: | 26 | class MakefileMaker: |
23 | 27 | ||
24 | def __init__( self, outfile ): | 28 | def __init__( self, outfile, isNative ): |
25 | """initialize""" | 29 | """initialize""" |
26 | self.packages = {} | 30 | self.packages = {} |
27 | self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] | 31 | self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] |
32 | self.isNative = isNative | ||
28 | self.output = outfile | 33 | self.output = outfile |
29 | self.out( """ | 34 | self.out( """ |
30 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. | 35 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. |
31 | # Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | 36 | # Generator: '%s%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> |
32 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy | 37 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy |
33 | """ % ( sys.argv[0], __version__ ) ) | 38 | """ % ( sys.argv[0], ' --native' if isNative else '', __version__ ) ) |
34 | 39 | ||
35 | # | 40 | # |
36 | # helper functions | 41 | # helper functions |
@@ -66,6 +71,20 @@ class MakefileMaker: | |||
66 | global VERSION | 71 | global VERSION |
67 | 72 | ||
68 | # | 73 | # |
74 | # generate rprovides line for native | ||
75 | # | ||
76 | |||
77 | if self.isNative: | ||
78 | rprovideLine = 'RPROVIDES+="' | ||
79 | for name in sorted(self.packages): | ||
80 | rprovideLine += "%s-native " % name.replace( '${PN}', 'python' ) | ||
81 | rprovideLine += '"' | ||
82 | |||
83 | self.out( rprovideLine ) | ||
84 | self.out( "" ) | ||
85 | return | ||
86 | |||
87 | # | ||
69 | # generate provides line | 88 | # generate provides line |
70 | # | 89 | # |
71 | 90 | ||
@@ -147,17 +166,21 @@ class MakefileMaker: | |||
147 | self.doEpilog() | 166 | self.doEpilog() |
148 | 167 | ||
149 | if __name__ == "__main__": | 168 | if __name__ == "__main__": |
169 | parser = argparse.ArgumentParser( description='generate python manifest' ) | ||
170 | parser.add_argument( '-n', '--native', help='generate manifest for native python', action='store_true' ) | ||
171 | parser.add_argument( 'outfile', metavar='OUTPUT_FILE', nargs='?', default='', help='Output file (defaults to stdout)' ) | ||
172 | args = parser.parse_args() | ||
150 | 173 | ||
151 | if len( sys.argv ) > 1: | 174 | if args.outfile: |
152 | try: | 175 | try: |
153 | os.unlink(sys.argv[1]) | 176 | os.unlink( args.outfile ) |
154 | except Exception: | 177 | except Exception: |
155 | sys.exc_clear() | 178 | sys.exc_clear() |
156 | outfile = open( sys.argv[1], "w" ) | 179 | outfile = open( args.outfile, "w" ) |
157 | else: | 180 | else: |
158 | outfile = sys.stdout | 181 | outfile = sys.stdout |
159 | 182 | ||
160 | m = MakefileMaker( outfile ) | 183 | m = MakefileMaker( outfile, args.native ) |
161 | 184 | ||
162 | # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies! | 185 | # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies! |
163 | # Parameters: revision, name, description, dependencies, filenames | 186 | # Parameters: revision, name, description, dependencies, filenames |