Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove .pyi files #34496

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion omnibus/config/software/datadog-agent-integrations-py3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
end

unless windows_target?
block do
block "Remove .exe files" do
# setuptools come from supervisor and ddtrace
FileUtils.rm_f(Dir.glob("#{install_dir}/embedded/lib/python#{python_version}/site-packages/setuptools/*.exe"))
end
Expand Down Expand Up @@ -290,6 +290,18 @@
end
end

block "Remove .pyi files" do
# We don't need them at runtime

pattern = "#{install_dir}/embedded/lib/python#{python_version}/site-packages/**/*.pyi"

if windows_target?
pattern = "#{python_3_embedded}/Lib/site-packages/**/*.pyi"
end

FileUtils.rm_f(Dir.glob(pattern))
end

# Ship `requirements-agent-release.txt` file containing the versions of every check shipped with the agent
# Used by the `datadog-agent integration` command to prevent downgrading a check to a version
# older than the one shipped in the agent
Expand Down