Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

Python Wheel vs. Source Distribution: What Gets Included in Each?

An sdist carries source and build inputs; a wheel carries files prepared for installation. Required structure is standardized, but optional contents vary by project.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A source distribution (sdist) is a source archive intended to provide the inputs needed to build a package; a wheel is a built archive containing files prepared for installation. Neither format promises a complete copy of a project’s development checkout. The exact optional files depend on the project’s build configuration, so inspect the release artifact to know its full contents.

What an sdist includes

The current standardized source distribution is a gzip-compressed tar archive with one top-level {name}-{version} directory. Under the PyPA source distribution format specification, that directory must contain pyproject.toml and PKG-INFO. The metadata must conform to at least metadata version 2.2.

When the metadata uses version 2.4 or later, the archive must also contain license files named in License-File, at the relative paths declared there. Beyond those requirements, the format does not define a universal file inventory.

Common project files are not guaranteed

An sdist may include source code, tests, documentation, generated files, or backend-specific build material. Those are possibilities, not requirements for every package. Build-system configuration determines which additional files are included; PyPA describes an sdist as carrying source needed for installation and notes that projects may include tests and documentation in its packaging flow guide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a wheel includes

A wheel is a ZIP-format built distribution. Its archive root contains files destined for the Python installation scheme’s purelib or platlib locations, commonly site-packages, plus a {distribution}-{version}.dist-info/ directory. The binary distribution format specification requires that .dist-info include at least METADATA, WHEEL, and RECORD; the latter records archive files and hashes.

License files go in .dist-info/licenses/. If files are intended for installation outside the default library locations, a wheel can also contain a {distribution}-{version}.data/ directory. Its subdirectories use installation-scheme keys such as scripts, headers, or data.

Does a wheel include source code?

It can include Python source files when those are the files the package installs. But a wheel is not a source archive or a copy of the development checkout. For a package with compiled extensions, the wheel contains built executable code for its target, not necessarily the C, C++, or Rust source used to create it. Pure-Python wheels can often work across more systems; compiled wheels carry compatibility tags for relevant interpreter, operating-system, and architecture constraints.

The wheel specification says wheels do not generally include .pyc files and do not contain setup.py or setup.cfg. A README may be incorporated into distribution metadata without being included as a standalone installed file; its presence as a file depends on the backend and project configuration. See PyPA’s README guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

At a glance: how their contents differ

What to look for Source distribution (sdist) Wheel
Format and purpose Gzip-compressed tar archive intended to provide source and build inputs. ZIP-format built distribution prepared for installation.
Required structure One top-level {name}-{version} directory containing pyproject.toml and PKG-INFO. Install-scheme files and a .dist-info directory containing at least METADATA, WHEEL, and RECORD.
Tests and documentation May be included; not universally required. Not guaranteed; the archive is for installation rather than a full development checkout.
Compiled code May include source used to build extensions. For compiled packages, contains built code for the wheel’s target compatibility.
Other installation locations Not defined as a standard installed-file layout. May use a .data directory grouped by scheme key.

The required-structure descriptions in the table follow the PyPA sdist and wheel specifications. Optional contents vary by project.

Why pip may download an sdist

pip uses a compatible wheel when one is available. If it cannot find a wheel compatible with the current environment, it can download the sdist, build a wheel locally, and install that result. This is especially relevant for packages with compiled extensions: a release may not offer a prebuilt wheel for every supported Python, operating system, and CPU combination. PyPA explains this behavior in its installing packages guide.

For publishers, PyPA recommends distributing an sdist and one or more wheels. A pure-Python package often needs one generic wheel, while a package with binary extensions may need wheels for each supported compatibility combination. See the packaging flow guide.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to inspect the files in a specific release

  1. Download the exact sdist or wheel release you want to check.
  2. List or extract the sdist with standard tar tools, or list the wheel with ZIP archive tools.
  3. For an sdist, check the top-level directory, pyproject.toml, PKG-INFO, source files, and any project-specific extras.
  4. For a wheel, inspect its root files, .dist-info, any .data directory, and the compatibility tags in its filename and WHEEL metadata.

Artifact inspection is the way to establish whether a particular release includes optional items such as tests or documentation; the format rules alone cannot answer that. To build artifacts from a project, PyPA identifies build as the standard tool for invoking the backend in pyproject.toml and advises against using python setup.py sdist or python setup.py bdist_wheel for this task. See its tool recommendations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.