Skip to main content

Minimalist wheel building

Project description

Quickly makes Python wheels from a bunch of .py files without needing a setup.py at all.

You probably don’t want to use this. It’s intentionally minimal for my own use-cases, and doesn’t have many features yet (no support for entrypoints, dependencies, extras). If all you’re looking for is a fast build, then consider using flit build --format wheel with a pyproject.toml, this should be nearly as fast.

Usage

For a single file distribution:

python whl.py path/to/myfile.py

For a package (directory with an __init__.py file in it):

python whl.py path/to/dir

whl.py will look in some sensible places to autodetect the package name/version.

Rationale

If all you want to do is package some .py file(s) into a .whl, that’s essentially just making a zipfile. Executing a setuptools / distutils style installer script or a PEP517 / PEP518 style build system is bloated with features which you don’t need, and it can be done much cheaper/faster:

$ time python whl.py mypkg
./mypkg-0.1-py2.py3-none-any.whl
python whl.py mypkg  0.06s user 0.02s system 86% cpu 0.091 total

Compared with doing things the correct way:

$ time python -m build --wheel .
* Creating venv isolated environment...
...
<blah blah>
...
Successfully built mypkg-0.1-py2.py3-none-any.whl
python -m build --wheel .  5.05s user 0.53s system 96% cpu 5.776 total

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

whl-0.0.4-py2.py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 2 Python 3

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