Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 1 | # Copyright 2019 The Bazel Authors. 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 | |
Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 15 | load("//python:defs.bzl", "py_library") |
Alex Eagle | 1722988 | 2023-01-21 11:16:41 -0800 | [diff] [blame] | 16 | load("//python:packaging.bzl", "py_wheel") |
Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 17 | |
aiuto | e953b0a | 2019-10-04 16:29:41 -0400 | [diff] [blame] | 18 | filegroup( |
| 19 | name = "distribution", |
| 20 | srcs = glob(["**"]), |
| 21 | visibility = ["//python:__pkg__"], |
| 22 | ) |
| 23 | |
Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 24 | py_library( |
| 25 | name = "runfiles", |
Alex Eagle | 1722988 | 2023-01-21 11:16:41 -0800 | [diff] [blame] | 26 | srcs = [ |
| 27 | "__init__.py", |
| 28 | "runfiles.py", |
| 29 | ], |
Jon Brandvein | 522222a | 2019-07-26 23:35:39 -0400 | [diff] [blame] | 30 | visibility = ["//visibility:public"], |
| 31 | ) |
Alex Eagle | 1722988 | 2023-01-21 11:16:41 -0800 | [diff] [blame] | 32 | |
| 33 | # This can be manually tested by running tests/runfiles/runfiles_wheel_integration_test.sh |
| 34 | # We ought to have an automated integration test for it, too. |
| 35 | # see https://github.com/bazelbuild/rules_python/issues/1002 |
| 36 | py_wheel( |
| 37 | name = "wheel", |
| 38 | # From https://pypi.org/classifiers/ |
| 39 | classifiers = [ |
| 40 | "Development Status :: 5 - Production/Stable", |
| 41 | "License :: OSI Approved :: Apache Software License", |
| 42 | ], |
| 43 | description_file = "README.md", |
Alex Eagle | 68b0213 | 2023-01-26 15:14:05 -0800 | [diff] [blame] | 44 | dist_folder = "dist", |
Alex Eagle | 1722988 | 2023-01-21 11:16:41 -0800 | [diff] [blame] | 45 | distribution = "bazel_runfiles", |
| 46 | homepage = "https://github.com/bazelbuild/rules_python", |
| 47 | strip_path_prefixes = ["python"], |
| 48 | version = "{BUILD_EMBED_LABEL}", |
| 49 | visibility = ["//visibility:public"], |
| 50 | deps = [":runfiles"], |
| 51 | ) |