PDM plugin that save your requirements as wheels, similar to pip-wheel
Project description
pdm-wheel
A PDM plugin that save your requirements as wheels, similar to pip wheel
Use cases
- You want to build wheels for your dependencies, but don't want to use
pdm export
andpip wheel
. - You need to pass the wheels to a CI/CD pipeline, and don't want to build them on the CI/CD server.
- You want to install dependencies in a Docker image, but don't wan't to configure private repositories in the image.
Supported versions
- Python 3.10+
- PDM 2.7.4+
Installation
Install it just like any other PDM plugin:
pdm self add pdm-wheel
If you have installed PDM with the recommended tool pipx
, add this plugin by:
pipx inject pdm pdm-wheel
Or if you have installed PDM with pip install --user pdm
, install with pip
to the user site:
python -m pip install --user pdm-wheel
Optionally, you can also specify the plugin in your project pyproject.toml
, to make it installable with pdm install --plugins
:
[tool.pdm]
plugins = [
"pdm-wheel"
]
Usage
pdm wheel [common-options] [dependencies-selection-options] [wheel-options]
💡 Check the options for your version of pdm wheel
with:
pdm wheel --help
Wheel Options:
-w OUTPUT, --wheel-dir OUTPUT
Specify the output directory. It will be created it it does not exists. Default is the current directory
./wheels
Environment variable:PDM_WHEEL_DIR
--clean
Clean the target directory before building.
--no-clean
Do not clean the target directory before building. This is the default behavior.
Notes on lockfiles
PDM 2.8+ now saves the lockfiles with only hashes and no URL by default.
There is currently a performance overhead, as some internals expect the URL to be present, else they will try to reach the indexes to get it.
Thus, I recommend you use pdm lock --static-urls
to have faster pdm wheel
operations.
Read more about this in PDM's documentation.
Examples
# Save all dependencies (including dev deps) as wheels in the ./wheels folder
pdm wheel -w wheels
# Save all dev dependencies as wheels in the ./wheels folder
pdm wheel -w wheels --dev
# Save all non-dev dependencies as wheels in the ./wheels folder
pdm wheel -w wheels --prod
Caveats
pdm-wheel
does not check whether the wheels are already built.
Changelog
See CHANGELOG.md
Acknowledgements
pdm-wheel
is inspired by pip wheel
.
pdm-wheel
's structure is based on frostming's pdm-packer
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
Built Distribution
Hashes for pdm_wheel-0.0.3.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59ed1ff3e959f66d7ce8367b6878a711200256ba2d970cae5a39fffe2d98aeb7 |
|
MD5 | cfcc6c17c2b8e459d683ca75a3c67579 |
|
BLAKE2b-256 | b81241adc2834aa6028caa230dd05cedb3675d730cfcd0b49c9b0cc7f0cb0ad6 |