Dan Willemsen | b3614d2 | 2019-10-07 16:06:34 -0700 | [diff] [blame] | 1 | // Copyright 2019 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
Dan Willemsen | 6e34514 | 2020-12-16 19:03:07 -0800 | [diff] [blame] | 15 | filegroup { |
| 16 | name: "py3-stdlib-srcs", |
Dan Willemsen | b3614d2 | 2019-10-07 16:06:34 -0700 | [diff] [blame] | 17 | srcs: [ |
| 18 | "*.py", |
Dan Willemsen | ee44d9a | 2020-01-20 23:02:18 -0800 | [diff] [blame] | 19 | "asyncio/**/*.py", |
Dan Willemsen | b3614d2 | 2019-10-07 16:06:34 -0700 | [diff] [blame] | 20 | "collections/**/*.py", |
Dan Willemsen | ee44d9a | 2020-01-20 23:02:18 -0800 | [diff] [blame] | 21 | "concurrent/**/*.py", |
Dan Willemsen | b3614d2 | 2019-10-07 16:06:34 -0700 | [diff] [blame] | 22 | "ctypes/**/*.py", |
| 23 | "distutils/**/*.py", |
| 24 | "email/**/*.py", |
| 25 | "encodings/**/*.py", |
Dan Willemsen | ee44d9a | 2020-01-20 23:02:18 -0800 | [diff] [blame] | 26 | "html/**/*.py", |
| 27 | "http/**/*.py", |
Dan Willemsen | b3614d2 | 2019-10-07 16:06:34 -0700 | [diff] [blame] | 28 | "importlib/**/*.py", |
| 29 | "json/**/*.py", |
| 30 | "logging/**/*.py", |
| 31 | "multiprocessing/**/*.py", |
| 32 | "pydoc_data/**/*.py", |
| 33 | "sqlite3/**/*.py", |
| 34 | "unittest/**/*.py", |
Dan Willemsen | ee44d9a | 2020-01-20 23:02:18 -0800 | [diff] [blame] | 35 | "urllib/**/*.py", |
Dan Willemsen | b3614d2 | 2019-10-07 16:06:34 -0700 | [diff] [blame] | 36 | "wsgiref/**/*.py", |
| 37 | "xml/**/*.py", |
Dan Willemsen | ee44d9a | 2020-01-20 23:02:18 -0800 | [diff] [blame] | 38 | "xmlrpc/**/*.py", |
Dan Willemsen | b3614d2 | 2019-10-07 16:06:34 -0700 | [diff] [blame] | 39 | ], |
| 40 | exclude_srcs: [ |
| 41 | "__phello__.foo.py", |
| 42 | ], |
Dan Willemsen | 6e34514 | 2020-12-16 19:03:07 -0800 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | python_library { |
| 46 | name: "py3-stdlib", |
| 47 | is_internal: true, |
| 48 | pkg_path: "stdlib", |
| 49 | srcs: [":py3-stdlib-srcs"], |
Dan Willemsen | b3614d2 | 2019-10-07 16:06:34 -0700 | [diff] [blame] | 50 | host_supported: true, |
| 51 | } |
Dan Willemsen | 6e34514 | 2020-12-16 19:03:07 -0800 | [diff] [blame] | 52 | |
| 53 | // Used by prebuilts/build-tools/build-prebuilts.sh to update |
| 54 | // prebuilts/build-tools/common/py3-stdlib |
| 55 | genrule { |
| 56 | name: "py3-stdlib-zip", |
| 57 | tools: ["soong_zip"], |
| 58 | cmd: "echo $(in) >$(genDir)/list && " + |
| 59 | "$(location soong_zip) -o $(out) -C external/python/cpython3/Lib -l $(genDir)/list", |
| 60 | srcs: [":py3-stdlib-srcs"], |
| 61 | out: ["py3-stdlib.zip"], |
| 62 | } |