Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MrMino/wheelfile
🔪🧀 API for creating and inspecting Python .whl files (wheels)
https://github.com/MrMino/wheelfile
metadata packages packaging packaging-python python python-wheel python-wheels
Last synced: 30 days ago
JSON representation
🔪🧀 API for creating and inspecting Python .whl files (wheels)
- Host: GitHub
- URL: https://github.com/MrMino/wheelfile
- Owner: MrMino
- License: mit
- Created: 2020-12-20T06:12:33.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-04T09:49:24.000Z (about 1 month ago)
- Last Synced: 2024-11-11T05:22:24.429Z (about 1 month ago)
- Topics: metadata, packages, packaging, packaging-python, python, python-wheel, python-wheels
- Language: Python
- Homepage:
- Size: 206 KB
- Stars: 30
- Watchers: 1
- Forks: 5
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Wheelfile 🔪🧀
This library aims to make it dead simple to create a format-compliant [.whl
file (wheel)](https://pythonwheels.com/). It provides an API comparable to
[zipfile](https://docs.python.org/3/library/zipfile.html). Use this if you wish
to inspect or create wheels in your code.For a quick look, see the example on the right, which packages the wheelfile
module itself into a wheel 🤸.#### What's the difference between this and [wheel](https://pypi.org/project/wheel/)?
"Wheel" tries to provide a reference implementation for the standard. It is used
by setuptools and has its own CLI, but no stable API. The goal of Wheelfile is
to provide a simple API.Wheelfile does not depend on Wheel.
## Acknowledgements
Thanks to [Paul Moore](https://github.com/pfmoore) for providing
[his gist](https://gist.github.com/pfmoore/20f3654ca33f8b14f0fcb6dfa1a6b469)
of basic metadata parsing logic, which helped to avoid many foolish mistakes
in the initial implementation.
```
pip install wheelfile
``````py
from wheelfile import WheelFile, __version__spec = {
'distname': 'wheelfile',
'version': __version__
}requirements = [
'packaging >= 20.8',
]with WheelFile(mode='w', **spec) as wf:
wf.metadata.requires_dists = requirements
wf.write('./wheelfile.py')# 🧀
```
More examples:
buildscript |
PEP-517 builder