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 15// *** THIS PACKAGE HAS SPECIAL LICENSING CONDITIONS. PLEASE 16// CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE 17// DEPENDING ON IT IN YOUR PROJECT. *** 18package { 19 // See: http://go/android-license-faq 20 // A large-scale-change added 'default_applicable_licenses' to import 21 // all of the 'license_kinds' from "external_python_cpython2_license" 22 // to get the below license kinds: 23 // SPDX-license-identifier-Apache-2.0 24 // SPDX-license-identifier-BSD 25 // SPDX-license-identifier-GPL 26 // SPDX-license-identifier-MIT 27 // SPDX-license-identifier-PSF-2.0 28 // SPDX-license-identifier-Zlib 29 // legacy_by_exception_only (by exception only) 30 // legacy_notice 31 // legacy_unencumbered 32 default_applicable_licenses: ["external_python_cpython2_license"], 33} 34 35python_library { 36 name: "py2-stdlib", 37 is_internal: true, 38 pkg_path: "stdlib", 39 srcs: [ 40 "*.py", 41 "compiler/**/*.py", 42 "ctypes/**/*.py", 43 "distutils/**/*.py", 44 "email/**/*.py", 45 "encodings/**/*.py", 46 "hotshot/**/*.py", 47 "importlib/**/*.py", 48 "json/**/*.py", 49 "logging/**/*.py", 50 "multiprocessing/**/*.py", 51 "pydoc_data/**/*.py", 52 "sqlite3/**/*.py", 53 "unittest/**/*.py", 54 "wsgiref/**/*.py", 55 "xml/**/*.py", 56 ], 57 // TODO(nanzhang): make exclude_srcs support globs. 58 exclude_srcs: [ 59 "__phello__.foo.py", 60 ], 61 version: { 62 py2: { 63 enabled: true, 64 }, 65 py3: { 66 enabled: false, 67 }, 68 }, 69 target: { 70 darwin: { 71 srcs: [":py2-plat-darwin"], 72 }, 73 linux: { 74 srcs: [":py2-plat-linux2"], 75 }, 76 }, 77 host_supported: true, 78} 79 80filegroup { 81 name: "py2-plat-darwin", 82 srcs: ["plat-darwin/*.py"], 83 path: "plat-darwin", 84} 85 86filegroup { 87 name: "py2-plat-linux2", 88 srcs: ["plat-linux2/*.py"], 89 path: "plat-linux2", 90} 91