diff options
-rw-r--r-- | meta/recipes-devtools/python/python-native-3.5-manifest.inc | 11 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python3-native_3.5.2.bb | 27 | ||||
-rwxr-xr-x | scripts/contrib/python/generate-manifest-3.5.py | 37 |
3 files changed, 42 insertions, 33 deletions
diff --git a/meta/recipes-devtools/python/python-native-3.5-manifest.inc b/meta/recipes-devtools/python/python-native-3.5-manifest.inc new file mode 100644 index 0000000000..aa4c4f5571 --- /dev/null +++ b/meta/recipes-devtools/python/python-native-3.5-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-3.5.py --native' Version 20140131 (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+="python3-2to3-native python3-argparse-native python3-asyncio-native python3-audio-native python3-codecs-native python3-compile-native python3-compression-native python3-core-native python3-crypt-native python3-ctypes-native python3-curses-native python3-datetime-native python3-db-native python3-debugger-native python3-dev-native python3-difflib-native python3-distutils-native python3-distutils-staticdev-native python3-doctest-native python3-email-native python3-enum-native python3-fcntl-native python3-gdbm-native python3-html-native python3-idle-native python3-image-native python3-importlib-native python3-io-native python3-json-native python3-lang-native python3-logging-native python3-mailbox-native python3-math-native python3-mime-native python3-mmap-native python3-multiprocessing-native python3-netclient-native python3-netserver-native python3-numbers-native python3-pickle-native python3-pkgutil-native python3-pprint-native python3-profile-native python3-pydoc-native python3-re-native python3-readline-native python3-reprlib-native python3-resource-native python3-selectors-native python3-shell-native python3-signal-native python3-smtpd-native python3-sqlite3-native python3-sqlite3-tests-native python3-stringold-native python3-subprocess-native python3-syslog-native python3-terminal-native python3-tests-native python3-textutils-native python3-threading-native python3-tkinter-native python3-typing-native python3-unittest-native python3-unixadmin-native python3-xml-native python3-xmlrpc-native " | ||
9 | |||
10 | |||
11 | |||
diff --git a/meta/recipes-devtools/python/python3-native_3.5.2.bb b/meta/recipes-devtools/python/python3-native_3.5.2.bb index bf4e6860fa..edcf2244f5 100644 --- a/meta/recipes-devtools/python/python3-native_3.5.2.bb +++ b/meta/recipes-devtools/python/python3-native_3.5.2.bb | |||
@@ -41,32 +41,7 @@ DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native s | |||
41 | 41 | ||
42 | inherit native | 42 | inherit native |
43 | 43 | ||
44 | RPROVIDES += " \ | 44 | require python-native-${PYTHON_MAJMIN}-manifest.inc |
45 | python3-compression-native \ | ||
46 | python3-core-native \ | ||
47 | python3-distutils-native \ | ||
48 | python3-datetime-native \ | ||
49 | python3-enum-native \ | ||
50 | python3-terminal-native \ | ||
51 | python3-email-native \ | ||
52 | python3-importlib-native \ | ||
53 | python3-io-native \ | ||
54 | python3-json-native \ | ||
55 | python3-lang-native \ | ||
56 | python3-misc-native \ | ||
57 | python3-modules-native \ | ||
58 | python3-netclient-native \ | ||
59 | python3-netserver-native \ | ||
60 | python3-numbers-native \ | ||
61 | python3-pkgutil-native \ | ||
62 | python3-pprint-native \ | ||
63 | python3-re-native \ | ||
64 | python3-shell-native \ | ||
65 | python3-subprocess-native \ | ||
66 | python3-textutils-native \ | ||
67 | python3-threading-native \ | ||
68 | python3-unittest-native \ | ||
69 | " | ||
70 | 45 | ||
71 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip" | 46 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip" |
72 | 47 | ||
diff --git a/scripts/contrib/python/generate-manifest-3.5.py b/scripts/contrib/python/generate-manifest-3.5.py index 5e2eeb7bef..a7fc8bad09 100755 --- a/scripts/contrib/python/generate-manifest-3.5.py +++ b/scripts/contrib/python/generate-manifest-3.5.py | |||
@@ -13,9 +13,13 @@ | |||
13 | # 2014 Khem Raj <raj.khem@gmail.com> | 13 | # 2014 Khem Raj <raj.khem@gmail.com> |
14 | # Added python3 support | 14 | # Added python3 support |
15 | # | 15 | # |
16 | # February 26, 2017 -- Ming Liu <peter.x.liu@external.atlascopco.com> | ||
17 | # * Updated to support generating manifest for native python3 | ||
18 | |||
16 | import os | 19 | import os |
17 | import sys | 20 | import sys |
18 | import time | 21 | import time |
22 | import argparse | ||
19 | 23 | ||
20 | VERSION = "3.5.0" | 24 | VERSION = "3.5.0" |
21 | 25 | ||
@@ -24,16 +28,17 @@ __version__ = "20140131" | |||
24 | 28 | ||
25 | class MakefileMaker: | 29 | class MakefileMaker: |
26 | 30 | ||
27 | def __init__( self, outfile ): | 31 | def __init__( self, outfile, isNative ): |
28 | """initialize""" | 32 | """initialize""" |
29 | self.packages = {} | 33 | self.packages = {} |
30 | self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] | 34 | self.targetPrefix = "${libdir}/python%s/" % VERSION[:3] |
35 | self.isNative = isNative | ||
31 | self.output = outfile | 36 | self.output = outfile |
32 | self.out( """ | 37 | self.out( """ |
33 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. | 38 | # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. |
34 | # Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | 39 | # Generator: '%s%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de> |
35 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy | 40 | # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy |
36 | """ % ( sys.argv[0], __version__ ) ) | 41 | """ % ( sys.argv[0], ' --native' if isNative else '', __version__ ) ) |
37 | 42 | ||
38 | # | 43 | # |
39 | # helper functions | 44 | # helper functions |
@@ -79,6 +84,20 @@ class MakefileMaker: | |||
79 | global VERSION | 84 | global VERSION |
80 | 85 | ||
81 | # | 86 | # |
87 | # generate rprovides line for native | ||
88 | # | ||
89 | |||
90 | if self.isNative: | ||
91 | rprovideLine = 'RPROVIDES+="' | ||
92 | for name in sorted(self.packages): | ||
93 | rprovideLine += "%s-native " % name.replace( '${PN}', 'python3' ) | ||
94 | rprovideLine += '"' | ||
95 | |||
96 | self.out( rprovideLine ) | ||
97 | self.out( "" ) | ||
98 | return | ||
99 | |||
100 | # | ||
82 | # generate provides line | 101 | # generate provides line |
83 | # | 102 | # |
84 | 103 | ||
@@ -160,17 +179,21 @@ class MakefileMaker: | |||
160 | self.doEpilog() | 179 | self.doEpilog() |
161 | 180 | ||
162 | if __name__ == "__main__": | 181 | if __name__ == "__main__": |
182 | parser = argparse.ArgumentParser( description='generate python3 manifest' ) | ||
183 | parser.add_argument( '-n', '--native', help='generate manifest for native python3', action='store_true' ) | ||
184 | parser.add_argument( 'outfile', metavar='OUTPUT_FILE', nargs='?', default='', help='Output file (defaults to stdout)' ) | ||
185 | args = parser.parse_args() | ||
163 | 186 | ||
164 | if len( sys.argv ) > 1: | 187 | if args.outfile: |
165 | try: | 188 | try: |
166 | os.unlink(sys.argv[1]) | 189 | os.unlink( args.outfile ) |
167 | except Exception: | 190 | except Exception: |
168 | sys.exc_clear() | 191 | sys.exc_clear() |
169 | outfile = open( sys.argv[1], "w" ) | 192 | outfile = open( args.outfile, "w" ) |
170 | else: | 193 | else: |
171 | outfile = sys.stdout | 194 | outfile = sys.stdout |
172 | 195 | ||
173 | m = MakefileMaker( outfile ) | 196 | m = MakefileMaker( outfile, args.native ) |
174 | 197 | ||
175 | # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies! | 198 | # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies! |
176 | # Parameters: revision, name, description, dependencies, filenames | 199 | # Parameters: revision, name, description, dependencies, filenames |