Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 1 | // Copyright 2017 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 | |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 15 | python_library { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 16 | name: "py2-stdlib", |
| 17 | is_internal: true, |
| 18 | pkg_path: "stdlib", |
| 19 | srcs: [ |
| 20 | "*.py", |
| 21 | "compiler/**/*.py", |
Nan Zhang | d5c4d4a | 2017-07-19 16:22:00 -0700 | [diff] [blame] | 22 | "ctypes/**/*.py", |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 23 | "email/**/*.py", |
| 24 | "encodings/**/*.py", |
| 25 | "hotshot/**/*.py", |
| 26 | "importlib/**/*.py", |
| 27 | "json/**/*.py", |
| 28 | "logging/**/*.py", |
| 29 | "multiprocessing/**/*.py", |
| 30 | "pydoc_data/**/*.py", |
Nan Zhang | a3b4090 | 2018-05-23 15:44:01 -0700 | [diff] [blame] | 31 | "sqlite3/**/*.py", |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 32 | "unittest/**/*.py", |
| 33 | "wsgiref/**/*.py", |
| 34 | "xml/**/*.py", |
| 35 | ], |
| 36 | // TODO(nanzhang): make exclude_srcs support globs. |
| 37 | exclude_srcs: [ |
| 38 | "__phello__.foo.py", |
| 39 | ], |
| 40 | version: { |
| 41 | py2: { |
| 42 | enabled: true, |
| 43 | }, |
| 44 | py3: { |
| 45 | enabled: false, |
| 46 | }, |
| 47 | }, |
| 48 | target: { |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 49 | darwin: { |
| 50 | srcs: [":py2-plat-darwin"], |
| 51 | }, |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 52 | linux: { |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 53 | srcs: [":py2-plat-linux2"], |
| 54 | }, |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 55 | }, |
Nan Zhang | 33bb4bb | 2017-12-01 20:00:54 +0000 | [diff] [blame] | 56 | host_supported: true, |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | filegroup { |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 60 | name: "py2-plat-darwin", |
| 61 | srcs: ["plat-darwin/*.py"], |
| 62 | path: "plat-darwin", |
| 63 | } |
| 64 | |
| 65 | filegroup { |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 66 | name: "py2-plat-linux2", |
Dan Willemsen | c88c080 | 2017-09-25 14:33:27 -0700 | [diff] [blame] | 67 | srcs: ["plat-linux2/*.py"], |
Nan Zhang | ced2751 | 2017-06-19 18:01:34 -0700 | [diff] [blame] | 68 | path: "plat-linux2", |
| 69 | } |