Inspect Python package distributions and raise warnings on common problems.
Project description
pydistcheck
Warning
This project is very-very-very new and will change significantly. The next time you look at this repo, this might not even be written in the same programming language. If I was you, I wouldn't use it.
Analyzes the contents of a Python package and warns about common issues, like:
- inclusion of unnecessary files
- use of multiple file extensions with the same meaning
Minimal Example
Get information about the files associated with the most recent release of a package to PyPI.
make full-run \
-e PACKAGE_NAME=lightgbm
or, using the CLI
make build install
pydistcheck-summarize \
--output-file "$(pwd)/sizes.csv" \
dist/pydistcheck*.tar.gz
Questions to be answered?
- what are the
n
largest files in this artifact? - what is the total size (compressed and uncompressed) of this artifact?
- what file types (by extension) exist in this artifact? how much space do they take up?
Ideas for a file content linter:
- mixes of extensions for the same file type (e.g.
.yaml
and.yml
) - file types not expected to be found in a Python package
- executable files
- a directory called "tests/"
Related Projects
References
- Python packaging guides: https://packaging.python.org/en/latest/guides/#
- PyPI APIs: https://warehouse.pypa.io/api-reference/index.html
- https://gitlab.com/n2vram/tarwalker/-/blob/master/tarwalker.py
- https://cibuildwheel.readthedocs.io/en/stable/deliver-to-pypi/
- https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
- https://github.com/pypa/auditwheel
- https://github.com/matthew-brett/delocate
- https://setuptools.pypa.io/en/latest/userguide/entry_point.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pydistcheck-0.0.2.99.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for pydistcheck-0.0.2.99-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d84c46a9bfd81a0f6bf64892c004b6f2d8af3b9ae9ea7d20c569d6dab9424b3 |
|
MD5 | 0b9ac964af3818631dda6ed41e96fee7 |
|
BLAKE2b-256 | 28d86738c3d147445669292350077c5783d4cddf10cb06913f1d137d24c7fa58 |