The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Files go missing from a Python wheel for two main reasons: setuptools did not discover the Python package or module, or it did not include the package’s runtime data files. These are separate problems with separate configuration. First identify what kind of file is missing, then configure discovery or data inclusion for your project’s layout, rebuild, and inspect the wheel itself.
First identify what kind of file is missing
A wheel is the installable artifact; the source distribution (sdist) is a separate archive that can also contain tests, documentation, examples, and build inputs. A file appearing in the sdist does not prove it will appear in the wheel. The Python Packaging Authority states that “MANIFEST.in does not affect binary distributions such as wheels.”
- A package directory or Python module is missing: check package discovery and module declarations.
- A non-Python file inside a package is missing: configure package data or manifest/VCS-based inclusion.
- A file outside a package is missing: reconsider whether it belongs inside the importable package;
include_package_dataincludes files inside package directories in the wheel by default. - A test, document, or example is missing: it may intentionally be present only in the sdist, not the runtime wheel.
Fix Python package and module discovery
Match the finder to the project layout
With setuptools, package discovery is configured through packages or automatic finder rules. For example, the PyPA guide demonstrates find_packages(include=['sample', 'sample.*']); adjust include and exclude patterns to match the intended package tree. If the package lives under src/, configure the finder’s root accordingly rather than searching the repository root. Setuptools’ data-files examples use where = ["src"] for this layout; legacy setup.py configuration can map it with package_dir={"": "src"}.
Declare standalone modules
A single top-level .py file that is not inside a package is a module, not a discovered package directory. Declare its module name, without the extension, in py_modules. The distinction and discovery examples are covered in the PyPA setuptools distribution guide.
#1 Best Overall
Check automatic discovery and namespace packages
Setuptools’ flat-layout finder excludes certain names and refuses ambiguous distributions with multiple top-level packages by default. If a multi-package layout is intentional, configure discovery explicitly. In pyproject.toml, tool.setuptools.packages.find considers implicit namespace packages by default; set namespaces = false only when the project does not use them. See setuptools package discovery.
Include non-Python runtime files
Prefer explicit package-data patterns when the files are known
For files such as JSON, text, or templates stored inside an importable package, setuptools’ package_data patterns provide a direct inclusion rule. A src-layout example is:
Rank #2
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
mypkg = ["*.json", "*.txt"]
Replace mypkg and the patterns with the actual package name and runtime files. Patterns do not match dotfiles unless the pattern explicitly begins with a dot. For nested paths, use / as the separator on every platform. These rules are documented in setuptools data files.
Use manifest or VCS inclusion deliberately
include_package_data can include package files that are listed by MANIFEST.in or collected by an enabled version-control-system plugin. In pyproject.toml, this setting has defaulted to true since setuptools 61.0.0; in setup.cfg and setup.py, the default remains false for backwards compatibility. Explicit package-data patterns make the selection easier to reason about. A manifest can help place files in an sdist, but it is not by itself a wheel inclusion rule.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Reconsider files stored outside the package
Runtime resources are generally easiest to distribute alongside the package that loads them. Setuptools’ data_files supports some files installed outside packages, but the documentation describes it as mostly useful for files consumed by other programs. Choose it only when that installation location is actually needed; do not expect include_package_data to gather arbitrary files from elsewhere in the repository.
Build and inspect the wheel, not just the source tree
- Confirm the backend. Open
pyproject.tomland check[build-system]. Setuptools options do not configure Hatch, Flit, PDM, Poetry, or another backend; use that backend’s own inclusion rules. The PyPA packaging tutorial explains the build configuration and artifact workflow. - Match configuration to the tree. For example, if the package is at
src/mypkg/__init__.py, ensure discovery searchessrc. Declare standalone modules separately. - Add the appropriate data rule. Use package-data patterns for known runtime files, or configure manifest/VCS inclusion when that is the intended mechanism. Do not assume an sdist manifest alone puts files in the wheel.
- Clear stale outputs after changing files or configuration. Remove
build,dist, and*.egg-infobefore rebuilding. Setuptools notes that*.egg-info/SOURCES.txtcan also act as a cache after package-data changes. - Build and inspect the archive. Run
python3 -m build --wheel source-tree-directory, replacing the directory with the project’s source-tree path. A.whlis a ZIP-format archive. Check that it contains the expected installable paths; wheel contents are installed intopureliborplatlib, commonlysite-packages, alongside distribution metadata.
For a final check, compare the expected importable package paths and runtime resources with the actual archive contents. The wheel specification describes the archive layout. It also notes that a wheel does not contain setup.py or setup.cfg; their absence is not evidence of a failed build.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




