Skip to main content

pdm-wheel

Tests pypi version License Python version pre-commit.ci status pdm-managed Ruff Code style: black

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 and pip 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

  1. pdm-wheel does not check whether the wheels are already built.

Changelog

See Github Releases

Acknowledgements

pdm-wheel is inspired by pip wheel.

pdm-wheel's structure is based on frostming's pdm-packer

Download files

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

Source Distribution

pdm_wheel-0.1.2.tar.gz (23.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdm_wheel-0.1.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pdm_wheel-0.1.2.tar.gz.

File metadata

  • Download URL: pdm_wheel-0.1.2.tar.gz
  • Upload date:
  • Size: 23.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.12.3 CPython/3.10.12

File hashes

Hashes for pdm_wheel-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f382c3394fb41f0b928b25a8be91f35b7f7ffdea2ecdcfcec6d942b23b86bb37
MD5 c6ce379ab6230ca9ed86c736d3a23d0f
BLAKE2b-256 bdce224759c5ed38f7380f6004382b736075d779e9333292530102f27af34bf1

See more details on using hashes here.

File details

Details for the file pdm_wheel-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pdm_wheel-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.12.3 CPython/3.10.12

File hashes

Hashes for pdm_wheel-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a2f0884ab2ddff83410f101d3a5feec12fac23ab9a8657eeae26bd74d43f2766
MD5 51209878f8ed03c5ff7755a137ecafbd
BLAKE2b-256 a7b5456b4ba6c96608ed38698e24fabb5bf69e4ca1546bc6d175ed46c57232a4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

0.0.3.post1

2 files

0.0.3

1 file

0.0.1

2 files

0.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page