Skip to content

Commit 0145f08

Browse files
committed
Lift python3 dependency up to the two omnibus scripts that depend on it.
1 parent 5558868 commit 0145f08

4 files changed

Lines changed: 24 additions & 13 deletions

File tree

deps/cpython.BUILD.bazel

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,23 @@ load("@bazel_skylib//rules:select_file.bzl", "select_file")
99
load("@cpython_versions//:constants.bzl", "PYTHON_MAJOR_MINOR", "PYTHON_MAJOR_MINOR_FLAT")
1010
load("@rules_cc//cc:defs.bzl", "cc_import", "cc_library")
1111
load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make")
12+
load("@rules_license//rules:license.bzl", "license")
1213
load("@rules_pkg//pkg:install.bzl", "pkg_install")
1314
load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files", "pkg_mklink")
1415

16+
package(
17+
default_package_metadata = [":license"],
18+
default_visibility = ["//visibility:private"],
19+
)
20+
21+
# 2.0 is the license version here, not the python version.
22+
license(
23+
name = "license",
24+
license_kinds = ["@rules_license//licenses/spdx:Python-2.0"],
25+
license_text = "LICENSE",
26+
visibility = ["//visibility:public"],
27+
)
28+
1529
# Keep in sync with the ones on repos.MODULE.bazel
1630
python_externals = {
1731
"bzip2": "1.0.8",

omnibus/config/software/datadog-agent-integrations-py3.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
name 'datadog-agent-integrations-py3'
99

10-
dependency 'python3'
11-
1210
python_version = "3.13"
1311

1412
whitelist_file "embedded/lib/python#{python_version}/site-packages/.libsaerospike"
@@ -32,6 +30,12 @@
3230
end
3331

3432
build do
33+
# 2.0 is the license version here, not the python version
34+
license "Python-2.0"
35+
36+
command "bazel run #{omnibazel_flags} -- @cpython//:install --destdir=#{install_dir}",
37+
:live_stream => Omnibus.logger.live_stream(:info)
38+
3539
# aliases for pip
3640
if windows_target?
3741
python = "#{windows_safe_path(python_3_embedded)}\\python.exe"

omnibus/config/software/datadog-agent.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
# creates required build directories
1717
dependency 'datadog-agent-prepare'
1818

19-
dependency "python3"
20-
2119
dependency 'datadog-agent-dependencies'
2220
end
2321

@@ -38,6 +36,10 @@
3836
build do
3937
license :project_license
4038

39+
license "Python-2.0"
40+
command "bazel run #{omnibazel_flags} -- @cpython//:install --destdir=#{install_dir}",
41+
:live_stream => Omnibus.logger.live_stream(:info)
42+
4143
# set GOPATH on the omnibus source dir for this software
4244
gopath = Pathname.new(project_dir) + '../../../..'
4345
flavor_arg = ENV['AGENT_FLAVOR']

omnibus/config/software/python3.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)