Skip to main content

Check the contents of an SDist vs. git

Project description

check-sdist

Actions Status PyPI version PyPI platforms

Have you ever shipped broken SDists with missing files or possibly dirty SDists with files that shouldn't have been there? Have you noticed that standards compliant tools aren't making the same SDist that flit build is? Is hatchling adding .DSStore files when you ship from your macOS? No matter what build-backend you use, check-sdist can help!

Check-sdist builds an SDist and compares the contents with your Git repository contents. It can even temporarily inject common junk files (like pycache files or OS specific files) and help verify that those aren't getting bundled into your SDist. If you are getting files you didn't expect or missing files you did expect, consult your build backend's docs to see how to include or exclude files.

Quick start

To run:

$ pipx run check-sdist

You can add --no-isolation to disable build isolation (faster, but must preinstall build dependencies), --source-dir to select a different source directory to check, and --inject-junk to temporarily inject some common junk files while running.

If you need the latest development version:

$ pipx run --spec git+https://github.com/henryiii/check-sdist check-sdist

Pre-commit integration

To use the pre-commit integration, put this in your .pre-commit-config.yaml:

- repo: https://github.com/henryiii/check-sdist
  rev: v0.1.3
  hooks:
    - id: check-sdist
      args: [--inject-junk]
      additional_dependencies: [] # list your build deps here

This requires your build dependencies, but in doing so, it can cache the environment, making it quite fast. If you don't mind slower runs and don't want to require build dependency listing:

- repo: https://github.com/henryiii/check-sdist
  rev: v0.1.3
  hooks:
    - id: check-sdist-isolated
      args: [--inject-junk]

Configuration

To configure, these options are supported in your pyproject.toml file:

[tool.check-sdist]
sdist-only = []
git-only = []
default-ignore = true

You can add .gitignore style lines here, and you can turn off the default ignore list, which adds some default git-only files.

See also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

check_sdist-0.1.3.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

check_sdist-0.1.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file check_sdist-0.1.3.tar.gz.

File metadata

  • Download URL: check_sdist-0.1.3.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for check_sdist-0.1.3.tar.gz
Algorithm Hash digest
SHA256 cca0017baa1a31e9ff90cd93bc1fbe5cb26b5139b46f110efb17be584eefed51
MD5 c8a6e52bbe62c35edb5be515fefb51b8
BLAKE2b-256 569b3400b1c4e25d68dc6e568bc5714ef930aeb303ad657d7753e58c551343c4

See more details on using hashes here.

File details

Details for the file check_sdist-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: check_sdist-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for check_sdist-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 59a6766e941a6c83829218c744821a51cff44c898040bee8b7b9b992f6d2cd89
MD5 fb7df71356c1e87f5ea361e2a30189e2
BLAKE2b-256 29d7f383590afe8389103d460daca71cdb1d81568a17b992cc90e0903c09b73f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page