|
| 1 | +# Copyright 2024 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 | +"""Module extension for internal dev_dependency=True setup.""" |
| 15 | + |
| 16 | +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") |
| 17 | + |
| 18 | +def internal_dev_deps(): |
| 19 | + """This extension creates internal rules_python_gazelle dev dependencies.""" |
| 20 | + http_file( |
| 21 | + name = "pytest", |
| 22 | + downloaded_file_path = "pytest-8.3.3-py3-none-any.whl", |
| 23 | + sha256 = "a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2", |
| 24 | + urls = [ |
| 25 | + "https://files.pythonhosted.org/packages/6b/77/7440a06a8ead44c7757a64362dd22df5760f9b12dc5f11b6188cd2fc27a0/pytest-8.3.3-py3-none-any.whl", |
| 26 | + ], |
| 27 | + ) |
| 28 | + http_file( |
| 29 | + name = "django-types", |
| 30 | + downloaded_file_path = "django_types-0.19.1-py3-none-any.whl", |
| 31 | + sha256 = "b3f529de17f6374d41ca67232aa01330c531bbbaa3ac4097896f31ac33c96c30", |
| 32 | + urls = [ |
| 33 | + "https://files.pythonhosted.org/packages/25/cb/d088c67245a9d5759a08dbafb47e040ee436e06ee433a3cdc7f3233b3313/django_types-0.19.1-py3-none-any.whl", |
| 34 | + ], |
| 35 | + ) |
| 36 | + |
| 37 | +def _internal_dev_deps_impl(mctx): |
| 38 | + _ = mctx # @unused |
| 39 | + |
| 40 | + # This wheel is purely here to validate the wheel extraction code. It's not |
| 41 | + # intended for anything else. |
| 42 | + internal_dev_deps() |
| 43 | + |
| 44 | +internal_dev_deps_extension = module_extension( |
| 45 | + implementation = _internal_dev_deps_impl, |
| 46 | + doc = "This extension creates internal rules_python_gazelle dev dependencies.", |
| 47 | +) |
0 commit comments