blob: ecc8b29824f2a74e110649302b8b1ede6251f1c0 [file] [log] [blame]
Dan Willemsenb3614d22019-10-07 16:06:34 -07001// 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 Willemsen6e345142020-12-16 19:03:07 -080015filegroup {
16 name: "py3-stdlib-srcs",
Dan Willemsenb3614d22019-10-07 16:06:34 -070017 srcs: [
18 "*.py",
Dan Willemsenee44d9a2020-01-20 23:02:18 -080019 "asyncio/**/*.py",
Dan Willemsenb3614d22019-10-07 16:06:34 -070020 "collections/**/*.py",
Dan Willemsenee44d9a2020-01-20 23:02:18 -080021 "concurrent/**/*.py",
Dan Willemsenb3614d22019-10-07 16:06:34 -070022 "ctypes/**/*.py",
23 "distutils/**/*.py",
24 "email/**/*.py",
25 "encodings/**/*.py",
Dan Willemsenee44d9a2020-01-20 23:02:18 -080026 "html/**/*.py",
27 "http/**/*.py",
Dan Willemsenb3614d22019-10-07 16:06:34 -070028 "importlib/**/*.py",
29 "json/**/*.py",
30 "logging/**/*.py",
31 "multiprocessing/**/*.py",
32 "pydoc_data/**/*.py",
33 "sqlite3/**/*.py",
34 "unittest/**/*.py",
Dan Willemsenee44d9a2020-01-20 23:02:18 -080035 "urllib/**/*.py",
Dan Willemsenb3614d22019-10-07 16:06:34 -070036 "wsgiref/**/*.py",
37 "xml/**/*.py",
Dan Willemsenee44d9a2020-01-20 23:02:18 -080038 "xmlrpc/**/*.py",
Dan Willemsenb3614d22019-10-07 16:06:34 -070039 ],
40 exclude_srcs: [
41 "__phello__.foo.py",
42 ],
Dan Willemsen6e345142020-12-16 19:03:07 -080043}
44
45python_library {
46 name: "py3-stdlib",
47 is_internal: true,
48 pkg_path: "stdlib",
49 srcs: [":py3-stdlib-srcs"],
Dan Willemsenb3614d22019-10-07 16:06:34 -070050 host_supported: true,
51}
Dan Willemsen6e345142020-12-16 19:03:07 -080052
53// Used by prebuilts/build-tools/build-prebuilts.sh to update
54// prebuilts/build-tools/common/py3-stdlib
55genrule {
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}