delvewheel
delvewheel is a command-line tool for creating Python wheel packages for Windows that have DLL dependencies that may not be present on the target system. It is functionally similar to auditwheel (for Linux) and delocate (for Mac OS).
Suppose that you have built a Python wheel for Windows containing an extension module, but the wheel depends on DLLs that are present in the build environment but may not be present on the end user's machine. This tool determines which DLLs a wheel depends on (aside from system libraries) and copies those DLLs into the wheel.
Installation
delvewheel can be installed using pip.
pip install delvewheel
You can also install from the source code by opening a command-line shell at the repository root and running
pip install .
Python 3.6+ on Windows is required.
Usage
delvewheel show: show external DLLs that the wheel depends on
delvewheel repair: copy external DLL dependencies into the wheel and patch the wheel so that these libraries are loaded at runtime
delvewheel needed: list the direct DLL dependencies of a single executable
delvewheel searches for the location of DLL dependencies using the default Python search order for shared libraries. To specify an additional directory to search for DLLs, add the location of the DLL to the PATH environment variable or use the --add-path option.
For a summary of additional command-line options, use the -h option (delvewheel -h, delvewheel show -h, delvewheel repair -h, delvewheel needed -h).
Additional Options
delvewheel show
--add-path: additional path(s) to search for DLLs, semicolon delimited. These paths are searched before those in thePATHenvironment variable.--add-dll: name(s) of additional DLL(s) to vendor into the wheel, semicolon delimited. We do not automatically search for dependencies of these DLLs.--no-dll: name(s) of DLL(s) to specifically exclude from the wheel, semicolon delimited-v: verbose mode--extract-dir: directory to store extracted contents of wheel for debug use (default is a temp directory)
delvewheel repair
--add-path: additional path(s) to search for DLLs, semicolon delimited. These paths are searched before those in thePATHenvironment variable.--add-dll: name(s) of additional DLL(s) to vendor into the wheel, semicolon delimited. We do not automatically search for or vendor in dependencies of these DLLs, nor do we mangle the names of these DLLs.--no-dll: name(s) of DLL(s) to specifically exclude from the wheel, semicolon delimited-v: verbose mode--extract-dir: directory to store extracted contents of wheel for debug use (default is a temp directory)-w,--wheel-dir: directory to write the repaired wheel (default iswheelhouserelative to current working directory)--no-mangle: name(s) of DLL(s) not to mangle, semicolon-delimited--no-mangle-all: don't mangle any DLL names-L,--lib-sdir: subdirectory suffix in package to store vendored DLLs (default.libs)
Limitations
delvewheelreads DLL file headers to determine which libraries a wheel depends on. DLLs that are loaded at runtime usingctypes/cffi(from Python) orLoadLibrary(from C/C++) will be missed. You can, however, specify additional DLLs to vendor into the wheel using the--add-dlloption.- Wheels created using
delvewheelare not guaranteed to work on systems older than Windows 7. If you intend to create a wheel for an old Windows system, you should test the resultant wheel thoroughly. If it turns out that getting the wheel to work on an older system simply requires an extra DLL, you can use the--add-dllflag to vendor additional DLLs into the wheel. - To avoid DLL hell, we mangle the file names of most DLLs that are vendored into the wheel. This way, a Python process that tries loading a vendored DLL does not end up using a different DLL with the same name. Due to a limitation in the
machomachomanglerdependency,delvewheelis unable to name-mangle DLLs containing extra data at the end of the binary. If your DLL was created with MinGW, you can use thestriputility to remove the extra data. Otherwise, use the--no-mangleflag. - The bitness of the Python interpreter that runs
delvewheelmust match the bitness of the wheel that is repaired. For example, you cannot rundelvewheelfrom a 32-bit Python interpreter to repair a wheel that is meant for 64-bit Python.
Metadata
Release files for delvewheel 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| delvewheel-0.0.9.tar.gz | 29.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| delvewheel-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.7 kB
Release files / delvewheel-0.0.9.tar.gz
| Download URL | delvewheel-0.0.9.tar.gz |
|---|---|
| Size | 29.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
953d384ee3dd8cfb49e9c77d28a476c519431c2543d33b5faaa85553c3dc58cb
|
|
BLAKE2b-256 checksum How to use checksums |
af4433860628cb61eaa8869f7faaf55c3ef072b4397b213abb9c740032245f4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
|
Release files / delvewheel-0.0.9-py3-none-any.whl
| Download URL | delvewheel-0.0.9-py3-none-any.whl |
|---|---|
| Size | 28.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5db2a2ec398035a59ba982fe2959fd3e062fdc3b54d2379eab2a195742436164
|
|
BLAKE2b-256 checksum How to use checksums |
76bdc60e094e850052fac92f32c9a08857041b5f867b1a05ed246dd99d6c67c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
|