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

[stable-2.15] Clean up MANIFEST.in #81414

Merged
merged 2 commits into from Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 4 additions & 11 deletions MANIFEST.in
@@ -1,18 +1,11 @@
include COPYING
include bin/*
include changelogs/CHANGELOG*.rst
include changelogs/changelog.yaml
include licenses/*.txt
include requirements.txt
recursive-include licenses *.txt
recursive-include packaging *.py *.j2
recursive-include test/integration *
recursive-include test/sanity *.in *.json *.py *.txt
recursive-include test/support *.py *.ps1 *.psm1 *.cs *.md
exclude test/sanity/code-smell/botmeta.*
exclude test/sanity/code-smell/release-names.*
exclude test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py
exclude test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py
recursive-include test/units *
include MANIFEST.in
include changelogs/CHANGELOG*.rst
include changelogs/changelog.yaml
include hacking/test-module.py
include hacking/update-sanity-requirements.py
include bin/*
9 changes: 9 additions & 0 deletions changelogs/fragments/manifest-in-cleanup.yml
@@ -0,0 +1,9 @@
minor_changes:
- Removed ``exclude`` and ``recursive-exclude`` commands for generated files from the ``MANIFEST.in`` file.
These excludes were unnecessary since releases are expected to be built with a clean worktree.
- Removed ``exclude`` commands for sanity test files from the ``MANIFEST.in`` file.
These tests were previously excluded because they did not pass when run from an sdist.
However, sanity tests are not expected to pass from an sdist, so excluding some (but not all) of the failing tests makes little sense.
- Removed redundant ``include`` commands from the ``MANIFEST.in`` file.
These includes either duplicated default behavior or another command.
- Use ``include`` where ``recursive-include`` is unnecessary in the ``MANIFEST.in`` file.
34 changes: 2 additions & 32 deletions test/sanity/code-smell/package-data.py
Expand Up @@ -28,12 +28,8 @@ def assemble_files_to_ship(complete_file_list):
'.github/*',
'.github/*/*',
'changelogs/fragments/*',
'hacking/backport/*',
'hacking/azp/*',
'hacking/tests/*',
'hacking/ticket_stubs/*',
'test/sanity/code-smell/botmeta.*',
'test/sanity/code-smell/release-names.*',
'hacking/*',
'hacking/*/*',
'test/results/.tmp/*',
'test/results/.tmp/*/*',
'test/results/.tmp/*/*/*',
Expand All @@ -45,32 +41,8 @@ def assemble_files_to_ship(complete_file_list):
# Developer-only tools
'changelogs/README.md',
'changelogs/config.yaml',
'hacking/README.md',
'hacking/ansible-profile',
'hacking/cgroup_perf_recap_graph.py',
'hacking/create_deprecated_issues.py',
'hacking/deprecated_issue_template.md',
'hacking/create_deprecation_bug_reports.py',
'hacking/fix_test_syntax.py',
'hacking/get_library.py',
'hacking/metadata-tool.py',
'hacking/report.py',
'hacking/return_skeleton_generator.py',
'hacking/test-module',
'test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py',
'test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py',
'.cherry_picker.toml',
'.mailmap',
# Possibly should be included
'hacking/env-setup',
'hacking/env-setup.fish',
'MANIFEST',
'setup.cfg',
# docs for test files not included in sdist
'docs/docsite/rst/dev_guide/testing/sanity/bin-symlinks.rst',
'docs/docsite/rst/dev_guide/testing/sanity/botmeta.rst',
'docs/docsite/rst/dev_guide/testing/sanity/integration-aliases.rst',
'docs/docsite/rst/dev_guide/testing/sanity/release-names.rst',
))

# These files are generated and then intentionally added to the sdist
Expand Down Expand Up @@ -99,8 +71,6 @@ def assemble_files_to_install(complete_file_list):
"""
ignore_patterns = (
# Tests excluded from sdist
'test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py',
'test/lib/ansible_test/_internal/commands/sanity/integration_aliases.py',
)

pkg_data_files = []
Expand Down