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

* Clean up MANIFEST.in (#80688)

* Remove unnecessary MANIFEST.in commands

This eliminates more setuptools warnings during build.

* Sort MANIFEST.in

Now that only include commands are used, the order of the commands no longer effects the build output.

(cherry picked from commit 6e325d9e4d)

* Omit hacking directory from MANIFEST.in (#81245)

* Omit `hacking` directory from `MANIFEST.in`

* Update package-data sanity test

(cherry picked from commit b93a628aed)
pull/81425/head
Matt Clay 1 year ago committed by GitHub
parent 3038fee209
commit 5265794b32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,18 +1,11 @@
include COPYING include COPYING
include bin/*
include changelogs/CHANGELOG*.rst
include changelogs/changelog.yaml
include licenses/*.txt
include requirements.txt include requirements.txt
recursive-include licenses *.txt
recursive-include packaging *.py *.j2 recursive-include packaging *.py *.j2
recursive-include test/integration * recursive-include test/integration *
recursive-include test/sanity *.in *.json *.py *.txt recursive-include test/sanity *.in *.json *.py *.txt
recursive-include test/support *.py *.ps1 *.psm1 *.cs *.md 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 * 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/*

@ -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.

@ -28,12 +28,8 @@ def assemble_files_to_ship(complete_file_list):
'.github/*', '.github/*',
'.github/*/*', '.github/*/*',
'changelogs/fragments/*', 'changelogs/fragments/*',
'hacking/backport/*', 'hacking/*',
'hacking/azp/*', 'hacking/*/*',
'hacking/tests/*',
'hacking/ticket_stubs/*',
'test/sanity/code-smell/botmeta.*',
'test/sanity/code-smell/release-names.*',
'test/results/.tmp/*', 'test/results/.tmp/*',
'test/results/.tmp/*/*', 'test/results/.tmp/*/*',
'test/results/.tmp/*/*/*', 'test/results/.tmp/*/*/*',
@ -45,32 +41,8 @@ def assemble_files_to_ship(complete_file_list):
# Developer-only tools # Developer-only tools
'changelogs/README.md', 'changelogs/README.md',
'changelogs/config.yaml', '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', '.cherry_picker.toml',
'.mailmap', '.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 # These files are generated and then intentionally added to the sdist
@ -99,8 +71,6 @@ def assemble_files_to_install(complete_file_list):
""" """
ignore_patterns = ( ignore_patterns = (
# Tests excluded from sdist # 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 = [] pkg_data_files = []

Loading…
Cancel
Save